My PIC bootloader

I wrote this bootloader for the 16f87x family of PIC microcontrollers, which are able to modify their program memory while running.  This code lets you download a file to a PIC using a serial port connection, rather than having to install hardware for in-circuit programming.  I based this bootloader on a similar program developed at Microchip and released by them as boot877.asm.

Note that to assemble this program, you will need the Microchip MPASM assembler and associated files, available from Microchip's web site.  (Though, as a serious robot builder, you no doubt already have MPASM installed...)  You will also need my library of PIC macros.

This code was written for use with the 16f873 device, which has 4K of program memory.  You can easily convert this program for use with larger devices by changing references to the device name and by moving the start of the program; the locations for these changes will be obvious in the source file.

This is a very small program, taking up only 512 bytes of program space.  Unfortunately, you will still need access to a PICStart Plus or other PIC programmer for burning this bootloader into an empty PIC.  Once done, however, you will no longer need the programmer.  You can use Hyperterm or any other comm program to do subsequent downloads of your PIC application code.  The bootloader protects itself against self-erasure, so you can't overwrite it with a download.

Full details on using this bootloader can be found in an article in the April 2001 issue of Nuts & Volts magazine.

Download PIC bootloader source files; this is a ZIP file.

My home page