hi
i am programming pic 16f877 in c using FED pic c compiler .i want to connect a switch to RB4 and generate an interrupt when the switch is closed so that i could go to the main prog and increase a count variable and also switch on 3 leds connected to the first 3 bits of Port A.
this is how i did it but it does'nt work
i created a variable called Flag of type byte as a global var.
then in the main prog i tested if Flag was 1 or 0,if 1 i then increased count and set portA to 111.
then in the interrupt routine i tested the RB4 bit ,if 1 then i set Flag to 1 then cleared RB4
i dont know what to do again
any help or any link to an example or tutorial involving interrupts on RB4-RB7?