409
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
I/O line numbers are from the pl_io_num enum. Port number is from the
pl_io_port_num enum. Line and port numbers are platform-specific. See the list of
pl_io_num and pl_io_port_num constants in the platform specifications.
For the TEV-LB0 board, the lcd.iomapping property should be set to
"44,46,40,41,43,42,4".
Code example -- TEV-LB0
This code will properly setup and enable this controller/panel (we assume that the
testing is done using the TEV-LB0 board):
lcd.iomapping="44,46,40,41,43,42,4"
'RST,EN,CS1,CS2,D/I,R/W,DATA7-0
'configure control lines as outputs
io.num=PL_IO_NUM_46
'EN
io.enabled=YES
io.num=PL_IO_NUM_44
'RST
io.enabled=YES
io.num=PL_IO_NUM_40
'CS1
io.enabled=YES
io.num=PL_IO_NUM_41
'CS2
io.enabled=YES
io.num=PL_IO_NUM_42
'R/W
io.enabled=YES
io.num=PL_IO_NUM_43
'D/I
io.enabled=YES
'set resolution
lcd.width=128
lcd.height=64
'optionally set lcd.rotated here
lcd.enabled=YES
'done!
'turn on the backlight (strictly speaking, this is not related to the LCD
control, but we still show it here)
io.num=PL_IO_NUM_47
io.enabled=YES
io.state=HIGH
set_lcd_contrast(11)
'this is for external contrast control circuit
Contrast control
This is not a part of the panel itself, but we are still providing the code that will
work on the TEV-LB0: