Page 1 of 1

USB Bootloader for PIC18F2455/2550/4455/4550

Posted: Tue May 30, 2017 4:41 pm
by paulm
Hi,

I want to design a small PCB board using one of the PICs (PIC18F2455/2550/4455/4550) that uses USB comms to interface to a PC application.

I also would like to use a bootloader so I could reprogram the PIC18F device so that I don't need an external programmer to update the code.

Has anybody done this and if so could they please advise the steps to take?

Thanks,
Paul

Re: USB Bootloader for PIC18F2455/2550/4455/4550

Posted: Tue May 30, 2017 6:22 pm
by EtsDriver
I once looked into this but my head blew after few attempts... Basically you would need to create a bootloader that:

Initializes and checks it's own bootloading code (that were good to go).
Brings USB up,waits for knok, if nobody is knoking, closes USB and starts user application.
If someone knocks, take all data input for the new firmware to certain region (i used extrenal battery backed up SRAM to save this),then interface checks the code against provided checksum and if it matches, starts the reprogramming process. I managed to do the things until i was faced with the how to reprogram memory-areas... I looked for the "save variables to flash" things but seemed to not be able to get it working.

Unfortunately after i did some cleaning of those "unfinishable" projects folder, i seem to have lost the code's for that. :/

Re: USB Bootloader for PIC18F2455/2550/4455/4550

Posted: Tue May 30, 2017 6:34 pm
by kersing
Microchip provides C sources for boot loaders as part of their Microchip Libraries for Applications

Re: USB Bootloader for PIC18F2455/2550/4455/4550

Posted: Tue May 30, 2017 6:37 pm
by QMESAR
If you are interested in using a PIC18F2550 you can use the ready made boot-loader from mE see this page
https://shop.mikroe.com/development-boa ... artusb/pic