[SOLVED] Standalone ATMega328p stopped uploading (FTDI Breakout)

Howdy,

I’m using a standalone setup with ATmega328p and an FTDI Beakout (FT232R). I bought the ATMega with the bootloader already burned in. I wired everything as shown and it worked just fine!

One night I took everything appart from the breadboard to use it for another project and when I put everything together again it simply doesn’t work!

This is what I get:

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

(That “resp=” actually changes every time I try to upload the sketch)

Here’s what I tried so far:

• Rewired everything 3 times;
• Changed 16MHz crystal;
• Changed 22pF capacitors;
• Changed COM port on Devices Manager;
• Reinstalled FTDI Breakout Driver;
• Reinstalled Arduino IDE;
• Powered the circuit with 9v power supply through the voltage regulator;
• Powered the circuit throught the FTDI USB;

Here’s what I get when I plug in the FTDI Breakout:

• ATMega´s LED (pin 19) blinks 6 times and then 3 times fast;
• When reset pushbutton is pushed the LED (pin 19) blinks 3 times fast;

Can somebody help me? I don’t know what to do anymore, do you think my IC is busted?

Thank you so much.

When you attempt to upload, do you get a triple blink?

My guess is that you have a loose wire, probably around the autoreset circuit. Breadboard is notorious for this issue - it's why I generally avoid using it. Every time a friend has tried to show me something they made on breadboard, I sit around for at least 5 minutes while they poke at it to find the loose wire.

Your layout is missing several capacitors:

You need a 0.1uF cap between Vcc and Gnd, and between AVcc and gnd, these must be right next to the atmega (though I don't think this is your specific problem, but without them the chip may hang or reset unpredictably).

Your voltage regulator appears to only have one capacitor on it, and depending on the model of voltage regulator, even that one on the input doesn't look sufficient, not with those dupont lines leading to a power supply (which I suspect is a wallwart with yet more length of wires. Put an electrolytic cap in parallel with that small ceramic one on the input.

I just rewired the autoreset circuit and it is the same.

As you might have noticed I'm a complete newbie to electronics, how do you make prototypes without a breadboard?

Thank you for the advices on the capacitors although, as you pointed, I don't think that´s the issue, mainly because it was working just fine.

When I hit the upload the LED doesn´t blink and I get the "programmer is not responding" error. The IDE keeps trying to communicate with the IC, but when I hit the button again, the LED blinks 3 times and I get:

avrdude: ser_open(): can't open device "\\.\COM3": Access is denied.
avrdude done.  Thank you.

With solder - I use "solderable breadboard" style prototyping board, like this stuff (which conveniently enough, I sell) - https://www.tindie.com/products/drazzy/prototyping-board-with-breakaway-mounting-tabs/ - I have larger and smaller versions in the store too. I think my stuff is better and/or cheaper than the other brands available - but then again, I would say that.

Soldering connections is the only way to get really reliable connections. Male 0.1" square pin header and female dupont jumpers for connections to external modules, other boards, etc. 0.1" machined pin header for board-to-board connections, and for things that you plan to plug into breadboard).

Breadboard works when it's new, and when it hasn't had things with large pins stuck into it (which deform the clips, causing the next thing you plug in to make poor contact), most of the time.

That's strange behavior you're describing. The access denied implies that something else was using the port at the time you tried to use it (maybe multiple instances of the IDE open?). You should get a triple blink when you open the connection the first time to upload....

DrAzzy:
With solder - I use "solderable breadboard" style prototyping board, like this stuff (which conveniently enough, I sell) - https://www.tindie.com/products/drazzy/prototyping-board-with-breakaway-mounting-tabs/ - I have larger and smaller versions in the store too. I think my stuff is better and/or cheaper than the other brands available - but then again, I would say that.

Soldering connections is the only way to get really reliable connections. Male 0.1" square pin header and female dupont jumpers for connections to external modules, other boards, etc. 0.1" machined pin header for board-to-board connections, and for things that you plan to plug into breadboard).

Breadboard works when it's new, and when it hasn't had things with large pins stuck into it (which deform the clips, causing the next thing you plug in to make poor contact), most of the time.

That's strange behavior you're describing. The access denied implies that something else was using the port at the time you tried to use it (maybe multiple instances of the IDE open?). You should get a triple blink when you open the connection the first time to upload....

Cool! I´ll try to solder everything to one of those, actually I´ve got a 28 pin socket lying arround. Maybe with everything soldered together it will work again. I appreciate your help!

I´m sorry, I´ve noticed that the LED blinks once when I open the connection the first time!

DrAzzy:
[...] these must be right next to the atmega.

[SOLVED]

It works!

Just moved the 100nF capacitor (that was next to the FTDI Breakout) to the Reset pin directly. Your advice gave me the ideia, thank you so much!