
Originally Posted by
tiger_bel
hoi,
this works with 628 and Sharp LM16A211 at 4Mhz
2 rows of black squares if disp is not initialised ( at power up)
init the display first at startup
rgds
tb
pause 2000
DEFINE LCD_DREG PORTD 'dataport select'
DEFINE LCD_DBIT 0 'first databit
DEFINE LCD_RSREG PORTA 'lcd register port
DEFINE LCD_RSBIT 3 'register select bit'
DEFINE LCD_EREG PORTA 'enable poort'
DEFINE LCD_EBIT 1 'enable bit'
DEFINE LCD_BITS 4 'lcd bus size'
DEFINE LCD_LINES 2 'lcd lines'
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50 'data delay in µs'
'init display
LCDOUT $FE,1 ' clear LCD
pause 100 ' pauze 0,1s
LCDOUT $FE,2 ' cursor home
LCDOUT $FE,$0C ' cursor off
pause 1000 ' pauze 0,1s
' message
LCDOUT $FE, $80, " hello "
LCDOUT $FE, $C0, " ready "
pause 1000 ' pauze 0,1s
go on
Bookmarks