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

multiple interupts

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



Joined: 30 Mar 2004
Posts: 7

View user's profile Send private message

multiple interupts
PostPosted: Sat Apr 10, 2004 5:16 am     Reply with quote

Hello everyone
Just moved ccs from picbasic and discovered that i can't use my PCM for 18F series.
In my project i used an 18F452 which had 3 ext interupts pins RB0-RB2
Does anyone know of any 16F series or 17C that have got this feature so that i can use PCM ?

Iyobor
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Sat Apr 10, 2004 9:50 am     Reply with quote

One way is to use PIC16F873/4/6/7 and use the RB0 interrupt and the two capture (CCP1 and CCP2) interrupts.
iyobor



Joined: 30 Mar 2004
Posts: 7

View user's profile Send private message

PostPosted: Sat Apr 10, 2004 10:59 am     Reply with quote

Thanks Ali
But that is not an option for me as i am using one of the capture (CCP2) interrupts. To measure period in my program

iyobor
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Sat Apr 10, 2004 5:59 pm     Reply with quote

Let's say you have three interrupt sources 1,2 and 3, and you want to interrupt on rising edge. Connect sources 1 and 2 to RB0 via an OR gate, and connect sources 2 and 3 to CCP1 via another OR gate. When you get an interrupt, in the ISR you can check the flag bit of the other interrupt. If it is also set that means source 2 has interrupted. Otherwise the source is source 1 or source 3, depending on the ISR you are in. I think this method should work.
iyobor



Joined: 30 Mar 2004
Posts: 7

View user's profile Send private message

PostPosted: Sun Apr 11, 2004 6:46 am     Reply with quote

Thanks Ali
It makes sense


Iyobor
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