I am using an Arduino Mega connected to a add on board I had made for a GPS reciever chip. I have the reciever's UART B connected to the Mega Serial2. I also have the reciever's UART A connected to a RS232 level converter. The port connected to the level converter works fine. I get NMEA out and can send NMEA commands to it. I can also use the manufacturers software to change port A over to thier proprietary data format and display much more data that what you can get through NMEA strings. Using their program I can change the UART B from the proprietary message to NMEA also. I can always get NMEA to show up but I cannot see any data comming in on the Proprietary format.
Heres the issue their prop message says its 1 start bit, 8 data bits, 1 stop bit, odd parity,no flow control. I've tried a number of ways but I cannot seem to change the parity on Serial2. Here's what I have tried.
byte inbyte;
void setup()
{
Serial.begin(9600);
Serial3.begin(115200);
Serial1.begin(115200);
Serial2.begin(115200);
UCSR2C = B00110110;
UCSR2B = UCSR2B | B00000100; //I added this later thinking 1 start bit meant it needed to be 9bits
}
// also tried UCSR2C = UCSR2C | B00110000;
void loop()
{
if (Serial2.available() >0){
inbyte = Serial2.read();
Serial.println(inbyte);
}
}
Any help would be appreciated