I am trying to get two microcontrollers to communicate. One is a Tiva-C TM4C123GH6PM (3.3 V.) The other is an Arduino (5 V.) I will use UART.
Should the grounds of the two microcontrollers be connected to each other? Why is a common ground needed?
I am trying to get two microcontrollers to communicate. One is a Tiva-C TM4C123GH6PM (3.3 V.) The other is an Arduino (5 V.) I will use UART.
Should the grounds of the two microcontrollers be connected to each other? Why is a common ground needed?
Why is a common ground needed?
'Ground' is the reference point in a circuit which is assumed as 0V. Voltages at different nodes are quantified with respect to this ground point.
So if two microcontrollers are 'talking' to each other serially in terms of signals, then both micro-controllers should have a common reference point to 'understand' or 'agree upon' what's the voltage level of the signal coming from the other micro-controller. If one sends 3.3V, the other one needs to read it as 3.3V itself.
So yea, they should have a common ground.
Yes you certainly need to have a common ground connection for any physical layer that isn't designed to be galvanically isolated, such as Ethernet.