Let's Make Robots!

Question from Someone who is Supposed to be Answering Questions

rik and I were talking about this a few days ago and it crossed my mind again today.

What are your thoughts on sending serial data from one pic (say picaxe or arduino) to another pic and if you should have a current-limiting resistor in series between them. In my case, both chips are running off of the same 5v regulated power supply.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I must confess, that I've killed a microcontroller and a Roomba main board, by mistakenly connecting TX and TX together. A simple serial resistor would have avoid this desaster. Only the UART pins have been damaged the rest seems to be ok.

In most cases a resistor is not essential since the pin receiving the data will have a very high impedance but......

1st reason you should add a resistor
Due to a bug in your software (or you just plain wired it wrong) you end up with 2 pins joined together, both set to output, and one pin is high while the other is low. This effectively shorts your pins an may damage your processors.

2nd reason you should add a resistor
Your TX voltage is higher/lower than your RX. For example RS232 from your PC may be at +/- 12V rather than 0V-5V.

Because your RX pin should be in a high impedance state, a resistor of about 20-30K should not affect the signal and will provide reasonable protection against voltage differences such as RS232. Most MCU pins do have protection against static electricity but the internal protection diodes cannot handle much current. A resistor of 20-30K will safeguard the internal diodes.

If you do find the resistance causes problems and / or you are certain that high voltage will not be a problem then a resistor of at least 220 ohms can protect your MCU pins from accidental short circuit.

I googled and googled this one and of course, simply found a ton of posts about the RS232 vs. TTL power issues. --It was not real easy to find search terms to find pic to pic info. I assumed the same, all of my stuff is direct wired and I have had no/few problems. I just got to thinking about this and thought now that Walter is getting close to "all put together" and up-and-running, if this were an issue I had missed, I should stop and fix it now. Seems like we are good to go.

Thanks

The only two things I can see as concerns are that your logic levels are compatible (range of voltages defined as logical HIGH and LOW), and that each output has adequate current source to sink into each input.

Most likely, you are good to go.

Also, I figure you already knew that, but I posted for the benefit of anyone who doesn't. ; j

You beat me to the source sink related issue that I have always been concerned about, I like throwing a small1/8 or 1/4 watt 1k in series just in case.

On my robot the 2 PICs are just wired together, without a resistor, works fine. Agree with Tinhead.

As long as the GND is shared between the two it should be fine, not sure why you would need resistors in series except for the case one chip is 5V and the other 3.3V.