Hey guys, After almost a whole week tinkering with this stupid LCD, I found out I was the one being stupid. Apparently because my board and the LCD had different grounds, they were not able to communicate serially.
Hehe, we've all done that.
Would anyone be so kind as to explain to me why they have to be connected to the same power source?
They don't need to be powered from the same supply but they do need to have a common ground. Otherwise it's like a lightbulb with only one wire connected to power
.
If you want one device to communicate with another then current needs to flow between. If you only connect the signals wires there's no current flow.
I noticed that when I didn't plug my oscilloscope to the circuit's ground instead of seeing the square wave of my serial signal, it displayed the square wave of the signal ridding on something that looked like a sine wave.
The scope is always grounded to mains earth. So any measurement it displays is with reference to mains earth.
It's likely there was actually some ground connection between the scope and your circuit (even with the scope ground clip unplugged) due to mains earth getting to your circuit through some other means. It probably had to travel through half the mains wiring in your house and back again and as a result the signal quality is terrible and you get 50/60hz mains noise superimposed on top.
Even if there was definitely no earth connection to your circuit it would have been earthed somewhat just by capacitive coupling to nearby earthed objects. The scope input is high impedance so will pickup stuff like that without a proper ground.
Also things start acting like an antenna without an ground.