Reseting Orangutan?

So, this morning I was trying to program my Baby Orangutan with a custom written program for driving a stepper motor. I was tapping power for the orangutan off of a USB port(I didn’t have any batteries on hand). Because the program was switching the Motor Driver so much it was heating up, so when I went back to the computer to make code adjustments I would unplug it so It did not fry the Orangutan. I was using a Pololu USB Programmer under Debian Linux. It had programmed 5 or 6 times just before that with 100 percent success. When I started programming it, I realized I had the BABY-O Unplugged from the Power USB Port, and immediately plugged it in. I had read somewhere that If you program it while its off it will damage the Fuse Bits. As soon as I plugged it back in the program failed, and has not been able to program since then.

Is there a way to reset the ATmega168 to factory defaults to cure any Fuse Bits it may have messed up, or to you guys have any idea what I should do to fix it?

Thanks,

Alex

Hello.

Can you still talk to the programmer? Can you read the device signature of your Baby Orangutan? What error messages do you get when you try to program it?

The only thing I can really suggest at this point is you decrease the ISP frequency of the programmer to one of its two lowest settings (603 Hz or 4 kHz) and try to read the Orangutan’s device signature. The Orangutan USB Programmer user’s guide explains how to do this with AVR Studio.

- Ben

For a bare chip, there are a couple of options. One of the better ones is to use HV programming, which can be done off of a STK500 or AVR-Dragon without too much hair-pulling. I haven’t checked which pins HVPROG uses on the 168, so I don’t know if this would be possible on the Baby-O. But my guess is it would since almost all the I/O pins come out to headers on the Baby-O.

But depending on which fuses are doinked, it could be a lot more simple than that. On the Orangutan, if the fuses get set to use an external high speed crystal, a fix is to stick a crystal across the rightmost I/O pins. The Baby-O has a 20MHz crystal on it, so if the fuses get set wrong the worst that should happen is it uses the internal RC oscillator, so yeah, doing exactly what Ben said should get you back inside the speed range of the programmer.

Hope some of this helps. Please do keep us posted. It’s nice to have fixes all lined up just in case…

Best of luck!

Tom

My Programmer works fine, as it programmed my Orangutan(The Regular one) perfectly. I do not have access to a Windows computer right now, and I do not beleive Atmel make a version AVR studio for linux.

How would I go about reading the device signature?

When I try to program it it gives me the following feedback:

/usr/bin/avrdude -c avrispv2 -p m16 -P /dev/ttyUSB0 -e

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

make: *** [program] Error 1

I know all of my connections are good, and as I said before it programs my other Orangutan fine.

Thanks,

Alex

avrdude automatically reads the device signature when it tries to program a device, so it would probably work equally well for you to send a chip-erase commnad like in your post above. One thing I notice about your command example is that it’s set for a mega16 (-p m16) rather than a mega168 (-p m168), but this wouldn’t be causing the problems you’re having right now. I’m pretty sure you can change the programer’s ISP frequency using avrdude, but I don’t know how; I’d suggest looking through the avrdude user manual. Your first step should be to try to lower the ISP frequency in case you’ve accidentally set the fuse bits to use the internal RC oscillator.

- Ben

OK, I tried all of the ISP frequencys, and none of them were able to read the device signature. I used AVR Studio to do this.

Can you tell me what error message you get when you try to read the device signature? Is it that you are unable to enter programming mode or is it that the device signature you read is incorrect? Did you remember to click the “write” button after changing the ISP frequency in the drop-down list?

- Ben

Sorry it took so long for me to respond. I get an error that I cannot enter programming mode. Also, I did remember to click the write button.

Thanks for your help,

Alex

Hello.

It would appear that a fuse bit got changed in a way that makes the Baby Orangutan unprogrammable by the Orangutan USB programmer. If you are interested in returning your Baby Orangutan for free repair or replacement, please contact us for return instructions.

- Ben