Go Down

Topic: Handling serial parity errors (Read 1 time) previous topic - next topic

MCDO

Sorry if this isn't the correct subforum.

Arduino 1.0.2 gives me the option to use parity error detection on serial connections. Does anyone know if I need to manually handle parity errors, or does the Arduino automatically request retransmission?

Thanks!

CrossRoads

Would really depend on your sketch, wouldn't it?
I am betting manually, not all sending devices would be capable of resending.
The protocol you are using would define what happens when parity error is detected.
The data may have error correction built in for example, allowing the receiver to correct the error.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

MCDO

Thanks for the quick reply!

I don't suppose you know if there's a function I can call to determine if a parity error has been detected? I'm using SERIAL_8E1 (8 data bits, even parity, 1 stop bit) if that makes any difference.

CrossRoads

I've not used anything except Serial.begin() library, no experience with parity detecting code.
What's your environment that you expect parity errors to occur?
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

MCDO

#4
Nov 25, 2012, 06:29 am Last Edit: Nov 26, 2012, 01:27 pm by MCDO Reason: 1
Sorry for the confusion. As of Arduino 1.0.2, Serial.begin() takes an extra (optional) parameter that defines the configuration of the serial connection.

Since it's so new, the only information I could find on it was some discussion on Google Code, and the Serial/Begin page.

I also tried snooping around the HardwareSerial code, but it's mostly over my head.

I'm not expecting parity errors, but if they happen I'd like to be able to handle them gracefully.

Go Up