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

multi pin interrupt

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



Joined: 07 Nov 2008
Posts: 60

View user's profile Send private message

multi pin interrupt
PostPosted: Sat Jul 17, 2010 4:14 am     Reply with quote

Hi everyone, I need of five interrupted pin, it's possible with a pic?
Thanks in advance everyone.
Regards.
jbmiller



Joined: 07 Oct 2006
Posts: 73
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jul 17, 2010 6:01 am     Reply with quote

couple of easy ways...
1...diode OR the input pins to the INT_EX pin
in your interrupt routine,look to see which input caused the interrupt..


2...use all of portb for your inputs,again within your ISR look for which pin went high.


1 needs extra hardware(the diodes) 2 is just cutting code.
Jerson



Joined: 31 Jul 2009
Posts: 125
Location: Bombay, India

View user's profile Send private message Visit poster's website

PostPosted: Sat Jul 17, 2010 6:41 am     Reply with quote

I think it is possible since most pics have RB0 as the external interrupt pin and RB4..7 as pins that can give an interrupt on change. You need to check for your particular chip if this is true.

then as suggested by Miller, you can identify the source of the interrupt when you get into the ISR.
nicotec



Joined: 07 Nov 2008
Posts: 60

View user's profile Send private message

ok, solution
PostPosted: Sat Jul 17, 2010 7:43 am     Reply with quote

Thanks for your idea, I found a pic24 which has up to 5 interrupt pin.
Regards
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