Go Down

Topic: Building avr programmer using FTDI Friend (Read 6677 times) previous topic - next topic

jbuchacher

So I bought a FTDI friend from adafruit. I have a handful of ATMega328's with the arduino bootloader already burned. I have had success uploading sketches using the super basic tutorial on http://arduino.cc/en/Tutorial/ArduinoToBreadboard. I am hoping to substitute the actual Arduino for the FTDI friend. Does anybody have a really simple tutorial or instructions on how to wire the FTDI friend directly to an ATMega168/328? I did my best, and got the "programmer not responding" error. I haven't been able to find a simple tutorial to verify I'm doing things the right way. Let me know if you can help!

CrossRoads



FTDI       ATMega    Signal direction
Vcc goes to +5/Vcc  -->
Gnd goes to Gnd        -->
CTS goes to Gnd        <--
Tx goes to Rx             -->
Rx goes to Tx            <--
On the back, cut the little jumper between the RTS pads
Add a little jumper across the DTR pads

To Use DTR, you need a 100nF (0.1uF) capacitor between the RTS pin (DTR the change above) and the ATMega's Reset pin.
DTR then goes to DTRm -->
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jbuchacher

That's exactly the info I needed. Thanks for the quick reply.

jbuchacher

So what am I doing wrong? Don't know if you'll be able to see well enough with these two images. I'm still getting the programmer not responding error in the IDE. I have the board set to duemilanove /w 328. The ATMega328 on the board has the blink sketch uploaded already from when I was using my actual arduino to program it. What I am ultimately trying to do is make a really simple board that I can use to program the 328s. I don't need something really exciting, just something that I can solder up on a small PCB and use when I need it. So I'm trying to make sure everything works properly while it's on the breadboard then I will wire it up. I have everything wired up according to CrossRoads' post. I cut the jumper, added the jumper, etc. Still getting programmer not responding. Any suggestions for next troubleshooting steps? Thanks


Jack Christensen

#4
Dec 18, 2011, 10:17 pm Last Edit: Dec 18, 2011, 10:19 pm by Jack Christensen Reason: 1
The CTS signal from the FTDI friend should not go directly to pin 1, it should go to pin 1 through the capacitor. So in your photo, move the jumper one row, from row 39 to row 40. Then move the capacitor to go between row 40 and row 39 (pin 1 on the AVR).

Also add a 10K resistor from pin 1 to +5.

jbuchacher

I realized I was using a 22pf cap not a 0.1uf. Do you think that is the single cause for the 328 not responding? The TX LED on the FTDI friend blinks when I upload a sketch, and nothing comes back through the RX LED, is that expected? Also, shouldn't I be able to manually reset the 328 right when the IDE says Uploading sketch xxx of xxxx? I was able to when it was on a breadboard and was using my actual arduino to program the chip. Any suggestions are appreciated, I'm trying to learn as fast as I can!

jbuchacher

Here's an image of what I have currently.


Jack Christensen

That looks better now, and yes the cap on the reset pin will need to be a 0.1µF. Is it still not working? And yes a manual reset should work as you describe, just add a normally-open pushbutton switch from pin 1 to ground.

FWIW, there is a picture of a breadboarded Arduino that I did here:
http://adventuresinarduinoland.blogspot.com/2011/09/arduino-breadboard-helpers.html

Jack Christensen

It's not always a show-stopper (i.e. the thing may run without), but 0.1µF caps between pins 7 and 8, and between pins 20 and 22 are usually considered to be required.

jbuchacher

So I made sure I've got the 0.1uf between pins 7 & 8 and one between pin 1 and RTS on the FTDI friend, compared my circuit to the breadboard helper eagle files, everything looks good. When I upload, it seems to be resetting, because I have the blink sketch already on the ATMega328 and it cuts out mid blink and restarts the sketch. The TX light on the FTDI Friend blinks when I'm uploading, but I never get any blinking on the RX LED.

Any other suggestions?! I had everything working fine when I was using an arduino as an isp, but I'd love to have a standalone programmer. Thanks for all the help

CrossRoads

Did you cut the RST jumper and connect the DTR pads on the FTDI friend? All I see is green felt there. Wires are in the way in the first picture.
Also, put a 100nF cap across the VCC/GND pins, 7/8 and 20/22.

The DTR cap needs to be big enough to keep the reset pin low briefly - with 22pF, the reset pin may just see a brief blip and not actually get reset.

Yes, you should be to manually reset, plug in a wire from pin 1 to Gnd & pull it out should work even.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jbuchacher

Yes cut it and resoldered, here's a few better pictures. And yes the capacitors are in the right place, and I am using the correct ones now (0.1uf) I also tried using a standalone power supply in case the voltage was dropping, while uploading.

CrossRoads

You don't have 20 & 22 connected to power & ground.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

You also need a current limit resistor in series with your LED, otherwise you'll smoke the pin.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jbuchacher

I did have them connected, I had removed them momentarily and forgot when I took the picture. I put a resistor in for the LED, didn't think it would matter much other than burning my LED out quicker. Any thoughts on why all I get is programmer not responding errors?

Go Up