Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

USB-serial bridge DTR line to uC pin, failure

Status
Not open for further replies.

upand_at_them

Active Member
I have a problem with interfacing the DTR signal line of a USB-serial bridge (CP2102) to a microcontroller dev board. (Both are 3.3V.)

I'm using the bridge to flash new firmware to the uC. I manually jumper the uC's reset pin and one pin used to signal bootload mode. Works perfectly fine this way. But...

When I try to automate it, by using the USB-serial bridge DTR and RTS lines to control those uC pins (via a Python script), things do not work. Specifically, my problem is with the DTR line that goes to the "bootload" input pin on the uC. It shows a ton of noise when held either high or low.

With the uC disconnected, no noise. But with it connected there is too much noise to have a reliable trigger signal.

I have solved the problem by using a transistor in between the DTR line and the "bootload" pin. (And then inverting the signal in the Python script.)

But here's my question (finally): Why do I need to do this? Why am I having trouble connecting the DTR line directly to the uC "bootload" input pin? They both operate at 3.3V levels. And I have tried all manner of pullups and pulldowns, to no avail. And is there another solution such that I don't have to invert the DTR signal (without using a buffer chip)?
 
There could be several possibilities I would initially investigate. Is the transceiver supply really well decoupled? Are cable lengths within specification? Is the DTR line somehow leaking current into your application circuit, if so, is it enough to pull the supply too low for the transceiver to operate normally? I guess a simple LED on the end of it as a load and a quick probe with a scope would tell you. Is the com port driver behaving as expected, is there an update for it from Silabs? Is this just a bad device?
 
I did some more experimenting today and got reliable results by putting a 220 ohm resistor in the DTR line. I guess it's mitigating signal bounce? Or there was too much current being drawn?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top