#twatch network firmware upgrades

Posted on Saturday, November 7th, 2009 in #twatch by Ian


See the latest version on the documentation wiki.

The #twatch can be updated from a PC on the local network thanks to Microchip’s network bootloader. Bug fix updates, new features, and alternate functions can be programmed into the #twatch using the bootloader. The 18F ethernet PICs can only be programmed an average of 100 times, so upgrades are somewhat limited.

This guide is taken from the main #twatch article. Read about the update procedure after the break.

If you’re using a brand new chip you’ll need to program the bootloader into the PIC18F67J60 through the ICSP header, then you can upload the #twatch firmware over the network. Program twatchv2-bl-vxx.HEX into the chip with a PIC programmer like an ICD2 or PicKit.


When the #twatch powers on, the bootloader runs before the main program starts. The bootloader checks for a connection between the PGD and PGC pins of the programming header, shown in the image above. If it finds a connection, the bootloader takes over and waits for new firmware to be uploaded.

There’s a very minor chance that the bootloader will accidentally start even without a jumper between the PGC and PGD pins. This won’t damage the #twatch, just disconnect the power supply and try again. Accidental bootloader entry can be prevented by moving the jumper over one position so it connects the PGD and GND pins.


The #twatch bootloader uses the IP address and subnet mask Your computer must also have an IP address that begins with to communicate with the #twatch. We chose the range because it’s a common default for home networks. If your computer uses another IP address range, you’ll need to temporarily adjust it before you can do the update.

How to upgrade:

  1. Ensure your PC is in the same IP range and subnet as the #twatch. Your PC should have an IP address in the range, and a subnet mask of The default #twatch bootloader IP address is, make sure that no other computer connected to the same router already uses this address.
  2. Unplug the #twatch power supply.
  3. Put a jumper between the PGC and PGD pins.
  4. Plug in the network cable, if necessary, and plug in the power supply. The screen may be blank, have solid blocks, or garbage.
  5. Use a TFTP utility to send the new firmware to the #twatch IP address, we use TFTP.exe from the Windows command line.
  6. The TFTP update reports success or error.
  7. Unplug the power supply, remove the update jumper.
  8. Plug the power supply back in. The #twatch should start scrolling tweets. If the bootloader starts instead, put a jumper between the PGD and GND pins and try again.
This entry was posted on Saturday, November 7th, 2009 at 8:40 am and is filed under #twatch. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recent Comments

  • Joe Desbonnet: Ya, I can recommend the low melting point solder. I used brand 'ChipQuik' and it's amazingly easy to use.
  • Jerome: I need a new BusPirate for the Fablab ;) Many thanks!
  • Max: Seems like an unexpectedly violent way to remove the chip indeed. A hot air station should of course do the job just fine, but in...
  • jose: Part removal described here is pure butchery, the cheapest hot air station will do a fast and clean job removing the QFP, heat air to...
  • Cody: Yes please