Yigit Turgut wrote: > the code is as following already, forgot to add sorry; >=20 > sbit BTN1 at RB1_bit; > sbit PROT at RB2_bit; > sbit TEST at RB3_bit; >=20 > void main() { >=20 > TRISB =3D 00001110; > PORTB =3D 00001010; > PROT =3D 0; >=20 > while(1){ > if( BTN1 =3D=3D 0){ > PROT =3D ~PROT } } > What do you expect to happen when BTN1 goes back to =3D=3D1 ? --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .