list p=16f627A ; list directive to define processor
#include <p16F627A.inc> ; processor specific variable definitions
errorlevel -302 ; suppress message 302 from list file
__CONFIG _CP_OFF & _DATA_CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_OFF & _WDT_OFF & _PWRTE_ON & _INTOSC_OSC_NOCLKOUT
;***** VARIABLE DEFINITIONS
d1 EQU 0x7E ; variable used for context saving
d2 EQU 0x7F ; variable used for context saving
ORG 0x000 ; processor reset vector
BSF PCON, 3
MOVLW 0x07 ;Turn comparators off and
MOVWF CMCON ;enable pins for I/O
BCF STATUS, RP0 ;
BCF PORTB, 7 ;01pp pppp 11pp pppp
BSF STATUS, RP0 ;
BCF TRISB, 7 ;10pp pppp 11pp pppp
BCF TRISB, 6 ;10pp pppp 10pp pppp
main
BSF PORTB,0
call Delay
BCF PORTB,0
call Delay
goto main ;loop forever, remove this instruction, for test only
Delay
movlw 0x5e ;0x3E
movwf d1
movlw 0xeb ;0x9D
movwf d2
Delay_0
decfsz d1, f
goto $+2
decfsz d2, f
goto Delay_0
goto $+1
nop
return
END