Nice work DT.
Here's one at 13 words.
Code:list p=16F628A #include "P16F628A.inc" errorlevel -302 __CONFIG _CP_OFF & _BODEN_ON & _MCLRE_OFF & _WDT_ON & _PWRTE_ON & _LVP_OFF & _INTOSC_OSC_NOCLKOUT clrf PORTB ; clear port bsf STATUS,RP0 ; Bank 1 bcf TRISB,0 ; RB0 = output bcf OPTION_REG,0 ; 1:64 prescaler to WDT Left sleep ; go to sleep for 64 * 18mS ~1 second rlf TRISB,F ; rotate bit across portb from lsb to msb btfsc TRISB,7 goto Left Right sleep ; go to sleep for 64 * 18mS ~1 second rrf TRISB,F ; rotate bit across Portb from msb to lsb btfsc TRISB,0 goto Right goto Left ; now rotate back to the left. End




Bookmarks