TEV-LB0

Top  Previous  Next

The TEV-LB0 board carries a 128x64, black/white WINSTAR WG12864A LCD panel. This panel is based on a SAMSUNG S6B0108 controller (there are two controllers on one panel). The WG12864A does not have the contrast control, so the contrast control circuit is added externally. Additionally, there is a control line for the LCD panel's backlight. The image displayed on the panel is not visible unless the backlight is turned on.

Related datasheets, as well as the schematic diagram for the TEV-LB0 board can be found on Tibbo website.

Interconnection between the EM1000 and the panel/ contrast control/ backlight control

Pin #(1)

EM1000 I/O line

Panel

5

GPIO48

CTRST_SET(2)

6

GPIO47

BL(3)

7

GPIO46

EN

8

GPIO39/P4.7

D7

9

GPIO38/P4.6

D6

10

GPIO37/P4.5

D5

11

GPIO36/P4.4

D4

12

GPIO35/P4.3

D3, CTRST3(2)

13

GPIO34/P4.2

D2, CTRST2(2)

14

GPIO33/P4.1

D1, CTRST1(2)

15

GPIO32/P4.0

D0, CTRST0(2)

16

GPIO44

RST

17

GPIO43

D/I

18

GPIO42

R/W

19

GPIO41

CS2

20

GPIO40

CS1

(1) Pin number on the TEV-LB0 connector.

(2) The line of the contrast control circuit, not the LCD panel itself.

(3) Backlight control line.

Required initialization code in Tibbo BASIC/C application

This section assumes that you are familiar with Tibbo BASIC/C and TIDE software. These are documented in the "TIDE and Tibbo BASIC Manual".

For correct panel operation, click Project-> Settings, and select "EM1000" or "EM1000G" platform. Additionally, click Customize to open a Customize Platform dialog. In the dialog, double-click the Display Panel Type line and choose "Samsung S6B0108 (Winstar WG12864A)".

The following initialization code should also be added to your project:

 

 

lcd.iomapping="44,46,40,41,43,42,4" 'RST,EN,CS1,CS2,DI,RW,data_bus

   

io.num=PL_IO_NUM_46

io.enabled=YES

 

io.num=PL_IO_NUM_44

io.enabled=YES

 

io.num=PL_IO_NUM_40

io.enabled=YES

 

io.num=PL_IO_NUM_41

io.enabled=YES

 

io.num=PL_IO_NUM_42

io.enabled=YES

 

io.num=PL_IO_NUM_43

io.enabled=YES

 

lcd.width=128

lcd.height=64

lcd.rotated=NO

lcd.inverted=NO

lcd.enabled=YES

set_lcd_contrast(11)

 

 

The set_lcd_contrast() procedure should be called after the panel initialization. The procedure sets the contrast level in 16 steps -- the contrast control hardware only has 4 data lines. Therefore, the contrast level of 16 is equal to the contrast level of 0.

Here is the suggested code for this function:

 

 

Sub Set_lcd_contrast(level As Byte)

'Contrast control shares the data bus with the LCD. Initialize LCD first,

'then set the contrast (before LCD initialization the bus may be driven

'by the LCD)

 

   'enable port, output data

   io.portnum=PL_IO_PORT_NUM_4

   io.portenabled=255

   io.portstate=level

   

   'generate strobe for the data register (on the LCD PCB)

   io.num=PL_IO_NUM_48

   io.enabled=YES

   io.state=HIGH

   io.state=LOW

   

   'disable port

   io.portenabled=0

End Sub

 

 

Use the following code to turn on the backlight:

 

 

io.num=PL_IO_NUM_47 'backlight

io.enabled=YES

io.state=LOW