View previous topic :: View next topic |
Author |
Message |
nicotec
Joined: 07 Nov 2008 Posts: 60
|
multi pin interrupt |
Posted: Sat Jul 17, 2010 4:14 am |
|
|
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
|
|
Posted: Sat Jul 17, 2010 6:01 am |
|
|
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
|
|
Posted: Sat Jul 17, 2010 6:41 am |
|
|
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
|
ok, solution |
Posted: Sat Jul 17, 2010 7:43 am |
|
|
Thanks for your idea, I found a pic24 which has up to 5 interrupt pin.
Regards |
|
|
|