|
|
View previous topic :: View next topic |
Author |
Message |
cerr
Joined: 10 Feb 2011 Posts: 241 Location: Vancouver, BC
|
rs232_errors for USART2 |
Posted: Thu Jun 02, 2011 11:13 am |
|
|
Hi There,
How do I make a difference between rs232 errors on USART1 & 2? The variable rs232_errors seems to only represent errors from USART1, how do I get the ones from USART2?
Thank you,
Ron
That would be the distinction between RCSTA & RCSTA2 - I know that i can get acccess by using sft but because RCSTA is so nicely represented in a variable, is RCSTA2 represented as well? |
|
|
cerr
Joined: 10 Feb 2011 Posts: 241 Location: Vancouver, BC
|
|
Posted: Thu Jun 02, 2011 11:51 am |
|
|
I tried below to recognize a BREAK but it doesn't seem to work properly :( Why not?
Code: | #byte RCSTA2 = getenv("sfr:RCSTA2")
#use rs232(baud=BAUDRATE,parity=N,xmit=PC_TX,rcv=PC_RX,UART2,bits=8,stream=PC, ERRORS)
if (bit_test (RCSTA2, 2)&& ! input (PC_RX)) {
//BREAK
} |
RCSTA2 just keeps the value 0b10010000 and doesn't signal a FERR. Why not I'm wondering... :(
Thanks for hints! |
|
|
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|