ZPL: a Zero Pin Loader for the PICmicro 18F family

Mad Dash for Flash Cash project nr M285

(c) 2002 author

all rights required by the Mad Dash for Flash Cash contest granted, including the right to extract a 'code snippet' from the code for publication as part of the abstract

 

ABSTRACT

This bootloader for the PICmicro 18F series avoids the use of I/O pins by exploiting the /MCLR pin as the only interface between the host PC and the PICmicro.

The interface between the PC serial port and the target uses just six components. One of these is the standard /MCLR pull-up resistor and two others are optional. Die-hards might even leave out two more resistors, leaving just a single transistor. The interface circuit can easily be put in a DB9 shell, with a DIP clip for the connection to the target.

Clearer versions of the schematics are avaiable in the full entry. (Download full entry)

For most development environments the use of this bootloader is totally transparent, the only limitation being that the highest 384 instructions are not available to the application. The bootloader puts a jump to its own code at the first addresses, but the application's code for these addresses is relocated to a location within the bootloader so these instructions appear to be available to the application.

The host PC software is written in Python so it runs on Windows and Linux (and other POSIX-compatible systems), and can be easily ported to other operating systems.

The download time for a full 18F452 (32 k instructions minus the 384 for the bootloader) is clocked at 70 seconds. A small program downloads in just a few seconds.