Go Down

Topic: Troubleshooting ATmega (Read 1 time) previous topic - next topic

wehzeh

I bought one of these: https://www.sparkfun.com/products/10524 and built the circuit around it on a breadboard to try it out. The power works fine, multimeter gives me 5V out where it's supposed to, no shorts, etc. I use a CA-42 for USB to serial interfacing and it works fine (loopback gives me what I should get). The microcontroller itself, however, has issues I think, and I want to be able to make sure it's misbehaving before I get a replacement.

Apparently, the LED connected to D13 should blink when it receives the reset signal (which also works--pressing the pushbutton pulls the node low), which has never happened so far. I thought nothing of it, and tried to use the IDE to load the blink example to test it. I've been troubleshooting for several hours, and have tried many different things (checking COM ports, changing the timing on pressing reset, resistors on the Tx/Rx pins, etc.), but no dice. All the output I get is this:

Code: [Select]
Using Port                    : \\.\COM34
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.


I'm thinking either the bootloader wasn't actually on it or the chip is dead (which means I need a replacement). I'll see if I can get access to an official board to test it on, but what else can I do to pinpoint the issue?

johnwasser

Since your loopback test worked, my first guess would be that the 16 MHz crystal or load capacitors are not working correctly.  Double check those connections and the capacitor values.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

wehzeh

Thanks for the reply. The connections from the 16 MHz oscillator and the board are secure and connected to the X1 and X2 pins. The caps are also secure, they are ceramic packages with "104" written on them (which I was told are .1 uF).

johnwasser


Thanks for the reply. The connections from the 16 MHz oscillator and the board are secure and connected to the X1 and X2 pins. The caps are also secure, they are ceramic packages with "104" written on them (which I was told are .1 uF).


The capacitors are supposed to be 22 pF (.000022 uF) so .1 uF would be about 5000 times to big.

http://www.arduino.cc/en/Main/Standalone
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

wehzeh

#4
Oct 10, 2012, 02:39 pm Last Edit: Oct 10, 2012, 08:25 pm by wehzeh Reason: 1
I see, thanks for that The guide I was using (http://www.theparsley.com/arduino/diy/) had those values. I'll try the official ones and see if it helps.

EDIT:
Ayup, that was it. Now the chip is talking back, but I still get an out of sync error (with response 0x30 this time). This should just be reset timing form here on out, I'll play with it a little bit.

EDIT 2:
Been playing around with the serial interface, the Rx and Tx were mislabelled on the cable end I believe, because switching them now gives me a response:

Code: [Select]
Using Port                    : \\.\COM35
        Using Programmer              : arduino
        Overriding Baud Rate          : 115200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv: . [9e]
avrdude: stk500_getsync(): not in sync: resp=0x9e

avrdude done.  Thank you.

This is as good as I can get it (via manual reset). The fact that I'm receiving a "." either means my timing is still off or I'm just getting garbage back (I think).

SOLVED. Thanks for the help, I got the upload working. The pull-up resistance was wrong on the Tx pin (along with the mislabelling), so I probably was just getting garbage data because the signal levels were wrong.

Go Up