I haven't tried this yet. Does this look like it will work?
Code:@ device pic16F628A, INTRC_OSC_NOCLKOUT, wdt_off, mclr_off, lvp_off, protect_off TRISA = %00000100 ' Make all port a pins inputs except for 5 TRISB = %00000000 ' Make port b pins outputs B15 VAR PORTB.7 switch: if porta.5 = 0 then cal if porta.5 = 1 then main goto switch cal: low B15 pause 3000 ' pause 3 seconds HIGH B15 pause 3000 if porta.5 = 0 then cal goto switch main: IC performs main routine
Bookmarks