Categories

#twatch network firmware upgrades

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

bootload

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.

bootloader-pin

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.

bootload

The #twatch bootloader uses the IP address 192.168.1.123 and subnet mask 255.255.255.0. Your computer must also have an IP address that begins with 192.168.1.xxx to communicate with the #twatch. We chose the 192.168.1.xxx 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 192.168.1.xxx, and a subnet mask of 255.255.255.0. The default #twatch bootloader IP address is 192.168.1.123, 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

  • Edward Mallon: While I loved the Nokia 5110 LCD's readability in full sun, the pressure sensitivity was a real problem for the underwater units. So I started...
  • ConnyCola: I like this article a lot! And in contrast to Max I love to hear what you guys are doing in Shenzen and Hong Kong....
  • Max: Thanks for the writeup, it's always interesting to read about a different culture. Other than that though I'm afraid I was spoiled by living neither...
  • Tepa: Heps keikkaa
  • Dan: Pick Me!!!