I'm confident all the come cations are correct, and have checked the board is free of short circuits, dodgy joints etc using a multimeter. I was able to boot load an atmega328p-pu using an uno as the ISP. The problem is I cannot upload sketches to the board using a spark fun 5v ftdi adapter. I see the following error:
avrdude: stk500_getsync(): not in sync: resp=0x00
When I select file-upload using programmer, I see my board reset, and the tx/rx lights on the ftdi board blink a couple of times. I've also tried programming the board using the uno as an ftdi breakout but I see the same issue.
If I remove the chip and put it on my uno, it will program without issue. If I ten put the chip back in my board, it will run the sketch.
In summary, I can run sketches, but not upload them using ftdi boards.
I have tried manually reverting the board by grounding and releasing reset just prior to the upload, but no luck with this. I've also tried selecting a number of different board types from the list.
I'd appreciate any ideas. It's driving me mad that I cannot figure out why this won't work.
Remember most instructables are crap. This is not quite that good but it is poor.
There is no schematic of what you have built on the site and that is very poor.
It sounds like you have a problem with the auto reset or the boot loader. My money is on the auto reset. Check that part of the circuit wiring. Also you should have a diode between the reset line and +5V, as some chips will not work without this, see the latest UNO schematic.
I've double and triple checked the reset pin wiring. I have a 10k resistor from pin 7 to pin 1. All the connections sound. If I connect pin one to ground and release it, the pin 13 LED flashes as you would expect it to.
Between the DTR pin on the FTDI board and pin 1 on the Atmega is a .1uf capacitor, again all connections sound. Crystal is connected to ground on both sides via 22uf caps.
The board selected when I try to program is Arduino Uno.
Regarding the diode, would this run in parallel with the 10k pull-up resistor?
EDIT: My apologies, the error I am seeing is avrdude: ser_recv(): programmer is not responding avrdude: stk500_recv(): programmer is not responding Full text below:
Using Port : /dev/tty.usbserial-A603AVSN*
Using Programmer : stk500v1*
Overriding Baud Rate : 19200* avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: ser_recv(): programmer is not responding avrdude: stk500_recv(): programmer is not responding avrdude done. Thank you.
There are two likely problems here and as Mike says, the lack of a proper schematic for you to check your connections against, is a bit of a problem in itself.
One is that you have crossed over - or not crossed over - the Tx and Rx connections - the labels can be quite confusing. Try switching them and see how you go.
The other (and first) is the "auto-reset" circuit. Check carefully in your wiring that the 10k pull-up resistor is from pin 1, the reset pin, to the 5V supply, and that the 100 nF capacitor goes from pin 1 to the DTR line from the FTDI and that you do not have the DTR connected directly to pin 1. It is inconvenient that to assemble this board as illustrated, the 100nF capacitor and 10k resistor wires must go through the same hole, as must happen with various other connections!
I can confirm the resistor and cap are wired correctly, and the tx and rx pins are connected properly. I did test the improper configuration and had the same result.
I decided to test the ftdi board by connecting the tx and rx pins via a 1k resistor. I then connected using a terminal program. When I type characters, the tx light flashes, but not the rx. The characters are also not echoed in the terminal, so I suspect the culprit is a faulty ftdi board. I'll swap the board over when I'm next at the supplier and see how I go.
I would inspect that faulty FTDI board closely. Connect the Tx and Rx pins directly and repeat the loopback test.
If both LEDs flash - well, that would be rather curious but if neither LED flashes, the Rx side is shorted to ground which may be a repairable board fault (or may be a dead chip) while if the Rx LED still fails to flash though the Tx LED does, there is an open circuit somewhere which is readily repairable.
Thanks - even with the tx and rx pins directly connected, that board wouldn't work. I took it back to the supplier yesterday (purchased locally, and it was a nice day for driving my convertible) and exchanged it, which resolved the issue.
I'm pretty sure the guy at the shop just chucked the old one in the bin.
On the pus side, the fact that I spent so much time troubleshooting this issue has taught me a lot more about how these micro controllers work, so in that respect, it's not such a bad thing that have had some challenges.
Johnnytheknife:
Thanks - even with the tx and rx pins directly connected, that board wouldn't work
All very well, but we here are essentially engineers and "wouldn't work" just doesn't cut it, it's not an answer. Which of the three scenarios that I outlined, was it?
Johnnytheknife:
I'm pretty sure the guy at the shop just chucked the old one in the bin.