Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Connecting two uC with UART

Status
Not open for further replies.

Kaleborg

Member level 4
Joined
Nov 2, 2008
Messages
75
Helped
7
Reputation
14
Reaction score
5
Trophy points
1,288
Activity points
1,776
Hello,
I'm uncertain about one thing and hope somebody here can clear it out for me.

I need to connect two uC together, one is PIC18F working on 5V and the other one is M16C working on 3.3V. My question is it ok to simply connect them together or do i have to use some level shifting or simple resistors will do.
The M16C can work on both 3.3v and 5V but in this particular case its operating on 3.3V. Datasheet says that voltage on pins can be Vdd+0.3V so in this case max voltage would be 3.6V but since it can operate on 5V i suspect that i can connect it directly to 18F.

Thanks in advance

Regards
 

You have to check compatibility of voltage-levels of input & output conditions of both uCs. If each one can accept (as input) High & Low output-voltage-levels of other uC, you can directly connect them (these characteristics are mentioned in datasheets)
you may interest details on following link,
https://www.edaboard.com/blog/329/
 

hi

and the PIC too will work on 3.3V

ml
 

As per the logic level specifications of the ics you have mentioned,

For PIC18F: VIH - 2.05V to +5V(max), VIL - 0.8V(max)
For MC16C: VIH - 2.64V to +3.3V(max), VIL - 0.66V(max)

So, if output of PIC18F exceeds +3.3V, this may damage the MC16C

And as mentioned you can go for resistive divider solution but try to check the sensitivity (minimum current required on the pin for the logic level to be sensed) of the pin....
 
Is this a quick lashup for testing or a design prototpe?

The correct way of doing it is to use some form of level translation using open collector or open drain gates with pullup resistors to the correct voltage.

A quick fix is simply to put a 2-20K resistor in the serial data lines to limit the current flowing into the input. Also if required (and it usualy isn't) put a crowbar diode up to the lower voltage Vcc line from the input pin. Nearly all IC's will tolerate having Vcc+0.7V (see their data sheets) on an input if it won't check and see if it will take the Vcc+0.2V of a schottky diode.
 
Last edited:
Hello,

Thanks very much for all replies.
I got this system to work.
What i did was:I connected Tx of pic to Rx of M16C trough a 1K resistor and Tx of M16C to transistor to raise voltage on pic Rx pin. Pins on M16C seem to be very tolerant to different voltage levels as long as there is some resistance in a way.

Thanks again

Regards
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top