mark Easterling
New Member
Hi,
Do you know if I can use a LCD05 on my code (08m2)? I am having trouble writing to the LCD using this code? Can some one help please
;output pin9 B3 - row 4
;output pin8 B2 - row 3
;output pin7 B1 - row 2
;output pin6 B0 - row 1
;input pin17 C0 - column 1
;input pin18 C1 - column 2
;input pin1 C2 - column 3
;input pin2 C3 - not used
;input pin3 C4 - resistor to 0V
;input pin4 C5 - not used
;input pin15 C6 - Green LED
;input pin16 C7 - resistor to switch
serout C.1,N2400,(254,1);set B.6, as output for LCD
let dirsC = %01000000 ;set pinsC as inputs or outputs
let dirsB = %11111111 ;set pinsB as inputs or outputs(pin B.0)
; *** reset position to zero ***
init:
pause 500 ; wait for display to initialise
serout C.1,N2400,(254,1) 'clear display
pause 30
serout C.1,N2400,(254,1) 'clear display
pause 30
serout C.1,N2400,(254,133) ; move to end of first line
serout C.1,N2400,("PLEASE") ;first line of code
serout C.1,N2400,(254,195) ; move to end of first line
serout C.1,N2400,("ENTER CODE") ;second line of code
wait 5
goto init
Do you know if I can use a LCD05 on my code (08m2)? I am having trouble writing to the LCD using this code? Can some one help please
;output pin9 B3 - row 4
;output pin8 B2 - row 3
;output pin7 B1 - row 2
;output pin6 B0 - row 1
;input pin17 C0 - column 1
;input pin18 C1 - column 2
;input pin1 C2 - column 3
;input pin2 C3 - not used
;input pin3 C4 - resistor to 0V
;input pin4 C5 - not used
;input pin15 C6 - Green LED
;input pin16 C7 - resistor to switch
serout C.1,N2400,(254,1);set B.6, as output for LCD
let dirsC = %01000000 ;set pinsC as inputs or outputs
let dirsB = %11111111 ;set pinsB as inputs or outputs(pin B.0)
; *** reset position to zero ***
init:
pause 500 ; wait for display to initialise
serout C.1,N2400,(254,1) 'clear display
pause 30
serout C.1,N2400,(254,1) 'clear display
pause 30
serout C.1,N2400,(254,133) ; move to end of first line
serout C.1,N2400,("PLEASE") ;first line of code
serout C.1,N2400,(254,195) ; move to end of first line
serout C.1,N2400,("ENTER CODE") ;second line of code
wait 5
goto init