list p=16f627a #include p16f627a.inc ; Set config bits __CONFIG _INTRC_OSC_NOCLKOUT & _PWRTE_OFF & _WDT_OFF & _CP_OFF ; Compute a value for the timer. ; Goal is 625 interrupts per second, so we need to divide ; 1Mhz by 1600 (2^6*25) to get 625Hz. Set the prescaler for ; (2^6)=64, then set the clock for (5^2)=25. ; BUGBUG: I don't know why this is off by a factor of 3! ;timeval EQU -d'25' timeval EQU -d'75' ; Declare the time of day variables cblock 0x20 row ticks seconds minutes hours days months mode bouncing savew saves ticksec endc org 0x0000 ;Reset vector goto main ; Jump to main code defined in Example.asm nop ; Pad out so interrupt nop ; service routine gets nop ; put at address 0x0004. goto service ; Points to interrupt service routine org 0x0020 ; Begin program main ; Main code entry -- once only initialization ;OPTION ; Clear RBPU ; Clear TOCS ; Clear PSA ; Set prescaler = 111 (divide by 256) clrwdt bcf STATUS, RP1 ; Select BANK0 or BANK1 bsf STATUS, RP0 ; Select BANK1 movlw (1<