; values in CAPS, self defined pointers and labels not, ; optimize for size rather than speed radix dec processor pic16f628a list n=0,st=off #include "p16f628a.inc" CONFIG_WORD = 0x3fff OPTION_REG_CONFIG = 0 ; set config word CONFIG_WORD &= _CP_OFF & _DATA_CP_OFF ; turn all code protection off CONFIG_WORD &= _LVP_OFF ; disable Low Voltage Programming ;CONFIG_WORD &= _BODEN_ON ; enable Brown-out Detect Reset CONFIG_WORD &= _BODEN_OFF ; disable Brown-out Detect Reset CONFIG_WORD &= _MCLRE_ON ; enable MCLRE CONFIG_WORD &= _PWRTE_ON ; enable power on timer CONFIG_WORD &= _WDT_OFF ; disable Watchdog Timer CONFIG_WORD &= _INTRC_OSC_NOCLKOUT ; use internal OSC, freeup RB7:RB6 __config CONFIG_WORD ctr0 equ 0x70 ctr1 equ 0x71 ctr2 equ 0x72 org 0x0000 reset_vector ; the chip starts executing our code here ; interrrupts are disabled by default, we are in bank 0 movlw 1<