CP2102 USB to UART Programming Breadboard Arduino Uno

Hi everyone,

I've looked through the forum for similar issues and haven't been able to find a solution. I'm having difficulty using a CP2102 to program an atmega328p chip on a breadboard with an external 16MHz oscillator.

Pinout between CP2102 and atmega328p chip:
DTR ->pin 1 (reset)
TX -> pin 2 (RX)
RX -> pin 3 (TX)

Things that I have tried thus far:

  • Used an Arduino as ISP in order to burn bootloader onto chip
  • verified this was successful due to 3 blinks from LED on pin 19 after burning
  • Installed CP2102 drivers from Silicon Labs website for Windows 10 x64 (link)
  • verified this was successful through device manager
  • Tried to load blinky program via CP2102 to atmega328p
  • failed due to some sync issues. not quite sure why, but I think this is the main issue
  • Loaded a Serial echo program to test if there are issues between TX and RX pins via ArduinoISP
  • successful install on atmega328p based on LED no longer providing 3 blinks (bootloader successfully overwritten)
  • Reattached CP2102 and viewed Serial monitor to send/receive data to atmega328p
  • successful data transfers, so I know RX and TX pin connections are correct and no issues involved between communication between CP2102 and atmega328p chip

My best guess is that there is an issue between the Arduino IDE and the CP2102. I know I will also have to reinstall the bootloader since it was overwritten with the Serial test. Maybe I'm using the incorrect programmer setting within the IDE, which I'm currently using "AVRISP mkII". Should I be using a different programmer from the list provided, or somehow install a "custom" programmer so the IDE knows its using the CP2102?

Thanks for any advice provided.

1 Like

Try a 100nF capacitor between DTR and Reset.

1 Like

Hmm, not sure if that will help solve the issue I'm having... I should have also noted that the CP2102 has no problems resetting the atmega chip.

One of the things I have also noticed is that after getting a sync error in the IDE, the atmega chip is reset by the CP2102. Seems like something is at least being sent to the CP2102 from the PC.

"It’s important though, that we don’t hold the 328P in reset. We just want to pulse the pin very, very briefly, so that the bootloader can listen to SERIAL_Rx and determine if a new sketch is being sent. When the RESET pin on the 328P is low, all the pins (except for the ICSP pins, I believe) are set to a high impedance state, effectively killing the serial pins. So we pulse the Pin 1 on the 328P to issue the reset, not drag it low then drag it high again."

2 Likes

WOW, that did the trick!

At first, it didn't make sense to me that we would need to filter out the DC signal with a capacitor, but that excerpt you posted says differently. Never knew the TX and RX pins would be unresponsive too long to miss a call to upload a new sketch. You learn something everyday!

Thanks again for the help, kprims. I'm also extremely sorry for ever doubting you too.