Is there code support for parity errror checking available

I have searched the forum and seem to be at an impasse. It would seem that there is no library that can do basic parity error checking as it was designed to be done. Would I have to rewrite the basic serial library from scratch or modify the existing library in order to detect an error? If so, you can stop reading now and just ignore me. Problem unsolvable.

If there are entries or locations I can check on a per-character basis, then all would be good, but I cannot seem to find such an entry without going all the way down to the low-level receive code in the serial library. It USED to be, in the olden days, that the return from a call to an RS232 routine gave both data and a status byte, but I believe that doesn't currently exist as things are written.

This was an extremely long post, with lots of details, but I deleted it all in favor of short and to the point. I have read a lot of forum posts, the tech info on the chip, and checked the basic coding but found nothing useful as the flags are destroyed upon the data capture to the buffer. All I need is the error indication because that is the "game over", in this application.

Anyone have a comment or any ideas?

I really want to avoid manually checking if at all possible. I'd love to get ALL the possible error flags but that would, I'm sure, be asking too much.

If you are using hardware serial, parity checking is built into the USART circuitry. It should not be difficult to modify the Serial.read() routine to return the parity check flag, or do something else if the parity is incorrect.

See section 20 (USART) of the ATmega328 data sheet, if that is the chip on the Arduino you are using.

Did you not look at the documentation for Serial.begin()?

Thanks JR, I guess I'll actually try a re-write. I wanted to stay as "Stock" as possible, as I may have to put out quite a few of these, but if it's not too bad of a job.

John, of course I read that, as how could one even "Begin" without, but specifically the begin offers no method of "Detecting" such an error occurs, nor does any other serial call or routine.

I am liking the idea of adding a two-byte return when getting serial data as that would allow me to grab ALL the error possibilities. (Overrun, frame, parity) For now, I'll just stick with no error check to keep production going and have the operator manually check every line of code after loading.

Thanks for the input. A little motivation can go a long way.