I'm trying to do serial communication between UNO board and Due. I have read that uno communicates at 5volts and due at 3.3v. So i have made a level shifter using transistor q2n2222.
The problem is that the values(characters,numbers etc) i'm sending from uno appears perfectly at serial monitor of uno but gets changed at serial monitor of due..
The data is getting received at each baud rates but the only problem is that the same data is not getting received..
For example:
Code at Arduino UNO Side
Serial.write("N");
Code at Due:
char x=Serial.read();
Serial.println(x);
Also the level shifter ckt is attached
Both resistors used are 1K
Transistor used is q2n2222.
V+ in the image is 3.3v from Due.
The Due has more than one hardware serial port. Using the one that the PC is connected to to talk to the Uno doesn't seem like the best use of resources.
The problem is that the values(characters,numbers etc) i'm sending from uno appears perfectly at serial monitor of uno but gets changed at serial monitor of due..