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

Two serial ports

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



Joined: 11 May 2006
Posts: 78

View user's profile Send private message

Two serial ports
PostPosted: Tue May 13, 2008 4:06 am     Reply with quote

Hello all,

I have two serial ports set up, one is the hardware serial port the other is a software serial port, the INT(RA) works fine for the hardware port but, is there any way to get the software port to interrupt the program??

Kind Regards
Stephen

PS I Have a 16f688
meereck



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

PostPosted: Tue May 13, 2008 5:22 am     Reply with quote

Connect RS232 receive signal also to the INT_EXT pin and use ext_int_edge(H_TO_L);, the interrupt will be fired when the start bit occurs . Use #int_ext to get the char. call fgetc within the interrupt routine.
It should be noted, in contrast to the hw UART, the interrupt will be called once the transmission starts. Within the HW UART, the RDA interrupt is called when the byte is ready in the receive buffer.
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