Login - Register -

PIC 16F1455 Bootloader

Out of the box the only way to program a PIC microcontroller is via one of the programming devices that microchip make, eg the pickit3.

In order to remove that cost from our members, we have produced a small bootloader program, which once installed on your device, allows you to reprogram the device using just a serial port (or usb serial dongle). The devices in your starter kit come with this already installed. It takes up just a couple of hundred words of memory (of the 8K words available).

If anyone wishes to build this and install it on their own devices, you can download the source for both the desktop component and the device firmware from our GIT Repository

You can download the desktop software (command line) below:

Firmware, use a traditional programming device to install this:

The firmware requires the default serial port pins be used, and defaults to enabling the MCLR/reset pin. To enter bootloader mode, the PC holds the PICs RX line low during reset. You may reuse this pin in your program as long as it is not being held low during a reset.

Wiring the Circuit

To be able to program a 16F1455 you need to connect the USB serial board as follows:

  • Pin 1 Vdd - Connect to 5v power
  • Pin 14 Vss - Connect to Gnd
  • Pin 6 RC4/TX - Connect to Rx
  • Pin 5 RC5/RX - Connect to Tx
  • Pin 4 MCLR - Connect to Gnd via a Button (optional)

Using the bootloader

Once you have wired up your chip as above, and you have built your software project in MPLAB-X (you can usually find the hex file as myproject.X/dist/default/production/myproject.X.production.hex

  1. Connect chip to USB serial
  2. Plug USB serial in (ensuring you have any drivers you need installed)
  3. run: boot -v myproject.hex
  4. software will prompt you to reset the chip
  5. press reset button on your dev board
  6. software will print chip type and program it
  7. device will reset and immediately run your program

Troubleshooting

The boot program will default to /dev/ttyUSB0 (linux/macos) or COM4 (windows), if this is not correct then use the -p option to specify the correct port your system has assigned to the usb serial board.

If the comms port is correct but you still have issues, you can try the -i option which only reports the chip id then disconnects, and the -d optin which will print detailed debugging of what it is trying to do.

- Last change November 05, 2013, at 10:18 AM
- Registered in England and Wales 08777436