Joined: 04 Aug 2015 Posts: 16 Location: United States
#USE RS232 -> ERRORS
Posted: Thu Aug 20, 2015 9:41 am
Hey all,
After reading in the CCS C Compiler manual updated in May 2015, I still do not clearly understand what ERRORS mean for the #USE RS232 preprocessor directives. I have used it in my previous codes but it does not seem to change anything flow or content.
ERRORS: "Used to cause the compiler to keep receive errors in the variable RS232_ERRORS and to reset errors when they occur."
Anyone have a better definition for this?
Thank you!
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Thu Aug 20, 2015 10:39 am
They mean UART framing errors and hardware buffer overrun errors.
jeremiah
Joined: 20 Jul 2010 Posts: 1353
Posted: Thu Aug 20, 2015 10:44 am
When you operate a uart you can encounter the errors mentioned by pcm. Normally this makes your uart dead in the water until you clear them. The ERRORS keyword does this for you when read the uart buffer. It also provides a variable you can optionally check to see which errors occurred. It is considered a "required" option for the uart for most users
12Lapointep
Joined: 04 Aug 2015 Posts: 16 Location: United States
Posted: Thu Aug 20, 2015 11:36 am
Thank you all for the comments. It is very clear now.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum