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 support@ccsinfo.com

Two uarts with two interrupts

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



Joined: 07 Sep 2007
Posts: 41

View user's profile Send private message

Two uarts with two interrupts
PostPosted: Wed Feb 06, 2008 4:14 am     Reply with quote

Hi there. Im using a PIC16F876A and i´m using two uarts with the following pins

#use rs232(baud=9600, rcv=PIN_A0, ERRORS , STREAM=CARDREADER)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS, STREAM=COMM)

One is for communications and the other one is for a RFID tag reader. The problem is i that i needed to interrupt the communications when a cardreader appear is that possible? Thanks...
Ttelmah
Guest







PostPosted: Wed Feb 06, 2008 6:58 am     Reply with quote

Simple answer. No.....
To 'interrupt', in the hardware sense, requires that you are connecting to a pin/device, that has this ability. You are not.
Now, if you reversed the streams, you could 'interrupt', since the hardware UART, does support this ability.
The second choice, would be to connect the software UART to pin B0, rather than A0. This pin supports interrupts, so you could potentially have your code called when the line drops at the start of transmission.
You don't say how fast your processor clock is. This will affect the time taken to reach an 'interrupt', and potentially whether characters may be lost when this happens.
Do a search here, where the ability to perform software serial, using hardware interrupts, has been discussed many times.

Best Wishes
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