I have a MAX 2323 device with its RS232 port connected to a GPS device and the TTL output to UART 2 of an Arduino MEGA.
I'm using this Sketch as a simple test to ensure the data is coming in:
void setup() {
** // initialize both serial ports:**
** Serial.begin(9600);**
** Serial2.begin(4800, SERIAL_8N1);**
}
void loop() {
** // read from port 1, send to port 0:**
** if (Serial2.available()) {**
** char in = Serial2.read();**
** Serial.write(in);**
** }**
}
Initially the data being output was mostly garbled but then after leaving it running for an hour the data suddenly became 98% good but then after 10 mins returned to garbage.
I've connected the GPS into my Mac and the data is flawless so i'm beginning to suspect the MAX2323 device. I have tried the same setup on an Arduino DUE also.
Can anyone recommend an RS232 to TTL adapter that is known to work? The one I have is made by LC Technology Inc
Many thanks.