hi i'm now making a pulse counter
i'm supplying pulses externally to the pic 16f877a and i want to get the count to display..
the displaying funtion is done..
but i'm not sure how to handle the RB0/int
this is my interrupt function
void interrupt()
{
if(INTCON.INTF==1)
{
count9=count9+1;
if(count9==999)
{
count9=0;
}
intcon.intf=0;
}
}
void main()
{
int a,b,c,d,k,m,n;
TRISB=0b11111111; //portb is configured as an input
INTCON= 0b10110000;//i have enabled the tmr0 interrupt and RB0/int interrupt
OPTION_REG= 0b11000010;//rising edge selected and the prescaleer selected for the tmr0
TRISA=0b11111111 ;
TRISC=0b00000000;
TRISD=0b00000000;
TRISE=0b111;
...
...
...
}
i'm supplying pulses externally to the pic 16f877a and i want to get the count to display..
the displaying funtion is done..
but i'm not sure how to handle the RB0/int
this is my interrupt function
void interrupt()
{
if(INTCON.INTF==1)
{
count9=count9+1;
if(count9==999)
{
count9=0;
}
intcon.intf=0;
}
}
void main()
{
int a,b,c,d,k,m,n;
TRISB=0b11111111; //portb is configured as an input
INTCON= 0b10110000;//i have enabled the tmr0 interrupt and RB0/int interrupt
OPTION_REG= 0b11000010;//rising edge selected and the prescaleer selected for the tmr0
TRISA=0b11111111 ;
TRISC=0b00000000;
TRISD=0b00000000;
TRISE=0b111;
...
...
...
}