serial communicating Due and Mega 2560

Hi, i'm a student and for a school project i have to communicate the Due and Mega boards through pins Rx and Tx. I have succesfully done it with Uno and Mega, but as far as due's operating voltage is 3.3v what i have to do to communicate both boards?

1 Like

Put series resistors on the Rx and Tx lines, to limit the current into the Due pins. Something on the order of 300 ohms should work fine.

Regards,
Ray L.

Thx for the reply! But what i should do between the Tx pin of due and rx pin of mega?

Just a wire will work. The 3.3v output of the Due can't damage the Mega and it will still be read as a logic line.

MorganS:
Just a wire will work. The 3.3v output of the Due can't damage the Mega and it will still be read as a logic line.

But the 5V output of the Mega WILL damage the Due!

Regards,
Ray L.

Ray the wire is on the tx line from the due to the rx line on the the mega so the current is flowing from the due to the mega and will be at the due voltage. the advice above is to put a resistor on the tx mega to rx due to reduce the voltage I wonder if a diode to prevent accident al voltage flowing back to the due from the mega rx board might be advisable? i apologise in advance for my awkward language, English is my first language I only have a smattering of electronics.

A suggestion ...

Yeah. That will also work but the series resistor from post #1 will also work. The resistor will limit the leakage current so that neither Due nor Mega will suffer. But I would use something like 1k-10k.

A diode from Due RX to + supply would also work, at least almost. First there is already a diode internal in Due there, so adding an other would not help 100%, a schotky diode is better. But a diode will short Mega's TX to positive supply, so Mega would take more current. This would not harm Mega (probably) but it would run a little warmer.

With 4.7 VOH, should get 3.164V at the Due RX pin. I know there's internal diode protection on the Due, but its impossible to use this protection without exceeding the 3.6V max voltage spec (geez, thanks Atmel!). At least with FPGAs the I/O capabilities are fully published and the user has the opportunity to turn the diode protection on or off (via selecting a different I/O standard).

Yes, FPGAs are different.

I don't have tried this with DUE, but usually it is not so dangerous to let those protection diodes conduct a little. It may cause some "funny" effects while powering up or down but nothing breaks.