Hello all,
I am attempting to program a Atmega328P using a FTDI USB to serial adapter. I've done this a couple times in the past and am currently running into an issue I can't seem to resolve. On the board i have connections to pair with the adapter: +5V, GND, Rx, Tx, RST, and CST. I simply ground CST and RTS is connected to the ucontroller as shown below.
Before mounting the ucontroller on the board, I burned the Arduino UNO boot loader and programmed the desired script on the chip. Ironically enough, i do the chip programing with a different custom board with another ATMEGA328P, and use the same USB-serial adapter and reset schematic above (which is very weird).
Regardless, after assembly the board works as expected. The program executes, however, when i try and reprogram the chip with the serial adapter I get this error:
"stk500_getsync() attempts # out of #: not in sync: resp=0x0d"
Couple of things I've tried.
- Searching the form. Loads of topics on resp=0x00. None seemed to help
- I dont suspect the chip is faulty. The chip runs the program as expected. While the chip is mounted on the board, I can reprogram (and/pr re-burn a boot loader) using the SPI and reset pins. Further confirming the chips operation
- I tried more recent versions of the boot loader, Aduino Nano (328P and 328p Old Boot loader)
- I've tried a different cable.
- Checked the connections on the boards and the mounting of components.
- Flipped Rx and Tx just to be sure. This results in a different error: resp=0x1d
- Measured the reset pin as i tried to reprogram the chip
This is the node at pin 29. It looks like the chip does get the reset signal. perhaps the timing is wrong? The datasheet says reset voltage is 0.9*Vcc. The scope is indicating almost 0.5sec before the reset pin reaches close to that value. Seems like a lot, but what do i know?
I'm stumped. Any suggestions would be much appreciated. Happy to provide more context.