Code:
;----[16F628A Hardware Configuration]-------------------------------------------
#IF __PROCESSOR__ = "16F628A"
#DEFINE MCU_FOUND 1
#CONFIG
cfg = _INTOSC_OSC_NOCLKOUT ; INTOSC oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN
cfg&= _WDT_ON ; WDT enabled
cfg&= _PWRTE_OFF ; PWRT disabled
cfg&= _MCLRE_OFF ; RA5/MCLR/VPP pin function is digital input, MCLR internally tied to VDD
cfg&= _BODEN_ON ; BOD enabled
cfg&= _LVP_OFF ; RB4/PGM pin has digital I/O function, HV on MCLR must be used for programming
cfg&= DATA_CP_OFF ; Data memory code protection off
cfg&= _CP_OFF ; Code protection off
__CONFIG cfg
#ENDCONFIG
#ENDIF
;----[Verify Configs have been specified for Selected Processor]----------------
; Note: Only include this routine once, after all #CONFIG blocks
#IFNDEF MCU_FOUND
#ERROR "No CONFIGs found for [" + __PROCESSOR__ +"]"
#ENDIF
Include "Modedefs.bas"
PCON=%00001011 'set intosc to 4mhz
DEFINE OSC 4
DEFINE LCD_DREG PORTB
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 4
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 5
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 1500
DEFINE LCD_DATAUS 44
pause 500
LCDOUT $FE, "SACDELI "
PAUSE 5000
END
Bookmarks