BrushBot Comm board ISP programming

As I mentioned in my last post, I think ISP programming of the BrushBot Comm boards is the way to go.  What’s more, it should be possible to get double-duty out of an ArudinoISP based programmer and use it as a serial link for debugging.  This requires hacking the ArduinoISP sketch and setting up some sort of serial comm between the BrushBot Comm board and the ArduinoISP.

Since the tiny44 doesn’t have a UART, we could either use the SoftwareSerial library to big-bang serial on any pin, or we could make use of the SPI hardware support provided by the tiny44’s USI module.  The former is prone to timing problems, but is probably easier to setup.  The latter makes sense because the necessary SPI comm pins are the same as that used for ISP programming, and thus are already cabled, and the hardware comm support should reduce the flash and resource usage in the tiny44.  I’ve started down the SPI route and am adding USI SPI support to the BrushBot core that would more or less replicate the functionality of the HardwareSerial code found in the Arduino core.  This will allow “print” statements to work over SPI.

In order to do both the ISP programming and debug comm with a single device, we’ll need to use an Arduino rather than Atmel’s AVRISP.  I picked up a handful of cosmetically defective but fully functional Teensy 2.0‘s at Monday’s DorkBot at a very reduced price that will fit the bill.  If you need an Arduino to use for programming, then see me at Saturday or Monday’s meeting and get one for what I paid for it.


BrushBotComm Arduino support

Good news!  The latest version of Arudino (0018) makes it relatively easy to target the tiny44 we’re using on the BrushBotComm boards.   I’ll get the necessary files up tomorrow.  This update won’t include a bootloader though.  Given the limited program space of the tiny44, we’d be better off using ISP programming anyways, and obtaining a cheap ISP programmer just got a bit easier with the ArduinoISP example sketch include in Arduino 0018!

Also, if you have the smaller BrushBotComm board (w/o the transistors), hold off on installing the 5-pin programming header if it’s not too late already.  It turns out that a 6-pin header can be easily installed with the tail of the extra pin bent over such that it can be soldered to the V+ pin on either the switch or D5.  This will allow the small board to match the pinout of the big board, and allow either board to be powered by the programmer.  I’ll trade your 5-pin connectors for 6-pin connector the next time we meet.


Update 3/26/2010:
Arduino support code and instructions added here: brushbotcomm-board-software