>Has anyone got any simple code that I can 'borrow' to make a '84 wake up >from sleep mode when an input changes state? I also want some code to put >the device back into sleep mode. ORG H'000' ;Reset vector for 16C84 PIC's btfsc STATUS,_PD ; goto Star1 goto Star2 ORG H'004' ;Interrupt vector goto ISR ORG H'005' Star1 btfsc STATUS,_TO goto PwrUp ;Power-up condition, TO & PD = 1 goto X_Init ;WDT time-out, not sleep T0=0, PD=1 Star2 btfss STATUS,_TO goto Wake_up ;WDT time-out, sleep T0=0, PD=0 Wake_up sleep Check page 2-543 of the 94 databook for explanation of the TO and PD Status bits., and the "SLEEP" instruction. PortB and INT interrupts will wakeup the processor as well as a watch-dog timer time-out. Execution may start at the ISR vector H'004' or elsewhere, depending on how the interrupts are configured.