PDA

View Full Version : A basic interrupt question: plz help



shaiqbashir
- 14th May 2006, 05:03
ON INTERRUPT GOTO myint ' Interrupt handler is myint
INTCON = %10010000 ' Enable RB0 interrupt



hi guys!

well! im new to these interrupts. The above two lines i have copied from MicroCode help section. I want to know the meaning of this line

INTCON = %10010000 ' Enable RB0 interrupt

I know that portB.0 is the pin that has the interrrupt facility in it in PIC16F84A. Im using the same microntroller, but what im not getting that if first 1 in the above line is for B0 then why there is a 1 another time. Or simply
please explain me the meanings behind the above line.
can i change the above statement according to my choice or is this compulsory to write it in the same way??


please help me as soon as possible as i have a pretty short time left for my project

i shall be thankful to u for this act of kindness.

take carez

Melanie
- 14th May 2006, 09:03
If you haven't already done so, please Download the DATASHEET for the PIC16F84A from the Microchip Website. You will find the full definition of INTCON and what each Bit means within. Make your selection as to your individual requirements thereafter.