CP2104 to Attiny

I have a design where the CP2104 is connected to one of the serial ports on an Attiny 1634.

I’m assuming I just need to connect the RX/TX and ground from the CP2104 to the attiny?
So the CP2104, when active, will be powered by the USB cable, correct?

Also, what I’m finding is connecting the CP2104 to the Attiny serial port 2 messes up the chip programming. The RX/TX lines on the Attiny are also used for programming (MOSI and MISO) so I can see why that would be, but is there any way around this or do I have to disconnect the rx/tx to the CP2104 every time I want to program the chip?


The problem is that the CP2104 pin defaults high when idle.

You can decouple the CP2104 from the ATTINY with a diode between the CP2104 TX and the ATTINY RX. Something with low drop-out voltage, such as a BAT-43 Schottky or whatever, would be best. Anode to ATTINY RX, cathode to CP2105 TX. You may also want to use a weak pull-up on the anode/ATTINY end – 10 kOhm or higher – or just turn on the built-in pull-up on the RX pin.

Hello, Martan.

You should only need to connect TX, RX, and ground between the CP2104 and your ATtiny to serially communicate between the two devices.

Yes, the CP2104 can be powered by the USB port; the green LED on the board will come on when it is connected to an active USB connection.

jwatte’s suggestion for decoupling the pins sounds like it might work.

- Jeremy

Thanks guys. I’ll try the diode and turn on the pull up.