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

How to use multiple ioc pin with different isr functions?

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



Joined: 23 Feb 2019
Posts: 1

View user's profile Send private message

How to use multiple ioc pin with different isr functions?
PostPosted: Sat Feb 23, 2019 3:01 am     Reply with quote

Hello to all,

I'm trying to use multiple ioc pins with 16f1824 ic.
I can define all ioc pins separately but couldnt control with different isr functions.

I define them like ;
Code:

   enable_interrupts(INT_RA3);
   enable_interrupts(INT_RA4);
   enable_interrupts(INT_RA5);


but I could only control them with;
Code:

#INT_RA
void  RA_isr(void)
{
  .....
}


Do you have any advice for me to control them seperately like;
Code:

#INT_RA3
void  RA3_isr(void)
{
  .....
}
#INT_RA4
void  RA4_isr(void)
{
  .....
}
#INT_RA5
void  RA5_isr(void)
{
  .....
}


I can control them in INT_RA but , as you know any of the A3,A4,A5 pin change the isr_function runs ...
Ttelmah



Joined: 11 Mar 2010
Posts: 19549

View user's profile Send private message

PostPosted: Sat Feb 23, 2019 3:23 am     Reply with quote

There is only one IOC interrupt.

Your code in the handler has to test which bit has triggered it.

All you do is test which bit triggered, and then execute the required code.
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