View on GitHub

SmallBasicPIGPIO

Plugin for SmallBASIC to access GPIO pins on a Raspberry PI

back to main page

HD44780 compatible Text LCD Display

LCD1_Init

LCD1_Init(PIN_RS, PIN_E, PIN_D4, PIN_D5, PIN_D6, PIN_D7)

PIN_RS = 0 … 53
PIN_E = 0 … 53
PIN_D4 = 0 … 53
PIN_D5 = 0 … 53
PIN_D6 = 0 … 53
PIN_D7 = 0 … 53

A HD44780 compatible text LCD display will be initialized. The display will be used in 4-bit-mode. Specify to which GPIO pins the display is connected.

LCD1_Init(5, 6, 13, 19, 26, 12)

LCD1_Cls

LCD1_Cls()

Clears the display and moves cursor to the first position of the first line.

LCD1_Print

LCD1_Print(Text)

Text: String

Prints Text starting at the position of the cursor. If the text is longer than the amount of characters in that line unexpected thinks can happen.

LCD1_Print("Hello world!")

LCD1_Locate

LCD1_Locate(x,y)

x = 1 … 16 y = 1 … 4

Sets the cursor to position x, y. If you have a display with less than 4 lines, the cursor might be set wrong if using y-values bigger then 1.

LCD1_Locate(5,1) 'Sets cursor to x = 5, y = 1

LCD1_Off

LCD1_Off()

Turns off the LCD.

LCD1_On

LCD1_On()

Turns on the LCD.

back to main page