Page 1 of 1
PIC 18F4550 WITH BOOTLOADER
Posted: Sun Jul 28, 2013 5:16 pm
by kersing
Sorry, I made a mistake while moving the original thread. I'll include the information below:
siliconchip wrote:
hi i have bought a usb mini development board for a future project, the chip is a pic 18f4550 and comes with a bootloader program I am using flowcode 5 but cannot program the pic without additional code to tell my program not to start at 0x0000 but at 0x0008 I believe, can anyone show me what I would need to add to my program to start after the bootloader program, I now realise that I should of bought an ECIO from matrix as I believe that I would over come this problem within flowcode by choosing ECIO in the target section, but now ive bought this i need help to get up and running
dazz wrote:Hi siliconchip
try this thread viewtopic.php?f=5&t=1054&hilit=code+offset+chip
Regards
Dazz
siliconchip wrote:
hi dazz I added "-rb 0x800" at the beginning of the linker/assembler tex in compiler options as per the link but still will not compile to hex,
dazz wrote:
Hi Siliconchip
have you got a link to the bootloader or chip you are using please as it may need a different start address
Regards
Dazz
Re: PIC 18F4550 WITH BOOTLOADER
Posted: Sun Jul 28, 2013 5:17 pm
by kersing
siliconchip wrote:I added "-rb 0x800" at the beginning of the linker/assembler tex in compiler options as per the link but still will not compile to hex,
Are you implying the code does not compile? Adding the option will not fix compilation issues. Could you post the output with the errors?
BTW, I moved this question to the Flowcode 5 forum. "Programming Tips & Tricks" is to share your tips, not to ask questions.
Re: PIC 18F4550 WITH BOOTLOADER
Posted: Sun Jul 28, 2013 5:27 pm
by siliconchip
apologies for putting in the wrong section the simple code ive written just to try and program the board compiles to hex and works on my hardware but when trying to program the usb HID board (pic 18f 4550) it fails to do so due to bootloader issues I believe I added the above in the linker file to try and get my program to jump past the bootloader program in the chip so my program would run
Re: PIC 18F4550 WITH BOOTLOADER
Posted: Sun Jul 28, 2013 5:28 pm
by kersing
The correct switch for this board would be "-rb 0x1000" as page 6 specifies the application code should start at 0x1000. Take into consideration you should not program any of the chip settings, but you should configure them correctly (values as set for the boot loader) in your flow chart to make sure your program works correctly. (Clock settings are very important as delays are calculated based on them)
Re: PIC 18F4550 WITH BOOTLOADER
Posted: Sun Jul 28, 2013 5:30 pm
by kersing
siliconchip wrote:apologies for putting in the wrong section
No problem.
siliconchip wrote:
the simple code ive written just to try and program the board compiles to hex and works on my hardware but when trying to program the usb HID board (pic 18f 4550) it fails to do so due to bootloader issues I believe
Does the programmer recognize the board? If not earlier attempts with incorrect addresses could have damaged the boot loader. Same goes for incorrect chip settings btw.
Re: PIC 18F4550 WITH BOOTLOADER
Posted: Sun Jul 28, 2013 5:33 pm
by siliconchip
I have added my simple flowchart
Re: PIC 18F4550 WITH BOOTLOADER
Posted: Sun Jul 28, 2013 5:34 pm
by siliconchip
my pc recognises the board
Re: PIC 18F4550 WITH BOOTLOADER
Posted: Sun Jul 28, 2013 5:47 pm
by kersing
siliconchip wrote:my pc recognises the board
Does the Microchip programming software also recognize the board?
Re: PIC 18F4550 WITH BOOTLOADER
Posted: Mon Jul 29, 2013 11:45 am
by siliconchip
I am using a HID bootloader for windows application software and yes it recognises the board
Re: PIC 18F4550 WITH BOOTLOADER
Posted: Tue Jul 30, 2013 10:27 am
by kersing
Could you try loading the attached file using the HID bootloader software?
Re: PIC 18F4550 WITH BOOTLOADER
Posted: Tue Jul 30, 2013 10:59 am
by siliconchip
hi kersing I have loaded the boot loader test hex into the board and I now have RD2 led flashing at about 2Hz, it loaded with no problems, did you write this using flow code ?
Re: PIC 18F4550 WITH BOOTLOADER
Posted: Tue Jul 30, 2013 11:19 am
by kersing
It is your program
I just opened "Build"->"Compiler Options"->TAB "Linker / Assembler" and added "-rb 0x1000 " (without the quotes) at the start of the parameters before "-ld". Then choose "Build"->"Compile to HEX" (or use the arrow with 11001 icon on the toolbar) to compile...
Re: PIC 18F4550 WITH BOOTLOADER
Posted: Tue Jul 30, 2013 12:43 pm
by siliconchip

in previous attempts I did add -rb 0x1000, but I DID add the quotes so then it seems that maybe this was the problem just to make sure i have written and compiled another simple code to get both LEDs on the board to flash and all is well thanks to all who helped and a big thank you to you jac