Okay, let's try plain text this time. CODE BEGINS HERE #include p10f200.inc =A0 =A0 ; set up the chip and do other stuff Delay5m =A0 =A0 ; do the things =A0 =A0 ; 6 instruction overhead in here which is irrelevant to the beeping =A0 =A0 decfsz =A0TimerL,f =A0 =A0 goto =A0 =A0Delay5m =A0 =A0 btfss =A0 Beep,DoIBeep =A0 =A0 goto =A0 =A0$ + 3 =A0 =A0 movlw =A0 LED_MASK =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0; Sound a tone to= remind the user that =A0 =A0 xorwf =A0 GPIO,f =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0; the door is o= pen. =A0 =A0 decfsz =A0TimerH,f =A0 =A0 goto =A0 =A0Delay5m =A0 =A0 movf =A0 =A0TimerE,W =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0; Sound tone du= ring 6/256 TimerE iterations =A0 =A0 andlw =A0 b'11111000' =A0 =A0 =A0 =A0 =A0 =A0 ; Throw out the lower= 3 bits. =A0 =A0 xorlw =A0 b'11111000' =A0 =A0 =A0 =A0 =A0 =A0 ; Compare the upper 5= .. =A0 =A0 btfss =A0 STATUS,Z =A0 =A0 goto =A0 =A0$ + 3 =A0 =A0 movlw =A0 1 =A0 =A0 xorwf =A0 Beep,f =A0 =A0 decfsz =A0TimerE,f =A0 =A0 goto =A0 =A0Delay5m =A0 =A0 decfsz =A0TimerW,f =A0 =A0 goto =A0 =A0Delay5m ; end of the loop =20 --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .