Program Arduino with FTDI

I have an ATMEGA328P-P that has the Arduino bootloader on it. I have it on a breadboard with the appropriate components hooked up. I have an FTDI interface that I am attempting to upload a sketch with and it just seems to fail, it eventually times out. If I take an Arduino Uno that I have laying around and remove the ATMEGA328 from it, and wire it up to the breadboard, my sketch uploads and everything works fine. Can someone tell me what I am doing wrong? Here is my schematic.

Off the top of my head, you need a 0.1uF cap between DTR and /RESET and a 1N4148 type diode from /RESET to 5V, cathode end to 5V.

I unfortunately don’t have anymore caps laying around. I just ordered some and should be here in a couple of days. Thank you!

This is not necessary. Of course, Arduino has this "tuned" circuit but this should work as is.

Anyway, I am recommending take care of AREF pin, 100nF cap to GND. And also, R1 can cause problems in some circumstances. I would go with value closer to 10k.

Timeout? It would be better to post the output and the command.
Bootloader? How can you be sure?
Meantime, you could check:

  1. power if it is powered,
  2. clock have to clocking,
  3. reset pulse must be resetting at the beginning of the uploading process.

My parts finally came in. I added a 0.1uF (104) on the RESET line, and I'm still not able to get a sketch uploaded to the offboard arduino. I've also flipped the RX/TX pins to see if that was the issue.

I've attached an image of my beadboard layout. I noticed in the breadboard sketch I don't have the 0.1uF capacitor connected, but it is connected to PIN 1 of the ATMEGA-328.

Your 1K resistor (I'd use 10K) on the /RESET line is connected to ground. It needs to be connected to +5. Your IC is being held in reset.

Setup does not seem correct. Check it again. Upper power rails not connected, also resistor is connected wrong as @van_der_decken wrote. You should use a higher value for R1, see the post #4. If it do not work just eliminate potential problems too. All Arduinos use 10k. With the value between 8k2 and 12k you cannot be wrong.

"I added a 0.1uF (104) on the RESET line."
Do not do this. You should to use it with diode (see the post #2) or go complete without this.
Capacitor will produce 2 spikes from the reset pulse. You have to get rid of the second one with the diode...

You have to be consistent, thoroughly follow the schematics. I've just realized you are missing pin 22 GND in your schematics from the first post. It must be connected, all power pins must be connected. See the datasheet.
Do not do this: "I noticed in the breadboard sketch I don't have the 0.1uF capacitor connected, but it is connected to PIN 1 of the ATMEGA-328." Just post the picture of the real setup. Again, be consistent and I believe the success will arrive.

I got it to work. You all were right, I switched the resistor with a 10k, and it worked fine. Thanks everyone.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.