Trouble uploading to atmega328p-pu (breadboard) using FTDI

Hi folks,

I’m experimenting with my first “breadboard arduino” (I own a Uno and a Nano but need a lower power setup for a new project).

I bought some components on ebay (this) and wired it all together on a breadboard. Please see attachment for a picture of the wiring.

When I plug my FTDI programmer (3.3V) to my macbook via the mini USB port, the power led flashes a couple of times (I suppose it’s the bootloading stage) then flashes solid red indefinitely. Now when I try uploading a simple “Blink” program with the arduino IDE, the power LED (pin 13) immediately fades, and does not blink anymore. The Arduino IDE tells me that “avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00”

If I unplug the FTDI from the macbook, wait a few seconds, and plug it again, the bootloading stage starts again until the LED is solid red. So it seems clear that the sketch is never uploaded.

I have configured the Arduino IDE with:

  • “Arduino Pro or Pro Mini”
  • ATMega328 (3.3V, 8Mhz)
  • port is /dev/tty.usbserial-A50285BI

I tried uploading from a Windows 7 computer, and got the exact same result.

After scratching my head for a few days and having checked the wiring multiple times, I’m a bit at a loss as to what I can do to make it work. Any help would be appreciated.

Is your stand alone Atmega328p preloaded with a bootloader? If not see this: http://forum.arduino.cc/index.php?topic=317138.0

Thanks for the reply. When plugged to the computer, the LED flashes once immediately, then twice dimly, so it seems like there's a bootloader on it.

You need to reset the chip before it can be programmed. Usually this is done with a 0.1uF cap between the reset pin of the Arduino (Pin 1 on the DIP 328p) and the DTR pin of the FTDI adapter. Alternatively you should be able to punch the reset button after clicking "upload" upload, but I'm not sure how critical the timing is on that to be honest. It looks to me that right now your chip either is stuck in reset, or never goes into reset, but I can't tell for sure from that picture (can't see all the wires).

I personally always use the auto-reset cap on my custom boards. Check out this link to see the schematic from Sparkfun for their 3V Pro Mini (their pin numbers differ since they use a TQFP surface-mount chip instead of the DIP). In particular look at the circuitry connected to the Reset pin.

(Based on the link you posted, it sounds like it should already be bootloaded, yes. If not the link twice posted will be of use, as will this link.)

Looks like there may be an incorrect bootloader on the atmega. Bootload it properly and try again.

Thank you both for your answers! I'll check the links ASAP.

I bought a 'boot loaded' chip from Spark Fun that wouldn't take anything until I ran Nick Gammons board detect and board programmer sketches. On my setup I had to select Lilypad with 328 to get the FTDI (5V) cable to work. It uploads more reliably than the serial upload to a Uno. Minimal Board setup

Wow, thanks CopperDog! So after following Nick's tutorial I found out the chip was indeed setup with the wrong bootloader. Following the instructions I was able to burn a Lilypad bootloader (8 mhz internal clock) using my Uno, and this fixed it for me. I can now upload sketches using my FTDI adapter.

Thanks guys (and Nick) for the help!

My pleasure. I know how frustrating it can be when you get stumped.

Can you tell me how much current the chip is pulling? After I did the same thing my chip draws 90 mA just sitting there compared to about 20 mA with a chip out of a Uno loaded with the same sketch. I can't get the draw down no matter what I do.

I'm trying to track down if the board programming had anything to do with it.