FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 

Flashing Attiny84 on a CVPal
MUFF WIGGLER Forum Index -> Music Tech DIY  
Author Flashing Attiny84 on a CVPal
The following procedure has been tested on some "pre-programmed" Attiny84s on some Kit from Thonk...(I have built different .hex files for the CVPals in order to be seen on the same computer with different names...basically following Gillets instructions here:

avrdude -V -p t84 -c usbasp -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 usbasp -P usb -B 1 -U flash:w:cvpaw.hex:i -U lock:w:0x2f:m

the first command is OK, the last command, on a "virgin" Attiny, asks:

avrdude: safemode: lfuse changed! Was 62, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: hfuse changed! Was df, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: efuse changed! Was ff, and is now 0
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: Fuses OK (E:FF, H:dF, L:62)

and of course, the unit doesn't work...

If I answer "y" to any of these questions, it hangs forever and give s an error at the end, then the Attiny doesn't respon anymore ( I have already bricked 3...)

What's the matter and what am I doing wrong? Is there something "special" that needs to be done on a "virgin" Attiny84???
do you know what you've changed the fuses to? it'll brick if theres any kind of error in the values, it won't work if it's expecting an external clock value and there is none etc
I got it working by specifying again ALL fuses in the second step, like:

avrdude -V -p t84 -c usbasp -P usb -B 1 -U flash:w:cvpaw.hex:i -U efuse:w:0xff:m -U hfuse:w:0xd6:m -U lfuse:w:0xde:m -U lock:w:0x2f:m

now I have 4 CVPals with different names on my Mac ;-)
This could be really handy to add CV/Gate to any vintage synth and have it as a USB-MIDI device on your PC/Mac, renamed to anything you want... ;-)

the "first" procedure worked perfectly on preprogrammed Kits and Chips ordered from Thonk, I needed the second on some virgin chinese chips...who knows?
the chips from thonk most likely had the fuses set already (there are also some default settings, internal clock, divide clock by 8 switched on i think)
AVR ship them set for internal RC 8Mhz clock with divide by 8. So the default for them is 1Mhz and the reset pin active. That way they can always be programmed by 6pin ISP, but the program speed mustn't be faster than 1/4 of the clock - so 250Khz. See the image below.

There are a few mistakes you can make when setting the fuses.

You set for an external clock/xtal in which case the chip is a brick until supplied such.
You made a change that disabled the reset pin in favour of an i/o or debug function. ISP must have control of the reset and can't see the chip without it.

A chip blocked from ISP can still be programmed via either HVserial (8pin) or HV parallel programmers.

A more fully featured programmer such as an AVR Dragon can do all of the necessary programming method for the AT Mega and Tiny.

Even though AVRdude is under the hood of many programming environments, the command line interface scares the living daylights out of me. I've used a Dragon via AVRstudio4 from the start and you get a better visual approach to the fuse settings.
MUFF WIGGLER Forum Index -> Music Tech DIY  
Page 1 of 1
Powered by phpBB © phpBB Group