Flashing Firmware in MI Branches

Guidelines for flashing the firmware in various versions of Mutable Instruments Branches.

There are multiple DIY versions of Mutable Instruments Branches (Bernoulli Gate). These include Jakplugg Twiigs, ST Modular Clanches and straight clones of MI Branches. The guidelines here show how to flash the firmware into these modules using a cheap and effective Pololu AVR Programmer.


Module: MI Branches, Jakplugg Twiigs or ST Clanches

Firmware: Use the Branches firmware (hex file) available from: https://github.com/Laminim/EURORACK/tree/master/CLANCHES
or the Twiigs alt firmware from https://github.com/jakplugg/Twiigs

WinAVR/AVRDUDE available from Sourceforge: https://sourceforge.net/projects/winavr/files/

ISP programmer: https://www.pololu.com/product/1300 and the configurator/drivers from the resources section of the above link, i.e. https://www.pololu.com/file/0J486/pololu-usb-avr-programmer-win-121114.exe

Getting it working.

Branches/Twiigs/Clanches use the atmega m99p processor, which needs to be specified at the avrdude command line using -p m88p. Available versions of AVRDUDE may reject the -p m99p switch due to not having the m88p option within the ‘avrdude.conf’ file. Once WinAVR/AVRDUDE is installed it’s possible to check for the m88p config by opening the ‘avrdude.conf’ file and searching for ‘m88p’ (as opposed to m88).

In Windows, the file might be at C:\WinAVR-20100110\bin\avrdude.conf

If the m88p config is missing in this file, you can make it by copying the whole m88 config section into a new m88p config, with the following changes written to the id, desc and signature lines within this (new) section:

id               = "m88p";
desc             = "ATMEGA88P";
signature        = 0x1e 0x93 0x0f;

See also: Lady Ada’s user guide for AVRDUDE: http://www.ladyada.net/learn/avr/avrdude.html

Flashing the firmware.

Use the windows command prompt or terminal. CD into the directory where the firmware hex file is located.

In Windows the command line is:

avrdude -c stk500v2 -p m88p -P COM3 -U flash:w:branches.hex:i

Check the COM port in Device Manager, it might not be COM3. The ‘i’ option tells AVRDUDE the firmware is a hex file. It’s also possible to add on a ‘-v’ parameter for verbose output during programming.

(In Linux this should work: $ sudo avrdude -c stk500v2 -p m88p -P /dev/ttyACM0 -U flash:w:branches.hex)

Further info on the use of this Pololu programmer is at https://www.pololu.com/docs/0J36/3.d

Additional notes & troubleshooting tips.

Very early versions of the pololu ISP use the AVRISPV2/STK500 protocol but if it’s a later one or manually upgraded to v1.6 firmware then the ISP device parameter must be set as stk500v2 (as shown above).

The ISP programmer does not deliver power to the target device – need to power it off the modular PSU.

In Clanches, the ISP and PSU header connectors are too close: the connectors cannot fit side-by-side, so stack some headers up to elevate one of the connectors.

Because the AVR m88p is a slow processor and the ISP must run at least 1/4 slower, you must use the Pololu configurator to set the ISP speed @ 200kHz.

In Linux if using the Pololu ISP, it works fine with drivers already in Linux but there is no Linux Pololu ISP configurator app, so the 200kHz ISP speed needs to be preset on the AVR ISP in windows first, using the Pololu configurator app.

This page is about the m88p. Here is a link to a pdf with notes on flashing the STM32 processors: http://modwg.co.uk/wp-content/uploads/2024/01/ST-Link-for-MI-and-Electrosmith-ISP.pdf