go_away

Author Topic: avr microcontroller:: code burning problem  (Read 2252 times)

0 Members and 1 Guest are viewing this topic.

Offline arun_nrTopic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
avr microcontroller:: code burning problem
« 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.

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: avr microcontroller:: code burning problem
« Reply #1 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

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

Offline arun_nrTopic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
Re: avr microcontroller:: code burning problem
« Reply #2 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.

Offline arun_nrTopic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
Re: avr microcontroller:: code burning problem
« Reply #3 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.


« Last Edit: September 10, 2011, 08:31:31 PM by arun_nr »

Offline arun_nrTopic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
Re: avr microcontroller:: code burning problem
« Reply #4 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
[email protected]:~/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.

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: avr microcontroller:: code burning problem
« Reply #5 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 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 from Adafruit, but there are other good ones as well.

Joe

Offline arun_nrTopic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
Re: avr microcontroller:: code burning problem
« Reply #6 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 ???


Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: avr microcontroller:: code burning problem
« Reply #7 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

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

« Last Edit: September 29, 2011, 08:17:55 PM by joe61 »

Offline shamikrudra

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
    • Ventor Technologies India's Embedded system shop
Re: avr microcontroller:: code burning problem
« Reply #8 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.   

 


Get Your Ad Here

data_list