Updating firmware via ISP

Certain SSSR Labs modules have 6-pin connector named ISP (In-circuit Serial Programming). This connector can be used to update module’s firmware to the last released version. To do this you need an AVR ISP programmer.

Choosing a Programmer

There are a lot of different models on market with the price tag starting from few dollars/euro. Unlike professional audio, serial programmers are very easy to build these days. Below is a short list of the most famous and tested programmers for a various price. Get the cheapest one if you only need to update some eurorack module from time to time. Get an Arduino if you have programming skills. If you need to program or read anything else besides AVR, (EPROMs, EEPROMs, PIC etc), get the TL-866 for that and USBtinyISP just for ISP updating: you will not be disappointed. We recommend using avrdude as a programming application. There are values in brackets (e.g. [avrisp]) next to each name. The corresponding value should be used as a command line parameter (or a GUI application parameter) specifying the type of connection and protocol.

USBASP ($3) [usbasp] — open source cheap USB dongle with 10-pin header. Must be supplied with cable and a 10 to 6 pin ISP adapter. Available from eBay, Ali Express, Amazon and almost every geek electronics store. The main disadvantage — this is the slowest programmer available on market, but for rare updates, it’s enough. (Buy from eBay)

Arduino UNO R3 ($8 for clone) [avrisp] — the most famous ATMEGA328p development board with its own IDE. Can be used as an STK-500 compatible programmer. As a bonus, you may have fun building Arduino projects if you want to. (Buy from eBay) You will need 6 Male to Female Dupont wires at least 20 cm long to connect it to a module. (Get cables from eBay) Also you need to upload a special Arduino sketch to this board. Read any tutorial on ArduinoISP.

USBtinyISP V2 ($13) [usbtiny] — An affordable open source STK-500 compatible programmer. Has many different versions from Adafruit and other branded and no-name manufacturers. (Buy from Amazon)

AVR ISP MK II ($20–$40) [avrisp2] — the official USB programmer architecture fully compatible with Atmel STK-500. It has just one advantage over cheaper programmers: it’s fully compatible with Atmel AVR Studio, but this is important only for developers who use AVR Studio.  (Buy from Amazon) If you’re buying another clone, make sure that it has a 6-pin connector or equipped with 10 to 6 pin adapter.

TL-866A ($60—$80) — a professional grade universal parallel programmer with its own graphical programming application for Windows. The A version has an ICSP connector that can be used for programming using female-female Dupont wires, but this is not a very comfortable way, so it’s not recommended for rare ISP-only programming but highly recommended for everyday programming directly to pulled-off chips (Buy from eBay)

Updating fusebits of Matrixarchate 1.0

Before updating firmware for Matrixarchate from version v.1.0 you absolutely need to update hfuse fuse-bit. It’s value must be 0xD7 (SPIEN and EESAVE bits set to 0). If you not do this, user memory (EEPROM) will be erased each time you update the firmware and module will be inoperable until you upload the stock EEPROM. If you’re using MacOS, AVRFuses will update fuse easily. If you’re using WIndows, you need to create file named e.g. updatefuse.cmd, containing the following code:

@echo off
avrdude -c avrisp -p ATMEGA328P -P COM5 -U hfuse:w:0xd7:m

Parameters -c avrisp and -P COM5 depends on particular programming device and IO port. They are the same as for avrdudeGUI.

Once you’ve updated the fuse-bit, you can update the firmware as frequently as you need.

Programming in MAC OS X

  1. Download and install CrossPack-AVR and AVRFuses
  2. Download the archive with the firmware and extract it to a known location on your local drive.
  3. Insert your programmer and wait for a minute while drivers are being automatically installed.
  4. Detach the module from your Eurorack, and connect the ISP header to the programmer.
  5. Run AVRFuses, Select File→Preferences (⌘,) and set the following parameters:
    • Path to avrdude: the path where the Crosspack was installed (it probably will be /usr/local/bin/avrdude or /usr/local/CrossPack-AVR-20131216/bin).
    • Programmer: the value suitable for your programming device (usbasp, avrisp, avrisp2, usbtiny or else)
    • Port: the serial port corresponding to device you’ve just plugged in (usb, tty.usbmodemXXXXX for usb/serial programmers and usbasp/empty value for USBASP)
    • Baud Rate: do not change, normally it’s 115200, but maybe you will have to decrease this value to 38400 or even 9600 for USBASP. Try to play with this value if something goes wrong.
    • Bit Clock: 8
  6. In the main window, select ATmega328P
  7. To update the program, use Flash area, specify the location of the suitable .hex file and press the Program button.

Programming in Windows

  1. Download AVRDude GUI and extract to a known location on your local drive.
  2. Download the archive with the firmware and extract it to the same folder where avrdude is located.
  3. Install drivers for your programmer if needed and connect it to your USB port. Wait for a minute to complete the device recognition, then remove it from the port.
  4. Detach your module from the rack and connect the ISP header to the programmer.
  5. If you’re using USBASP or AVRISP MKII, just skip this step and insert your programmer already. If you’re using old STK500, AVRISP, Arduino or other USB-serial based programmer, you need to determine the name of the virtual serial port associated with it. To do this, open Device Manager (Win+R, “devmgmt.msc”) and see for a group entry named “Ports (COM & LPT)”. Expand it and remember existing COM ports. Now connect your programmer to USB and watch for a new entry appeared. It may be commented with a readable name, but all you need is the numbered port name: (e.g. COM5)
  6. Run the avrdudeGUI application
  7. In the Setup tab, select the interface suitable for your programmer and the port you’ve just determined in step 5 (usb, COMxx or usbasp for USBASP)
  8. In the Programming tab select ATMEGA328P as the Target Device. Make sure that the “Verify after programming” checkbox is enabled and file format is Intel Hex.
  9. Specify the location of the .hex file in “FLASH” pane and press the Program button.