myj
Newbie level 2
- Joined
- Oct 12, 2009
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- Philippines
- Activity points
- 1,294
Hi all,
Im having problem with my code. i am using mikroC compiler and PIC16F877A Microcontroller.
I incorporate external interrupt RB0/INT as input as i simulated thru the use of PROTEUS the interrupt does not occur. See please my code and have a solution for my problem.
main(){
unsigned int gCOUNT;
TRISB = 0x01;
TRISA = 0x00;
INTCON.GIE = 1; //Enable Global Interrupt
INTCON.INTE = 1; //Enable RB0/INT external Interrupt
INTCON.PEIE = 0; //Disable all unmasked peripheral interrupt
OPTION_REG.INTEDG = 1; //Interrupt on rising edge
if(INTCON.INTF == 1){++gCOUNT;}
}
Thanks,
joenil
Im having problem with my code. i am using mikroC compiler and PIC16F877A Microcontroller.
I incorporate external interrupt RB0/INT as input as i simulated thru the use of PROTEUS the interrupt does not occur. See please my code and have a solution for my problem.
main(){
unsigned int gCOUNT;
TRISB = 0x01;
TRISA = 0x00;
INTCON.GIE = 1; //Enable Global Interrupt
INTCON.INTE = 1; //Enable RB0/INT external Interrupt
INTCON.PEIE = 0; //Disable all unmasked peripheral interrupt
OPTION_REG.INTEDG = 1; //Interrupt on rising edge
if(INTCON.INTF == 1){++gCOUNT;}
}
Thanks,
joenil