My Firmware Installation Notes For CVpal w/ATTINY84A EEPROM And MacOS (Catalina v15.10.7)
CVpal


I was unable to use the commercial program ATMEL STUDIO to install firmware on my CVpal and the ATTINY84A EEPROM

I kept getting errors when trying to use the Mutable Instruments recommended settings for the Fuses and Lock Bit

                   EFuse: 0xFF            HFuse:0xD6            LFuse: 0xDE            Lock Bit: 0x2F

I eventually gave up trying to use ATMEL STUDIO and finally succeeded by using the command line program called avrdude

Here are my notes showing how I finally made everything work
  ☑ Note: My examples use the AVRISP MKII programmer and the ATTINY84A EEPROM
                You may be able to use a different model programmer
                See programmer choices near the bottom of this webpage



 1) Copy the CVpal firmware HEX file (cvpal.hex) into your home directory - /Users/YourUserName


 2) Open the MacOS TERMINAL WINDOW app


 3) At the prompt, change to your home directory

        cd /Users/YourUserName


 4) Ensure that /usr/local/bin is in your path

        echo $PATH

        This is what mine looks like

             /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

        If /usr/local/bin does not appear in yours, you can add it easily by typing

             PATH=$PATH:/usr/local/bin
   
        ... then restart the TERMINAL WINDOW app


 5) Install homebrew and avrdude using these commands from the TERMINAL WINDOW

        ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null

        brew install avrdude

 
 6) Connect the 6-pin ribbon cable from your Programmer to the CVPal 6-pin header labeled "AVR ISP"
   * * * Ensure that the red stripe is oriented to Pin #1 on the 6-pin header * * *


 7) Connect one end of a USB cable to the AVRISP MKII programmer and the other end to your Mac
    (This is needed to supply power and also to send data to the AVRISP MKII programmer)


 8) Connect one end of a USB cable to the front of the CVPal and the other end to your Mac
    (This is needed to supply +5V power to the ATTINY84A EEPROM)


 9) I used the commands shown in the CVpal Assembly Manual located in the firmware section. I changed PROGRAMMER_NAME to avrispmkII

        avrdude -V -p t84 -c avrispmkII -P usb -B 10 -e -u -U efuse:w:0xff:m -U hfuse:w:0xd6:m -U lfuse:w:0xde:m -U lock:w:0x2f:m

        avrdude -V -p t84 -c avrispmkII -P usb -B 1 -U flash:w:cvpal.hex:i -U lock:w:0x2f:m


10) If you don't see any error messages, unplug the programmer from the 6-pin header


11) To test it, run a MIDI sequencer or other MIDI utility (Ableton, MIDITrail, etc...) and select CVpal as the main MIDI OUT device


MISCELLANEOUS AND TROUBLESHOOTING INFO

CVpal
AVRISP_MKII

This is the hardware programmer I used - USB AVRISP MKII

If you get a "Programmer can not be found" error, this might be a useful command to use
   avrdude -c abc123
avrdude: Can't find programmer id "abc123"
It spits out an error message but at the same time it also lists all of the available programmers which the avrdude utility supports. The examples I used above worked with my USB AVRISP MKII programmer. See if yours is on the list below

