Latest version: http://www.microchipc.com/PIC16bootload/16F87xA/.
The Code Download Kit consists of a bootloader and a downloader. The bootloader resides in the PIC micro and the downloader is a Win32 PC application. After initial, and one time only, programming of the booloader into the PIC micro the downloader can be used to download/update the user's code into the PIC micro at any time and in-circuit.
Once the bootloader has been programmed into the PIC micro using any PIC programmer, the downloader can subsequently be used to download new code (HEX files) to the PIC micro.
NOTE: If a user's code has been programmed and an update needs to be downloaded, the PIC micro has to be reset in order for the bootloader to run again. This usually means the user has to push a reset button on the PIC micro board or remove and re-apply power. In certain applications this procedure is not an option. in order to avoid such procedure the downloader sends a command byte to the PIC micro which interprets it as a "reboot command" causing the bootloader to run again and therefore avoiding the need of a manual reset. The byte sent by the downloader is binary one (not the ASCII of the number one). The user should include code to recognize this "reboot command" in the PIC micro if this feature is required.
Simply download and save the CD2m.EXE (downloader) to your computer. There is no installation program since it's a standalone application which requires no additional support files.
Simply select the HEX file to download using the Browse button.
Select the Commport your computer will use for the download.
Select the Baudrate depending on the PIC micro clock speed (see below on the Bootloader section).
Select Start and look for messages on the window title bar. If download failed try again.
There is a specific bootloader for each PIC micro, 16F873, 16F873A, 16F876 or 16F876A. The frequency of the clock is also a factor. The baudrate has been selected to the maximum possible permitted by the clock frequency for faster downloads.
16F870
16F873 (compatible with 16F874 too)
16F876 (compatible with 16F877 too)
Custom frequencies
(such as 9.8342Mhz @ 9600bps) can be ordered
online for $US49.
Here are the programming PIC micro settings for the bootloader using Microchip's
MPLAB and Pro Mate II:
Setting | Value |
Oscillator | Depends on the application. (for resonator frequencies higher than 4MHz use HS). |
Watchdog Timer | Off (if On, must add support in your code) |
Power Up Timer | On |
Code Protect | Off |
Brown Out Detect | On |
Low Voltage Program | Disabled |
Data EE Protect | Off |
Flash Program Write | Enabled/Off (16F87xA) |
Background Debug | Disabled |
NOTE: If an universal programmer is used the same settings should apply. It may only be that are named slightly differently.
Many thanks to carlos.buelna@delphiauto.com
for this excellent piece of coding. Additional troubleshooting and 'A' rev hex
files added by shane@microchipc.com.