nis2311
Member level 2
I want to make Microcontroller to enable interrupt when Gnd is connected to INT0 (RB0) Microcontroller.
but my code is working only when 5 v or VDD given to INT0 (RBO).
My code is Below
A push button is connected to RB0 and ground. Pullup is added at RB0 to VCC.
Give me solution to find it ..................to work interrupt when VSS signal given.
but my code is working only when 5 v or VDD given to INT0 (RBO).
My code is Below
Code:
void interrupt extern()
{
if(INT0IE && INT0IF)
{
RC0=1;
}
void main()
{
ADCON0=0x00;
ADCON1=0x0F;
PORTA=0X00;
PORTB=0X00;
PORTC=0X00;
PORTA=0X1F;
TRISB=0x03;
TRISC=0X00;
PEIE=1; //Enable Peripheral Interrupt
GIE=1; //Enable INTs globally
INT0IE=1;
INTEDG0=1;
while(1);
}
A push button is connected to RB0 and ground. Pullup is added at RB0 to VCC.
Give me solution to find it ..................to work interrupt when VSS signal given.