Using a Toshiba T6963 Graphic LCD
Once a Toshiba T6963 graphic LCD has been chosen using the Declare LCD_Type directive, all Print outputs will be directed to that LCD. Note that the Toshiba routines must be loaded into the program via the Include directive.
The standard modifiers used by an alphanumeric LCD may also be used with the graphics LCD. Most of the modifiers still work in the expected manner, however, the At modifier now starts at Ypos 0 and Xpos 0, where values 0,0 correspond to the top left corner of the LCD.
The KS0108 modifiers Inverse, Or, and Xor are not supported because of the method Toshiba LCD’s using the T6963 chipset implement text and graphics.
There are several Declares for use with a Toshiba graphic LCD, some optional and some mandatory.
Declare LCD_DTPort = Port Assign the port that will output the 8-bit data to the graphic LCD.
There is no default setting for this Declare and it must be used within the BASIC program.
Declare LCD_WRPin Port.Pin Assigns the Port and Pin that the graphic LCD's WR line will attach to.
There is no default setting for this Declare and it must be used within the BASIC program.
Declare LCD_RDPin Port.Pin Assigns the Port and Pin that the graphic LCD's RD line will attach to.
There is no default setting for this Declare and it must be used within the BASIC program.
Declare LCD_CEPin Port.Pin Assigns the Port and Pin that the graphic LCD's CE line will attach to.
There is no default setting for this Declare and it must be used within the BASIC program.
Declare LCD_CDPin Port.Pin Assigns the Port and Pin that the graphic LCD's CD line will attach to.
There is no default setting for this Declare and it must be used within the BASIC program.
Declare LCD_RSTPin Port.Pin Assigns the Port and Pin that the graphic LCD's RST line will attach to.
The LCD’s RST (Reset) Declare is optional and if omitted from the BASIC code, the compiler will not manipulate it. However, if not used as part of the interface, you must set the LCD’s RST pin high for normal operation.
Declare LCD_X_Res 0 to 255 LCD displays using the T6963 chipset come in varied screen sizes (resolutions). The compiler must know how many horizontal pixels the display consists of before it can build its library subroutines.
There is no default setting for this Declare and it must be used within the BASIC program.
Declare LCD_Y_Res 0 to 255 LCD displays using the T6963 chipset come in varied screen sizes (resolutions). The compiler must know how many vertical pixels the display consists of before it can build its library subroutines.
There is no default setting for this Declare and it must be used within the BASIC program.
Declare LCD_Font_Width 6 or 8 The Toshiba T6963 graphic LCDs have two internal font sizes, 6 pixels wide by eight high, or 8 pixels wide by 8 high. The particular font size is chosen by the LCD’s FS pin. Leaving the FS pin floating or bringing it high will choose the 6 pixel font, while pulling the FS pin low will choose the 8 pixel font. The compiler must know what size font is required so that it can calculate screen and RAM boundaries.
Note that the compiler does not control the FS pin and it is down to the circuit layout whether or not it is pulled high or low. There is no default setting for this Declare and it must be used within the BASIC program.
Declare LCD_RAM_Size 1024 to 65535 Toshiba graphic LCDs contain internal RAM used for Text, Graphic or Character Generation. The amount of RAM is usually dictated by the display’s resolution. The larger the display, the more RAM is normally present. Standard displays with a resolution of 128x64 typically contain 4096 bytes of RAM, while larger types such as 240x64 or 190x128 typically contain 8192 bytes or RAM. The display’s datasheet will inform you of the amount of RAM present.
There is no default setting for this Declare and it must be used within the BASIC program.
Declare LCD_Text_Pages 1 to n As mentioned above, Toshiba graphic LCDs contain RAM that is set aside for text, graphics or characters generation. In normal use, only one page of text is all that is required, however, the compiler can re-arrange its library subroutines to allow several pages of text that is continuous. The amount of pages obtainable is directly proportional to the RAM available within the LCD itself. Larger displays require more RAM per page, therefore always limit the amount of pages to only the amount actually required or unexpected results may be observed as text, graphic and character generator RAM areas merge.
This Declare is purely optional and is usually not required. There is no default setting for this Declare.
Declare LCD_Text_Home_Address 0 to n The RAM within a Toshiba graphic LCD is split into three distinct uses, text, graphics and character generation. Each area of RAM must not overlap or corruption will appear on the display as one uses the other’s assigned space. The compiler’s library subroutines calculate each area of RAM based upon where the text RAM starts. Normally the text RAM starts at address 0, however, there may be occasions when it needs to be set a little higher in RAM. The order of RAM is; Text, Graphic, then Character Generation.
This Declare is purely optional and is usually not required. There is no default setting for this Declare.
The diagram below shows a typical circuit for an interface with a Toshiba T6963 graphic LCD.

Text in this figure or table
TOSHIBA T6963C
GRAPHIC LCD
-5 to 0 Volts Contrast
| FG Vss Vdd Vee | RD CE | FS | |||||
| WR | C\D RST D0 D1 D2 D3 D4 D5 D6 D7 | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 7 | 8 | 9 10 11 12 13 14 15 16 17 18 |
Font Selection Closed - 8 Open - 6
VDD RB8RB9RB0RB1RB2RB3RB4RB5RB6RB7
GND RB12RB11RB10 GND
Example
' Toshiba T6963C graphic LCD demo
Device = 24FJ64GA002 ' Select the device to compile for
Declare Xtal = 16
' Toshiba T6963C graphic LCD Pin configuration
Declare LCD_Type = Toshiba ' LCD's type is Toshiba T6963C
Declare LCD_DTPort = PORTB.Byte0 ' The LCD's 8-bit Data port
Declare LCD_WRPin = PORTB.12 ' The LCD's WR pin
Declare LCD_RDPin = PORTB.11 ' The LCD's RD pin
Declare LCD_CEPin = PORTB.10 ' The LCD's CE pin
Declare LCD_CDPin = PORTB.8 ' The LCD's CD pin
Declare LCD_RSTPin = PORTB.9 ' The LCD's RST pin (optional)
'
' Toshiba T6963C graphic LCD setup configuration
'
Declare LCD_Font_Width = 8 ' The font width ( 6 or 8)
Declare LCD_X_Res = 128 ' The X resolution of the LCD
Declare LCD_Y_Res = 64 ' The Y resolution of the LCD
Declare LCD_Text_Home_Address = 0 ' The home address of the LCD
Declare LCD_RAM_Size = 8192 ' The amount of RAM the LCD contains
Declare LCD_Text_Pages = 1 ' The amount of text pages required
Include "T6963C.inc" ' Load the Toshiba T6963C routines into the program
'
' Create variables used in the demo
'
Dim MyCodeString As Code = "From Code",0
Dim MyRAMString As String * 20 = "From RAM"
Dim MyWord As Word = 1234
Dim MyDword As Dword = 12345
Dim MyFloat As Float = 3.14
Cls ' Clear Text and Graphic RAM
Print At 1,0, "1234567890ABCDEF"
Print At 2,0, Dec MyWord
Print At 3,0, Dec MyDword
Print At 4,0, Dec MyFloat
Print At 5,0, MyRAMString
Print At 6,0, MyCodeString

