I have recently built an Erica Synth DIY System and needed to program the Atmega328P for the module.
A friend on a Facebook group suggested to use a "regular" Arduino Uno Board that uses an Atmega328, and swap it with the one I needed to program.
Cool, good idea, but the MIDI-CV firmware ony comes in .hex format, so you cannot load it into the Arduino IDE. But there's a workaround using avrdude and "spying" what the Arduino IDE does when uploading.

Here are the steps I followed to program the Atmega328 for Erica Synth MIDI-CV.

1) Find a suitable Arduino Uno Board (I had an original Uno lying around) like this:

arduino uno

2) Take the Atmega328 out and insert the one you need to flash

3) Connect thr Arduino Uno to your PC/Mac and start the Arduino IDE

4) Go to File -> Preferences and check "Show verbose output during upload"

5) Go to File->Examples->01.Basics->Blink, and press upload to run the Blink example

6) During uplopad, in the "black" screen of the Arduino IDE, you'll find an avrdude command. In my case it was something like this:

avrdude -C"C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega328p -carduino -PCOM6 -b115200 -D --Uflash:w:C:\Users\anton\AppData\Local\Temp\build53645577317443526.tmp\Blink.cpp.hex:i

7) Copy/Paste this command in a text editor (Notepad or Notepad++ will be ok)

8) Edit the command, replacing the parts between :w and :i in the -Uflash command, with the actual path to your Erica Synth MIDI-CV firmware (hint, it's easier if you are already located in the right folder). Something like this:

avrdude -C"C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega328p -carduino -PCOM6 -b115200 -D -Uflash:w:"C:\Users\Antonio\Dropbox\Modular\Erica Synth\OpenSOurce\diy-eurorack-master\Midi-CV DIY\Firmware\diy_midi_cv.hex":i  

9) Open a "command prompt" window (on Windows) or Terminal (on Mac). Paste the command and hit Enter to upload the code


I wasn't able to change fuses value using the Arduino Uno, but the MIDI-CV module seems to work anyway ;-)

Comments powered by CComment

If you find my FREE stuff useful, can I ask you for a small donation in exchange?


Contact me