3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Twitter Watcher, the #twatch

Step 5Bootloader for network firmware upgrades

Bootloader for network firmware upgrades
The #twatch can be updated from a PC on the local network thanks to Microchip's internet bootloader. Remember that the 18F ethernet PICs can only be programmed an average of 100 times, so upgrades are somewhat limited. We've yet to burn out a chip, but we only reached about 55 cycles during development.

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 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 the most common default for home routers. If your computer uses another IP address range, you'll need to temporarily adjust it before you can do the update.

How to upgrade:

  • 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.
  • Unplug the #twatch power supply.
  • Put a jumper between the PGC and PGD pins.
  • Plug in the network cable, if necessary, and plug in the power supply. The screen may be blank, have solid blocks, or garbage.
  • Use a TFTP utility to send the new firmware to the #twatch IP address, we use TFTP.exe from the Windows command line.
  • The TFTP update reports success or error.
  • Unplug the power supply, remove the update jumper.
  • 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.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
128
Followers
30
Author:ian(DangerousPrototypes.com)