Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

How to detect interrupt pin?

Status
Not open for further replies.

d@nny

Full Member level 5
Joined
May 28, 2011
Messages
246
Helped
11
Reputation
22
Reaction score
11
Trophy points
1,298
Activity points
3,238
hell0!
when iterrupt on INT RB0 occurs it goes of 04 location. Is all the 4 interrupt pins in pic16f84 goes to same position if yes than how to detect on which pin interrupt occurs? or i nee to read the pins in interrupt routine
thanking you in anticipation
 

xxtigerxx

Advanced Member level 1
Joined
Jun 5, 2001
Messages
444
Helped
38
Reputation
76
Reaction score
32
Trophy points
1,308
Location
Greece
Activity points
2,903
only pin INT0 RB0 have interrupt. no other pin.

You can recognise the interrrupt source for the flag at the register.
 

wp100

Advanced Member level 5
Joined
May 15, 2009
Messages
3,056
Helped
883
Reputation
1,781
Reaction score
736
Trophy points
113
Location
Prime Meridian
Activity points
0
Hi,

You have two different Interrupts available on Port B.

RB0 which can detect the signal change / transision from high to low or low to high and is reported by the INTF bit.

RB4-7 can detect a change of state from 1 to 0 or 0 to 1 on any of those 4 bits and is reported by RBIF.
Not aware that the ISR can tell you which of those 4 bits has changed, you would have to do that with your own coding by saving the current state of PortB, before activating the Interrupts, and comparing it with the new state of PortB when RBIF / the ISR is activated.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top