3

Few days ago, I built my own custom Arduino on the breadboard. It is built according to tutorial on http://www.crash-bang.com/resource/breadboard-arduino/. The Atmega328P-PU is already burned with the Arduino bootloader with simple blink sketch.

For the programmer, I decided to use the Arduino USB2Serial. Again, it is connected as shown on crash-bang site. Problem is I get this error when uploading a different sketch:

avrdude -Cavrdude.conf -v -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:build244630154737317489.tmp/sketch_may23a.cpp.hex:i 

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
     Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
     Copyright (c) 2007-2009 Joerg Wunsch

     System wide configuration file is "avrdude.conf"

     Using Port                    : COM3
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200
     AVR Part                      : ATmega328P
     Chip Erase delay              : 9000 us
     PAGEL                         : PD7
     BS2                           : PC2
     RESET disposition             : dedicated
     RETRY pulse                   : SCK
     serial program mode           : yes
     parallel program mode         : yes
     Timeout                       : 200
     StabDelay                     : 100
     CmdexeDelay                   : 25
     SyncLoops                     : 32
     ByteDelay                     : 0
     PollIndex                     : 3
     PollValue                     : 0x53
     Memory Detail                 :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
       lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : Arduino
     Description     : Arduino
     Hardware Version: 3
     Firmware Version: 4.4
     Vtarget         : 0.3 V
     Varef           : 0.3 V
     Oscillator      : 28.800 kHz
     SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: reading input file "build244630154737317489.tmp/sketch_may23a.cpp.hex"
avrdude: writing flash (450 bytes):

Writing | avrdude: stk500_recv(): programmer is not responding

Most of the time I do not even get to this point and just end up with something like:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xf5

What I have done so far:

  • I already tried to reset Arduino just before uploading the sketch.
  • According to the avrdude, bootloader is fine.
  • Reinstalled drivers, Arduino IDE
  • Changed the USB cable and connected it to another USB slot
  • Burned new bootloader using ArduinoISP

Thank you for help.

  • 1
    Is there a reason why you don't want to stick with ISP? – Ignacio Vazquez-Abrams May 23 '15 at 20:29
  • This would require to buy another programer, would not it? I hope someone could know the solution to get current programmer to work... – Lorin May 23 '15 at 22:21
  • Your time is more valuable than a (hardware) programmer. – user31481 Feb 20 '18 at 18:35
0

I've read the tutorial at the crash-bang website and found two issues with it. The first issue is minor and probably won't fix your upload issue.

Step 3 says to connect +ve rail –> AVCC (pin 20) and +ve rail –> AREF (pin 21). You can leave those pins not connected. A really awesome guy named Julian ILETT has a video on youtube showing a homemade Arduino using the bare minimum connections needed. https://www.youtube.com/watch?v=sNIMCdVOHOM.

The second issue with the tutorial is in Step 5, "Connect the DTR pin of the FTDI, via a 0.1uF capacitor to pin1 on the ATmega.". A lot of people claim this works, but it doesn't work for everyone. It doesn't work for me and I have 2 of the identical FTDI programmers used in the tutorial. If you watch Julian's video starting at 12:48, you will see that he had trouble uploading a sketch using the DTR / 0.1uf capacitor method. He is using a different USB to TTL device but I have one of the identical devices he was using and the 0.1uf cap method doesn't work for me.

The solution to the upload issue is to use a switch to reset the Atmega328P-PU. Like the tutorial says, use a 10k ohm resistor connected to +5V and pin 1 of the Atmega328P. Now connect a one terminal of a N.O. momentary switch to ground and the other to pin 1 of the Atmega328P. To upload your sketch, click the upload button on the Arduino IDE window. As soon as the Debug window says "Binary Sketch Size…", press the reset button and hold it down for 1/2 a second then release.

I've just joined arduino.stackexchange.com a week ago so my answer may be a bit late. Hopefully this helps people in the future.

-1

"Step 3 says to connect +ve rail –> AVCC (pin 20) and +ve rail –> AREF (pin 21). You can leave those pins not connected. "

+ve rail should not be connected to Aref. The +ve rail will connect via the internal operation of the ADC mux.

AVCC and both Gnds should be connected per the datasheet: 5.2.7. AVCC AVCC is the supply voltage pin for the A/D Converter, PC[3:0], and PE[3:2]. It should be externally connected to VCC, even if the ADC is not used.

28.2. AVCC must not differ more than ±0.3V from VCC.... Optionally, AVCC or an internal 1.1V reference voltage may be connected to the AREF pin by writing to the REFSn bits in the ADMUX Register. The internal voltage reference must be decoupled by an external capacitor at the AREF pin to improve noise immunity.

If you connect Aref to the +ve rail externally, and then select the internal reference, things can go bad.

FTDT thru 0.1uF cap to Reset, with 10K pullup, and reverse biased diode to VCC, works for me in plenty of designs. Not sure why it does not work in all cases. The diode dissipates any spike on the Reset line to keep the chip from thinking high voltage programming mode is being started.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.