Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: bukowski on November 26, 2007, 07:41:26 PM

Title: Cant Program my ATMega8 again.
Post by: bukowski on November 26, 2007, 07:41:26 PM
Im a total noob and I am building the $50 robot and I am using the AVRISP Mk II programmer. When I went to program it with the .hex file to zero the servo's for modification, everything seemed fine. I told it to program the hex file into the flash mem and  use current simulator/emulator EEPROM mem (was that wrong?). When it was done programming the flash, it said that it couldnt read it back, but i could hear the servo move for a second. I erased it and tried it a few more times, with the same result. I disconnected everyting, and when I reconnect the battery to the board, the servo moves, but when I go into AVR studio again, it fails whenever it tries to go into programming mode. I cant erase it or anything.
I never downloaded WinAVR, was that wrong?
I double checked all my wiring, everything seems OK.
When i pulled the microcontroller from the breadboard and replaced it with a new one, everthing seemed to work again, (it erased OK), but I didnt want to fry this one too, it's my last one and I have to be done with this in two weeks.
Title: Re: Cant Program my ATMega8 again.
Post by: bukowski on November 26, 2007, 07:44:29 PM
mebbe I shouldve posted this in software. Whoops.
Title: Re: Cant Program my ATMega8 again.
Post by: HDL_CinC_Dragon on November 26, 2007, 10:25:00 PM
the servo jitter when you unplug/replug the battery is just from the noise of suddenly having power supplied to it.

When you bring up the little programming dialog box, go to the Board tab and set the frequency to 125.0kHz. See it if works now
Title: Re: Cant Program my ATMega8 again.
Post by: bukowski on November 27, 2007, 04:26:29 PM
Awesome, I think it worked. I did have to use my backup chip though, my first one isnt working at all - - mustve crossed wires somewhere.
Thanks a million for the help.
-Buk
Title: Re: Cant Program my ATMega8 again.
Post by: HDL_CinC_Dragon on November 28, 2007, 03:24:36 PM
:D No problem :)