Go Down

Topic: Breadboard Arduino (ATMega328p) upload problems (Read 3053 times) previous topic - next topic

Lucian1977

HELP!

I have been trying to get my breadboard Arduino up and running for a couple of evenings now and if I had any hair I'd be pulling it out right now :(

I followed these instructions:

http://www.instructables.com/id/How-To-Make-The-Easiest-Breadboard-Arduino-UnoE/?ALLSTEPS

I have the breadboard set up exactly as described. This corresponds with other breadboard Arduino clones I've seen so I am sure I have done it right. I've even replaced all the capacitors, the 16MHz crystal and even the chip itself :(

When I manually press the reset button I get flashing on pin 13 as expected. The software reset also flashes pin 13, so something is happening.

In the 0023 IDE I get 

Quote
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51


In 1.0 I get just

Quote
avrdude: stk500_getsync(): not in sync: resp=0x00


(I need 0.23 for the sketch I am using)

I am using a CP2102 USB to serial adapter. This works fine, it passes loopback tests and can program both my Pro Minis

Any ideas please?

johnwasser

That Instructable seems to be missing one wire: the connection between the top power rail and bottom power rail.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Lucian1977

The author notes that later in the instructions. I have my rails linked already too (habit) I am at a loss. Can't seem to get the manual reset working either, though I never have been able to get the timing right before

Lucian1977

Here is the verbose mode output when trying to upload the blink sketch if it helps any

Quote
Binary sketch size: 1018 bytes (of a 32256 byte maximum)
C:\Users\LD\Documents\Arduino\arduino-0023\hardware/tools/avr/bin/avrdude -CC:\Users\LD\Documents\Arduino\arduino-0023\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM8 -b9600 -D -Uflash:w:C:\Users\LD\AppData\Local\Temp\build2884719328464425973.tmp\Blink.cpp.hex:i

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\Users\LD\Documents\Arduino\arduino-0023\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM8
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 9600
avrdude: ser_open(): setting dtr
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: Send: Q [51]   [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done.  Thank you.


johnwasser

Your upload is happening at 9600 baud.  The standard bootloaders expect either 115200 baud (UNO) or 57600 (Duemilanove).

What bootloader is programmed into the ATmega386P chip?

What board are you selecting from Tools/Board?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Lucian1977

Hi again, thanks for the replies.

I should have mentioned those details. Both my chips have the Uno bootloader on them. I have tried 115200 and everything in between. I must have left it on 9600. The 9600 baud rate works fine for my Pro Minis

Lucian1977

Tore down and rebuild twice, still no joy :(

Aside from the usual points in the trouble shooting thread, anyone have any suggestions?

Some details

OS - Windows 7 64 bit
USB - Serial: CP2012 USB FTDI board (made by BA/TE, USB 2.0 to UART TTL 6PIN Module Serial Converter)
ATMega328p (also have a PU, same issue)
bootloader - Uno. All of my chips (3 now) were burned by the seller with the Uno bootloader
Changed: AT chips, capacitors, crystal, all jumpers. Have not changed resistors, reset switch (though this works), pin headers, LEDs (these work too)

This is driving me mad, more so because my other Arduino boards work fine with this setup

justone

Just got back into the arduino and on one of the boards (from Evil Mad Scientist) I use a usb to rs232ttl for programming (had to add the capacitor to the rts line to form the rst).

It was giving me the same as you are getting ( I tried many times ). So I went into the device manager and found the device in Ports and right clicking on it brought up ... Properties. Clicked on Properties and selected Port Settings tab. Selected Adavanced and there were some options on how the port works. On mine the 'set rts on close' was checked so I unchecked it and closed the windows. Tried again and now it works. If I go back in to the device manager and recheck it I get the errors on trying to program. Unchecking  allows programming.

I'm using pre 1.x IDE . Don't know if this is adressable in the newer IDE's.
Hope this helps.

Lucian1977

Thanks for the reply :)

I know the settings you mean, I remember seeing them on an XP machine I once used for Arduino. Sadly Windows 7 doesn't seem to have the same options





Does anything there make sense? I've reinstalled the driver from Silicon Labs a couple of times

http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx


justone

OK I've done a little bit of trying stuff. I do have a CP2102 but it is a little old but I did get it to work (my settings page looks like yours). On looking at your model there was a thread about it (John was in the thread) and in that thread it was mentioned that the labeling was incorrect for the TX and RX (flipped). I don't know how you are hooking this up to your minis but I would stare really hard at how you have the TX and RX hooked up ( TX to RX and Rx to TX ) . Maybe a quick test is to hook up the TX line of the CP2102 thru a led -current limiting resistor-ground and see if there is activity on it when transmitting.

Here is that link:

http://arduino.cc/forum/index.php?topic=94754.0

Lucian1977

The TX and RX are indeed incorrectly labeled. I've grown accustomed to it though   XD

I literally can pull this off the breadboard and program a Pro Mini. What is the chances the seller has sent me two duff 328p and a duff 328p-pu, Very slim?!

I know the USB-Serial works
The components have all been replaced
The reset function appears to work
I have tried different parts of my breadboard in case

Thanks for the feedback, I am at the point of giving up on breadboard arduino :(

As a side note I installed XP Home in Virtual Box for giggles and the driver settings are the same for this device as in WIndows 7

justone

#11
Nov 20, 2012, 04:39 am Last Edit: Nov 20, 2012, 04:59 am by justone Reason: 1
OK I'll throw out one more and I think this might be it (did a little looking at the pro mini).

On the pro mini it has the capacitor between the DTR and reset circuit. Take a look at the schematic for the pro mini.

Some people put the capacitor on the cp2102 end.


Lucian1977

Hi again. Sorry that is another detail I should have mentioned. I have a 1pF cap on the DTR line   :smiley-zipper:

justone

Don't know if a 1pf cap versus a .1uf (what your Pro Mini has on it) matters but the .1uf has an order of 100,000 times over the 1pf.

You might want to try and kick your cap up a bit. Just use a tpyical bypass cap.

Go Up