hippy
Ex-Staff (retired)
My interpretation of the C code below. You'll need to set the Symbols to the pins you are actually using and the C code seems to be initialising for 3V3 operation so you will have to alter the initialisation as well if using 5V.
Code:
Symbol LCD_CLK = 3
Symbol LCD_DO = 2
Symbol LCD_RS = 4
Symbol LCD_CS = 1
High LCD_CS
b0 = $38 : Gosub outLCD
b0 = $39 : Gosub outLCD
b0 = $15 : Gosub outLCD
b0 = $55 : Gosub outLCD
b0 = $6E : Gosub outLCD
b0 = $72 : Gosub outLCD
b0 = $0F : Gosub outLCD
b0 = $01 : Gosub outLCD
b0 = $06 : Gosub outLCD
b0 = "H" : Gosub dataLCD
b0 = "e" : Gosub dataLCD
b0 = "l" : Gosub dataLCD
b0 = "l" : Gosub dataLCD
b0 = "o" : Gosub dataLCD
End
dataLCD:
Low LCD_CS
High LCD_RS
Goto xxxLCD
outLCD:
Low LCD_CS
Low LCD_RS
xxxLCD:
For b1 = 0 To 7
If bit7 = 0 Then
Low LCD_D0
Else
High LCD_D0
End If
High LCD_CLK
Low LCD_CLK
b0 = b0 * 2
Next
High LCD_RS
High LCD_CS
Return