Solved - Standalone Atmega328P with USB/Serial adapter

I'm wondering if I can use this USB adapter, DLP Design USB Product Page with the Arduino IDE. Any way I try to upload I get the error

[avrdude: stk500_getsync(): not in sync: resp=0x00]

. The adapter shows up as COM4. I set it up to be powered from the USB bus and simply connected Rx to Atmega Tx and Tx to Atmega Rx. I'm using the Arduino on breadboard example setup with an external oscillator. I'm able to use this setup with the AVRISP MKII using the upload using programmer option.

When I connect to a Pro mini, I connect RX, TX, DTR ground and +5V. The DTR is used to reset the chip as you upload. If you don't use that, you have to reset the chip as the upload is about to start.

No luck. I connected DTR to the reset pin and it took it low while trying to upload. I set the adapter up to be powered from the external electronics, so ground and +5V were connected also. I also tied pin 14 of the adapter high this time. I'm not sure what I'm missing. Time to hit google some more.

Can you wire it up like this:
http://shrimping.it/blog/shrimp/

Still no go. Maybe I should say that I bootloaded this chip on the breadboard using an UNO board as the ISP.

That should work... I take it you followed the official instructions?

Yes I followed the instructions from the Arduino website. I'm selecting UNO as the board and Arduino as ISP and of course COM 4. I'm seeing activity on the Rx and Tx lines with the scope. I have quadruple checked connections and everything is there.

Double-check with this info:
Nick Gammon Arduino

Everything appears to be in order. I tried using RTS instead of DTR but it didn't work.

I just noticed that the serial monitor is working. The chip was previously loaded with a number generator sketch that runs once when it is reset using the AVRISP and I can see the numbers in the serial monitor every time I reset it.

I have the programmer as AVR ISP MkII.

Sorry I left the mkII out. Yes that is correct.

All seems OK if the serial monitor is working.

Please confirm that you do understand the need for a 0.1µF capacitor between DTR and the reset pin on the Atmega328 and no other capacitor on that reset pin.

gardelec:
Everything appears to be in order. I tried using RTS instead of DTR but it didn’t work.

ONLY DTR… Cannot substitute this.

You may need to revert to the ol’ press reset to load like in the old days.

Ray

Yes I have the capacitor between DTR and reset. I tried two other controllers, one that I bought and bootloaded like this one and the one out of the UNO board. I even tried holding reset while uploading to no avail. I'm out of town for a few days so I'll have to get back to it when I get back. Maybe I will think of something in the meantime. Thank you all very much for your help so far.

I even tried holding reset while uploading to no avail.

... Releasing the RESET button immediately after compile completes - that is, at the moment the software flips into download mode via avrdude. The timing of this is small, even us old hackers sometime get frustrated.

I set the adapter up to be powered from the external electronics, so ground and +5V were connected also.

Usually, I use USB to power my serial-USB adapter+328 circuit. After download, I connect external wiring and power from PS. If I must have serial to console, I pull the power jumper on USB board... Only Send/Receive/Ground are then connected to the UC and external electronics.

I just noticed that the serial monitor is working. The chip was previously loaded with a number generator sketch that runs once when it is reset using the AVRISP and I can see the numbers in the serial monitor every time I reset it.

Proves REC on adapter is working. Do a loop-back with PC console to prove adapter works.

If Send + Receive works there is no reason that download will not work: either automatically or by timely use of RESET. Assuming boot loader and fuses and frequency are all correct!!!

Ray

I haven’t gotten as far as fuses and frequency yet. How do I check those?

gardelec:
I haven't gotten as far as fuses and frequency yet. How do I check those?

Frequency is set by fuses and the crystal oscillator value; or, by the fuses for RC internal. You can also run a sketch (search for it) to show the value of the oscillator.

Fuses can be shown by AVRDUDE or by a sketch utility... Nick has one:
Gammon

There are several online training articles regarding AVRDUDE and you can use an UNO or similar running ArduinoISP to communicate with an AVR. One tutorial is by Ladyada:

Thanks, when I get back home I have some reading to do. Another thing, when I tried the controller from the UNO board I think I had RTS connected instead of DTR so I'll retry that.

gardelec:
I just noticed that the serial monitor is working. The chip was previously loaded with a number generator sketch that runs once when it is reset using the AVRISP and I can see the numbers in the serial monitor every time I reset it.

I missed that!

You mean you are running a sketch on the chip which you previously loaded using ISP so that you have erased the bootloader!

No wonder it will not load through the serial! :o

Use the ISP to put the bootloader back on the chip.