CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

rs232_errors for USART2

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
cerr



Joined: 10 Feb 2011
Posts: 241
Location: Vancouver, BC

View user's profile Send private message

rs232_errors for USART2
PostPosted: Thu Jun 02, 2011 11:13 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Jun 02, 2011 11:51 am     Reply with quote

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!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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