Saturday, March 2, 2013

USB project disabled future ISP-programming


As part of my newly started USB-to-serial project I wanted to put my new programmer to use. While the family and I watched Harry Potter I found, a very nice little project with very little hardware demands. It is based on a ATtiny85 and uses 2 zener diods and a few resistors to do all sorts of cool things with USB. Since It also could be loaded with the cdc232 USB to serial firmware I fought it might be a good start for the project.

Well I connected the circuit from

Zenerdiods, USB breakout, resistors and a ATtiny85.
Then I used the new programmer to program the circuit with the firmware. After installing the driver it enumerated correctly as a USB device. Then I wanted to use the firmware-boot-loader to upload the CDC232 code but since I have a 64 bit OS it did not work...

Shame to the one who gives up easily! 

I reconnected my programmer and tried to program it again, no response. The avrdude replies -1 check connections or something similar. After checking the connections a few times and even testing the programmer on another MCU and testing another programmer on the same ATtiny85. I started to suspect something was wrong with the ATtiny85 chip.
Testing the programmer on another MCU a ATtiny25
When I burned the bootloader onto the chip I used the following line from the file:
avrdude -c usbtiny -p t85 -C -U flash:w:combined.hex -U lfuse:w:0xe1:m -U hfuse:w:0x5d:m -U efuse:w:0xfe:m
Using the fuse calculator that I learned about from Lady Ada Fuse tutorial. I realized that the "Reset Disabled (Enable PB5 as i/o pin); [RSTDISBL=0]" fuse was enabled and that effectively stops any further programming using ISP. Or as Lady Ada puts it
"I would suggest you never set this fuse unless you really mean to." -
Not that it really is a bad thing, the "littlewire" project needs its extra pin and I can always buy another MCU.

Something that I wonder about is if I had a high voltage programmer could I change the fuses then? And where can I get one of those. High voltage sounds cool, but I guess its only 12 V.

No comments:

Post a Comment