I am making a simple touch screen to HID mouse adapter to avoid having to create a device driver. The touch screen commmunicates using RS-422. I know that the touch screen is reporting, because I can read it through the USB adapter connected to my computer. However the Micro does not see anything.
The code that I am using for now is the simple Mega example that passes data back and forth between Serial and Serial1. The code is compiled on Windows 8.1 with IDE v1.0.5-r2 and gcc 3.4.2.
The schematic for the ciruit that I am using is attached. The ic is a MAX491, the capacitor is 0.1uF ceramic, and the resistor is a 120 ohm 1/4 W 1% resistor.
Can someone look at the schematic and see if I am missing something, or if their is an issue with my setup (Windows 8.1 is a pain, but I love my surface).
I just tried the setup with a Mega 2560 with the same result. I know that the issue is probably in the MAX491 circuit, but I followed the reference design.
I do not have access to a scope but it appears that there is a constant +5V on both pins 2/5 once power is applied to the circuit with no other external connections.
Your circuit looks fine to me.Try to do a loopback test in the MAX491 connecting the TX(9,10) pairs to the RX(12,11) pairs and send something using a Serial.println;
If all are ok you should get the signal back in the RX.
Something like this:
void setup() {
// initialize both serial ports:
Serial.begin(9600);
Serial.print("Ping Pong");
}
void loop() {
// read from port 1, send to port 0:
if (Serial.available()) {
char inByte = Serial.read();
Serial.print(inByte);
}
}