Have one side of the button connected to 5 volts, the other to the PIC pin. Have a 10 k resistor connected to the same PIC pin and ground (zero).
When the button is pushed ( assuming it is NO ) the PIN pin will be forced HIGH, that is 1.
Being this sounds like a school project, can you tell me why the below worked?Code:IF PORTA.1 = 1 THEN LABEL![]()
Code:SERIN2 PORTC.1,396,[WAIT("9"),STR MOVEMENT\2]





Bookmarks