(edit)
Lab 2 Pic-
Code-(based on code from pcomp class)DEFINE osc 4OUTPUT portd.0INPUT portb.7snacks:IF portb.7 = 1 THENHIGH portd.0PAUSE 1000LOW portd.0PAUSE 1000ELSELOW portd.0ENDIFGOTO snakcks