how about something like
untested but.. my last brain cell tell it's suppose to work or give you some pointers.Code:OPTION_REG.7 = 0 ' Enable pull-up on PORTB CopperSheet var PORTB.0 LED var PORTB.1 Delay var word Start: delay=0 while (coppersheet=0) and (delay!=2000) pause 1 delay=delay+1 wend if delay=2000 then toggle LED endif goto start




Bookmarks