gonium edited this page Jan 26, 2012 · 6 revisions

The HexaBus devices do not offer a simple ISP-style interface for programming - we use the much more powerful JTAG interface. You need a JTAG-capable programmer for this. We have successfully used these two devices:

  1. The Atmel JTAG ICE MK2. This is definitely a very professional programmer that can also program a lot of different chips. The drawback is its price point: at approx. 250 Euro, its not cheap. Stay away from the newer JTAG ICE MK3 - Atmel has not released its communication protocol, so it cannot be used with avrdude or any other free software.
  2. The Atmel AVR DRAGON. This is a cheap Atmel JTAG interface - it can be bought for around 50 Euro. It consists of a single PCB, so you need to add a USB cable and a 10-pin ribbon cable, but still its much cheaper than the JTAG ICE MK2. However, the devices are said to be sensitive to static electricity - see the mikrocontroller.net page (German) for an in-depth discussion.

Use JTAG to program the HexaBus Plug

The plug offers a combined JTAG- and Serial interface connector. It is the micromatch connector on the left side of the low voltage PCB. My deluxe development setup looks like this:

deluxe dev setup

It features a JTAG adapter and the serial interface, as described on the Hexabusplugserialinterface page. Both connectors are exposed on a small hand-soldered PCB. The schematic for this is simple:

jtag+serial adapter

Using AVRDude

The ATMega1284 can be programmed using the JTAG interface and avrdude. You can use

$ /usr/local/bin/avrdude -c jtag2 -P usb -p atmega1284p -U flash:w:Hexabus-Socket.hex -F 

to program the device. You need to consider two points here:

  1. The atmega1284 has currently no definition in the avrdude.conf. Fortunately, it is almost identical to the definition of the atmega1284p, but has a different device signature. Either you patch your avrdude.conf or use the -F paramater (as above). This will disable the signature check (but please be careful!)

  2. Make sure you use a recent version of avrdude. The hex file needs more than 16 bit for adressing, which is only implemented in newer versions of avrdude. I am using 5.10, which is working fine. See also [https://github.com/mysmartgrid/hexabus/issues/9] for an in-depth discussion.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.