Go Down

Topic: Upload issues with breadboard Arduino (Read 858 times) previous topic - next topic

djseebs

Hello,
I'm very new to electronics, and have started messing around with this Breadboard Arduino tutorial as a learning tool:
(http://www.arduino.cc/en/Main/Standalone)
I was able to bootload my blank ATMEGA168 using an AVR Pocket Programmer (https://www.sparkfun.com/products/9825). I was also able to upload a simple sketch through the programmer that does a serial out "hello world" every few seconds.
Now, I've also got a FTDI USB Breakout (https://www.sparkfun.com/products/9716) that I'd like to now use to upload sketches, instead of my programmer.
Plugging in my USB-to-Serial into my PC, I can see the "hello world" from my serial monitor as expected. However, whenever I try to upload a new sketch, I get "avrdude: stk500_getsync(): not in sync: resp=0x60". I have my DTR pin going through a 0.1uF capacitor, as suggested for the auto-reset. When I click upload, the my pin 19 LED flickers very quickly for a second or so. But the upload still fails.
The fact that I can upload with my programmer tells me that my chip isn't busted, and the fact that I can hear the serial message through the monitor tells me my USB-to-Serial system seems to be working. And the fact that the lights flicker during my upload attempts tell me that it seems to be at least trying to do the upload.
Can someone offer any advice here? I'm running out of ideas. Thanks in advance.
(Windows Vista)

Coding Badly


Which bootloader did you install?

Have you tried a manual reset?

djseebs

I'm using the Diecimilia w/ ATMEGA168 bootloader that is listed in the Arduino IDE, as recommended by the the breadboard tutorial.
I've tried sending a manual reset using my push button, but the effect is similar to NOT pushing it; at best, my Arduino LED just flickers for a couple seconds. In either case, while this is happening, I also see the Receive lights flash on my USB-to-serial breakout. Then the Transmit light flashes slowly, before it gives up and I get the avrdude synch error.
Are there any special COM port settings perhaps that I should be aware of?

djseebs

If it helps, here is the verbose output from avrdude during the upload:
Code: [Select]
Binary sketch size: 2,528 bytes (of a 14,336 byte maximum)
C:\arduino\arduino-1.0.1\hardware/tools/avr/bin/avrdude -CC:\arduino\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega168 -carduino -P\\.\COM5 -b19200 -D -Uflash:w:C:\Users\djseebs\AppData\Local\Temp\build3898121089803696074.tmp\Serial_Test.cpp.hex:i

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\arduino\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM5
         Using Programmer              : arduino
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv: ` [60]
avrdude: stk500_getsync(): not in sync: resp=0x60

avrdude done.  Thank you.


I also performed the Loop Back Test (http://arduino.cc/forum/index.php/topic,73748.0.html) and it echoed every message back to me successfully.

I've also re-attempted performing manual resets during upload to no avail. I'm close to giving up here   :smiley-sad-blue:

Coding Badly


Did you upload the bootloader before or after you uploaded the "hello world" program?

djseebs

I did the bootload first, and then I uploaded the "hello world".
I just double-checked, and even now am I still able to upload without issue using my AVR Pocket Programmer; this problem is strictly related to serial uploading.
I decided I am going to borrow an official Arduino from a friend and try to investigate whether the problem lies in my PC, my board, my ATMEGA168, or my USB-to-serial system.

Coding Badly

I did the bootload first, and then I uploaded the "hello world".


Which overwrites the bootloader.

djseebs

Thanks "Coding Badly". You've solved my issue.
Clearly I was lacking a key understanding of bootloading here.
Thanks again.

Go Up