; cornelia's reading/night light with auto-off ; copyright (c) 2008 Alexander Zangerl ; ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation (version 2 of the License). ; ; $Id: nightlight.asm,v 1.3 2008/02/18 12:29:23 az Exp $ processor p12f629 #include "p12f629.inc" RADIX hex __CONFIG _INTRC_OSC_NOCLKOUT & _BODEN_OFF & _MCLRE_ON & _WDT_OFF & _CP_OFF LBIT equ 0 ;gp0 is light control cblock 0x20 scritch ; tempvar scratch ; tempvar for delay routines foo ; tempvar endc org 0 ; power-on or reset goto main org 0x4 ; interrupt table retfie ; no ints used main: ; setup output movlw 7 movwf CMCON ; comparator off! bsf STATUS,RP0 ; bank1 movlw 0xff & ~(1<