Hi guys,
I'm facing a weird problem, reported by Florin on Jaluino group. Using
Albert's PDFUSB bootloader on 18F4550, and the following sample, "Hello
serial world" will never get displayed. "!" and "." chars are displayed.
"""
include 18f4550
pragma target clock 48_000_000
pragma target PLLDIV P5
pragma target CPUDIV P2
pragma target USBPLL F48MHZ
pragma target OSC HS_PLL
pragma target WDT disabled
pragma target LVP disabled
pragma target MCLR external
enable_digital_io()
include delay
const byte print_string_terminator = 0
include print
const serial_hw_baudrate = 115_200
include serial_hardware
serial_hw_init
const byte str1[] = "Hello serial world" -- define a string
print_string(serial_hw_data, str1) -- output string to serial
-- inform user PIC is ready !
serial_hw_write("!")
pin_A0_direction = output
alias led is pin_A0
forever loop
serial_hw_data = "."
led = on
delay_1ms(1000)
serial_hw_data = "!"
led = off
delay_1ms(1000)
print_string(serial_hw_data, str1)
end loop
"""
Sample is compile using "-loader18 2048 -no-fuse" as stated in PDFUSB
documentation.
When using print_string_terminator != 0, it works. When using terminator = 0
and Tiny bootloader, it works. Converting terminator to var works.
Florin has tested it in ISIS demo version (Proteus), a PIC simulator, and
for terminator = 0 + PDFUSB, ISIS says: "[PIC18MEMORY] PC=0x08C0. Read of
unimplemented memory address 0x0808 returns zero."
Do you have even the slightest idea of what's going on ? Is there something
wrong with this constant allocation ?
Thanks
Seb
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.