Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: arun_nr on September 10, 2011, 03:09:28 AM

Title: avr microcontroller:: code burning problem
Post by: arun_nr on September 10, 2011, 03:09:28 AM
im using atmega 8  and have a usbasp programmer.i am unable to burn the code in to the controller.
im getting this error:


avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

i hav'nt connected an oscillator between pins "xtal".but i was able to burn code like that when i used a parallel port.?
wat could b d problem.
Title: Re: avr microcontroller:: code burning problem
Post by: joe61 on September 10, 2011, 02:32:21 PM
It's hard to say, you just don't give enough information. You could try searching the avrdude documentation for the error string you're seeing. Or try google, for example, avrdude "target doesn't answer". That led to the following discussion which may be helpful http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=79349 (http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=79349)

if this doesn't help, try asking again with more information, like the OS you're using, the programmer (usbasp == usbisp?), your makefile or avrdude command line, relevant section from avrdude.conf, etc.

Joe
Title: Re: avr microcontroller:: code burning problem
Post by: arun_nr on September 10, 2011, 08:23:12 PM
thank you for your reply.

im using usbasp and im doing it on Ubuntu and command line.
Title: Re: avr microcontroller:: code burning problem
Post by: arun_nr on September 10, 2011, 08:29:46 PM


if this doesn't help, try asking again with more information, like the OS you're using, the programmer (usbasp == usbisp?), your makefile or avrdude command line, relevant section from avrdude.conf, etc.


Title: Re: avr microcontroller:: code burning problem
Post by: arun_nr on September 28, 2011, 12:46:49 AM
heiiii my usbasp hav only 5 pins miso mosi sck gnd and rst.and while doing on breadboard it gives
arun@ubuntu:~/blinking-LED$ sudo avrdude -c usbasp -p m8

avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

how can i sort out the problem.normally other usbasp's i saw hav a vcc pin too.
Title: Re: avr microcontroller:: code burning problem
Post by: joe61 on September 28, 2011, 05:09:01 AM
how can i sort out the problem.normally other usbasp's i saw hav a vcc pin too.

I suspect that the programmer isn't correct. It should have a VCC pin - see http://www.atmel.com/dyn/resources/prod_documents/doc0943.pdf (http://www.atmel.com/dyn/resources/prod_documents/doc0943.pdf) for details but normally either the programmer supplies power to the circuit or gets power from the circuit. It needs a VCC pin to do that.

If you have access to another programmer, give that a try. I normally use a USBTiny (http://www.adafruit.com/products/46) from Adafruit, but there are other good ones as well.

Joe
Title: Re: avr microcontroller:: code burning problem
Post by: arun_nr on September 29, 2011, 07:48:40 PM
is it necessary that you connect aref pin also to the supply while burning the code to the targer ???

Title: Re: avr microcontroller:: code burning problem
Post by: joe61 on September 29, 2011, 08:15:31 PM
This is a link to the ATMega8 data sheet: http://www.atmel.com/dyn/resources/prod_documents/doc2486.pdf (http://www.atmel.com/dyn/resources/prod_documents/doc2486.pdf)

In the section called "Serial Programming Pin Mapping" it shows a diagram which tells you how to do it.

Did you look at the other document I referred you to? It has explanations there too.

Joe

Title: Re: avr microcontroller:: code burning problem
Post by: shamikrudra on October 02, 2011, 09:18:06 PM
your programmer not providing power to the target chip. are you giving power to the target chip from outside? other than 5 connection you have mention VCC is required for atmega 8 vcc and avcc should be connected and you should connect both the ground pins. connect a crystal for safety if you change the osc frequency.