Valid programmers are:
2232HIO          = FT2232H based generic programmer
4232h            = FT4232H based generic programmer
arduino          = Arduino
arduino-ft232r   = Arduino: FT232R connected to ISP
atmelice         = Atmel-ICE (ARM/AVR) in JTAG mode
atmelice_dw      = Atmel-ICE (ARM/AVR) in debugWIRE mode
atmelice_isp     = Atmel-ICE (ARM/AVR) in ISP mode
atmelice_pdi     = Atmel-ICE (ARM/AVR) in PDI mode
avr109           = Atmel AppNote AVR109 Boot Loader
avr910           = Atmel Low Cost Serial Programmer
avr911           = Atmel AppNote AVR911 AVROSP
avrftdi          = FT2232D based generic programmer
avrisp           = Atmel AVR ISP
avrisp2          = Atmel AVR ISP mkII
avrispmkII       = Atmel AVR ISP mkII
avrispv2         = Atmel AVR ISP V2
buspirate        = The Bus Pirate
buspirate_bb     = The Bus Pirate (bitbang interface, supports TPI)
butterfly        = Atmel Butterfly Development Board
butterfly_mk     = Mikrokopter.de Butterfly
bwmega           = BitWizard ftdi_atmega builtin programmer
C232HM           = FT232H based module from FTDI and Glyn.com.au
c2n232i          = serial port banging, reset=dtr sck=!rts mosi=!txd miso=!cts
dasa             = serial port banging, reset=rts sck=dtr mosi=txd miso=cts
dasa3            = serial port banging, reset=!dtr sck=rts mosi=txd miso=cts
diecimila        = alias for arduino-ft232r
dragon_dw        = Atmel AVR Dragon in debugWire mode
dragon_hvsp      = Atmel AVR Dragon in HVSP mode
dragon_isp       = Atmel AVR Dragon in ISP mode
dragon_jtag      = Atmel AVR Dragon in JTAG mode
dragon_pdi       = Atmel AVR Dragon in PDI mode
dragon_pp        = Atmel AVR Dragon in PP mode
flip1            = FLIP USB DFU protocol version 1 (doc7618)
flip2            = FLIP USB DFU protocol version 2 (AVR4023)
ft232r           = FT232R Synchronous BitBang
ft245r           = FT245R Synchronous BitBang
jtag1            = Atmel JTAG ICE (mkI)
jtag1slow        = Atmel JTAG ICE (mkI)
jtag2            = Atmel JTAG ICE mkII
jtag2avr32       = Atmel JTAG ICE mkII im AVR32 mode
jtag2dw          = Atmel JTAG ICE mkII in debugWire mode
jtag2fast        = Atmel JTAG ICE mkII
jtag2isp         = Atmel JTAG ICE mkII in ISP mode
jtag2pdi         = Atmel JTAG ICE mkII PDI mode
jtag2slow        = Atmel JTAG ICE mkII
jtag3            = Atmel AVR JTAGICE3 in JTAG mode
jtag3dw          = Atmel AVR JTAGICE3 in debugWIRE mode
jtag3isp         = Atmel AVR JTAGICE3 in ISP mode
jtag3pdi         = Atmel AVR JTAGICE3 in PDI mode
jtagkey          = Amontec JTAGKey, JTAGKey-Tiny and JTAGKey2
jtagmkI          = Atmel JTAG ICE (mkI)
jtagmkII         = Atmel JTAG ICE mkII
jtagmkII_avr32   = Atmel JTAG ICE mkII im AVR32 mode
lm3s811          = Luminary Micro LM3S811 Eval Board (Rev. A)
mib510           = Crossbow MIB510 programming board
mkbutterfly      = Mikrokopter.de Butterfly
nibobee          = NIBObee
o-link           = O-Link, OpenJTAG from www.100ask.net
openmoko         = Openmoko debug board (v3)
pavr             = Jason Kyle's pAVR Serial Programmer
pickit2          = MicroChip's PICkit2 Programmer
ponyser          = design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts
siprog           = Lancos SI-Prog <http://www.lancos.com/siprogsch.html>
stk500           = Atmel STK500
stk500hvsp       = Atmel STK500 V2 in high-voltage serial programming mode
stk500pp         = Atmel STK500 V2 in parallel programming mode
stk500v1         = Atmel STK500 Version 1.x firmware
stk500v2         = Atmel STK500 Version 2.x firmware
stk600           = Atmel STK600
stk600hvsp       = Atmel STK600 in high-voltage serial programming mode
stk600pp         = Atmel STK600 in parallel programming mode
ttl232r          = FTDI TTL232R-5V with ICSP adapter
tumpa            = TIAO USB Multi-Protocol Adapter
UM232H           = FT232H based module from FTDI and Glyn.com.au
uncompatino      = uncompatino with all pairs of pins shorted
usbasp           = USBasp, http://www.fischl.de/usbasp/
usbasp-clone     = Any usbasp clone with correct VID/PID
usbtiny          = USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
wiring           = Wiring
xplainedmini     = Atmel AVR XplainedMini in ISP mode
xplainedmini_dw  = Atmel AVR XplainedMini in debugWIRE mode
xplainedpro      = Atmel AVR XplainedPro in JTAG mode


For detailed reference, this is the session I captured from my Terminal Window showing the successful firmware installation

llamamusic$ avrdude -V -p t84 -c avrispmkII -P usb -B 10 -e -u -U efuse:w:0xff:m -U hfuse:w:0xd6:m -U lfuse:w:0xde:m -U lock:w:0x2f:m
                                                                                                                                            
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e930c (probably t84)
avrdude: erasing chip
avrdude: reading input file "0xff"
avrdude: writing efuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of efuse written
avrdude: reading input file "0xd6"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of hfuse written
avrdude: reading input file "0xde"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of lfuse written
avrdude: reading input file "0x2f"
avrdude: writing lock (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of lock written
avrdude done.  Thank you.


llamamusic$ avrdude -V -p t84 -c avrispmkII -P usb -B 1 -U flash:w:cvpal.hex:i -U lock:w:0x2f:m

avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e930c (probably t84)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "cvpal.hex"
avrdude: writing flash (7908 bytes):
Writing | ################################################## | 100% 0.85s
avrdude: 7908 bytes of flash written
avrdude: reading input file "0x2f"
avrdude: writing lock (1 bytes):
Writing | ################################################## | 100% 0.02s
avrdude: 1 bytes of lock written
avrdude: safemode: Fuses OK (E:FF, H:D6, L:DE)
avrdude done.  Thank you.

BACK_TO_EUROCRACK    BACK_TO_EUROCRACK

The Information On This Page Is Current As Of


llamamusic.com