I reported this to kyle, but I may need to rename variables in 24 
libraries. I did test this on another PIC, but I'd like to know if anyone 
else has the issue before I make modifications to so many libs.

include 18f67j50                      -- target PICmicro
--
-- This program uses the internal oscillator with PLL active.
pragma target clock 48_000_000      -- oscillator frequency
--
pragma target OSC      INTOSC_NOCLKOUT_PLL       -- internal oscillator
pragma target PLLDIV   P2                        -- 8 MHz -> 4 MHz
pragma target CPUDIV   P1                        -- Fosc divisor
pragma target WDT      CONTROL                   -- watchdog
pragma target XINST    DISABLED                  -- extended instruction set
pragma target DEBUG    DISABLED                  -- debugging
pragma target FCMEN    DISABLED                  -- clock monitoring
pragma target IESO     DISABLED                  -- int/ext osc. switch
--
-- The configuration bit settings above are only a selection, sufficient
-- for this program. Other programs may need more or different settings.
--
WDTCON_SWDTEN = OFF                 -- disable WDT
OSCCON_SCS = 0                      -- select primary oscillator
OSCTUNE_PLLEN = TRUE                -- use PLL
--
enable_digital_io()                 -- make all pins digital I/O
--
include delay                       -- library with delay procedures

-- setup uart for communication
const serial_hw_baudrate  = 115200   -- set the baudrate
include serial_hardware
serial_hw_init()
-- some aliases so it is easy to change from serial hw to serial sw.
alias serial_write is serial_hw_write
alias serial_read is serial_hw_read
alias serial_data is serial_hw_data
alias serial_data_available is serial_hw_data_available

include print
include format

-- main program here
forever loop
   _usec_delay (1_000_000)

   var word temperature = 0x1234
   var byte _temperature[2] at temperature

   _temperature[1] = 0xAA -- can't set value of byte 1
   _temperature[0] = 0xBB

   print_word_hex(serial_data, temperature) -- prints 12BB (BAD), should 
print AABB

   print_crlf(serial_data)
end loop

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jallib.
For more options, visit https://groups.google.com/d/optout.

Reply via email to