Society of Robots - Robot Forum

Software => Software => Topic started by: zackshalac on May 11, 2008, 02:20:53 PM

Title: need help with avr studio programmer
Post by: zackshalac on May 11, 2008, 02:20:53 PM
im having problems programing with avr studio and the avrisp mkII programer.  I get this out put when i try to program, i am programming an atmega8

OK
Reading FLASH input file.. OK
Setting mode and device parameters.. OK!
Entering programming mode.. OK!
Reading FLASH ..      OK!
WARNING: FLASH byte address 0x0049 is 0xE2 (should be 0xE0).. FAILED!
Leaving programming mode.. OK!

Title: Re: need help with avr studio programmer
Post by: Webbot on May 11, 2008, 04:53:35 PM
Make sure you have the 'Erase device before programming' tick box checked ?
Title: Re: need help with avr studio programmer
Post by: pomprocker on May 11, 2008, 06:10:18 PM
yes, what are you settings in avr studio?
Title: Re: need help with avr studio programmer
Post by: zackshalac on May 12, 2008, 02:53:02 PM
The settings were all default except for the ISP frequency (not sure if that is what it is called, it is the setting you get to from the "main" tab) I changed that to 6.48khz, and i have tried it on several frequencies.  Is there a way that i can reset all of the settings to default?  Also, what exactly does FLASH byte address 0x0049 is 0xE2 (should be 0xE0) mean? does that mean a particular byte of memory on the microcontroller is not working properly, or did not get programmed properly?

Thanks

just thought of this, there is a "lockbit" tab, can i just lock this byte and not worry about it ever again?
Title: Re: need help with avr studio programmer
Post by: Webbot on May 12, 2008, 04:55:19 PM
Wooah - don't get into lock bits, fuses etc until you can program the device in plain vanilla mode.


It sounds as though what is going on is that you are programming the device and then it goes into 'verifying' - which is where it reads the flash program back out of the device and compares it with your program. So you are getting a difference - hence us asking if you were erasing the device beforehand.

Can you give us a screenshot (or exact description of the screen and what things are ticked) - bear in mind software versions change so what you can see is not necessarily what we can see!!

Then can you describe what happens after you hit the program button. eg does it say 'writing' with a progress bar that gets all the way to 100%, and then goes to 'verifying' but falls over with your error?
Title: Re: need help with avr studio programmer
Post by: zackshalac on May 12, 2008, 08:40:11 PM
ok, i am am getting more and more errors, i haven't even made any changes or anything, every time i hook it up it eiher can't connect, the signature doesn't match the device, the lockbits and fuses get wierd settings, I am going to recheck all of my wiring because I have a feeling there is some issue there, also, i may have had an issue with shortcircuiting on my board, would a short cause all of these crazy errors?

and yes, when i can get it far enough to do the writing stage it completes the writing stage and gives me the error while verrifying
Title: Re: need help with avr studio programmer
Post by: Webbot on May 13, 2008, 11:17:49 AM
Sounds like you may have a wiring problem in the lead that reads from the controller. If the reads are getting corrupted then that would explain you getting the wrong signatures, fuse bits, and in verifying the data
Title: Re: need help with avr studio programmer
Post by: Admin on May 24, 2008, 07:21:07 AM
Did you get it to work?

What code are you using? Have you tried lowering the ISP frequency?