Author Topic: Can not program atmega644: Most likely a hardware problem?  (Read 1279 times)

0 Members and 1 Guest are viewing this topic.

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Can not program atmega644: Most likely a hardware problem?
« on: November 21, 2009, 07:21:19 AM »
I can not for the life of me program my atmega644. I'm using avrdude with a ponyprog type serial dongle, and no matter what I do I get this:
Code: [Select]
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

I believe it is a hardware problem, but where should I start? I've already tested the power supply circuitry, and the regulator seems to be giving it enough power. I've also gone over the wiring what seems like a million times.

Could it be that my MCU is bad? It's brand new out of the box, so I don't think so...

Edit: I get the same error whether the programming dongle is plugged in or not, could this mean the programmer is faulty?
« Last Edit: November 21, 2009, 07:36:47 AM by z.s.tar.gz »
Save yourself the typing. Just call me Zach.

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,177
  • Helpful? 5
Re: Can not program atmega644: Most likely a hardware problem?
« Reply #1 on: November 21, 2009, 08:55:56 AM »
Could you give a link to the programmer you're using and the line you're using for Avrdude?
Robots are awesome!

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: Can not program atmega644: Most likely a hardware problem?
« Reply #2 on: November 21, 2009, 03:06:47 PM »
Certainly:
http://www.sparkfun.com/commerce/product_info.php?products_id=14

Code: [Select]
sudo avrdude -p m644 -P /dev/ttyUSB0 -c ponyser -U eeprom:w:/home/zach/asm/phase1/ledtest.s.hex:i
Save yourself the typing. Just call me Zach.

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,177
  • Helpful? 5
Re: Can not program atmega644: Most likely a hardware problem?
« Reply #3 on: November 21, 2009, 03:59:59 PM »
Try this:
Code: [Select]
sudo avrdude -p m644 -P /dev/ttySO -c ponyser -U eeprom:w:/home/zach/asm/phase1/ledtest.s.hex:i
« Last Edit: November 21, 2009, 04:02:30 PM by Trumpkin »
Robots are awesome!

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: Can not program atmega644: Most likely a hardware problem?
« Reply #4 on: November 21, 2009, 04:29:45 PM »
Well you see, I use ttyUSB0 because that is my usb adapter aka my only serial port.
I get the exact same error on another computer (with a real serial port) when I do like you said with ttyS0.

edit: after checking dmesg, it turns out that something is calling itself ttyS0, I'll look into that...

edit2: ttyS0 errors out immediately, but ttyUSB0 errors out after about 20 seconds. However on another computer, (the one with a real serial port) ttyS0 errors out immediately as well.

Should it be erroring out immediately or after a delay is now my biggest question.
« Last Edit: November 21, 2009, 04:37:52 PM by z.s.tar.gz »
Save yourself the typing. Just call me Zach.

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
Re: Can not program atmega644: Most likely a hardware problem?
« Reply #5 on: November 21, 2009, 06:07:46 PM »
Your using a USB/Serial adapter? Apparently this is not working, see the comments on the sparkfun webpage.

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: Can not program atmega644: Most likely a hardware problem?
« Reply #6 on: November 21, 2009, 06:30:54 PM »
That was my initial thought, but I've tried it on a computer with a normal serial port and recieved the exact same results, only instantaniously as opposed to the ~20 second delay.
Save yourself the typing. Just call me Zach.

Offline z.s.tar.gzTopic starter

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: Can not program atmega644: Most likely a hardware problem?
« Reply #7 on: November 22, 2009, 07:54:52 PM »
I completely redid all the wiring, and it works now.
I'm completely baffled as to what actually was the problem, but I'm glad it works now.
Save yourself the typing. Just call me Zach.

 


Get Your Ad Here

data_list