Hi,
I am trying to poll RB1 and RB2 of 16F628, once an external interrupt occurs.
I am able to handle the EXT interrupt.
But by default the ports RB1 and RB2 are reading as high,and when i connect it to GND(VSS) then its becomming '0'.
Actually i want to connect two switches to these ports and set some values using these switches.
I want to have a port state change when key is pressed (and not when released)
Now I am confused on how to connect these switches.
Also i would like to know is there anything wrong in connecting port pins directly to VDD or VSS.
Finally i would like to know is it okay to check the port as if (RB1==1) using C, or should i read the entire port and do a shift operation?
Regards
Alphadl
I am trying to poll RB1 and RB2 of 16F628, once an external interrupt occurs.
I am able to handle the EXT interrupt.
But by default the ports RB1 and RB2 are reading as high,and when i connect it to GND(VSS) then its becomming '0'.
Actually i want to connect two switches to these ports and set some values using these switches.
I want to have a port state change when key is pressed (and not when released)
Now I am confused on how to connect these switches.
Also i would like to know is there anything wrong in connecting port pins directly to VDD or VSS.
Finally i would like to know is it okay to check the port as if (RB1==1) using C, or should i read the entire port and do a shift operation?
Regards
Alphadl