T6963C Graphic Lcd Library

The mikroPascal PRO for ARM provides a library for working with Glcds based on TOSHIBA T6963C controller. The Toshiba T6963C is a very popular Lcd controller for the use in small graphics modules. It is capable of controlling displays with a resolution up to 240x128. Because of its low power and small outline it is most suitable for mobile applications such as PDAs, MP3 players or mobile measurement equipment. Although small, this contoller has a capability of displaying and merging text and graphics and it manages all the interfacing signals to the displays Row and Column drivers.

For creating a custom set of Glcd images use Glcd Bitmap Editor Tool.

  Important :

Some mikroElektronika's adapter boards have pinout different from T6369C datasheets. Appropriate relations between these labels are given in the table below :
Adapter Board T6369C datasheet
RS C/D
R/W /RD
E /WR

Library Dependency Tree

T6963C Library Dependency Tree

External dependencies of T6963C Graphic Lcd Library

Stellaris

The following variables must be defined in all projects using T6963C Graphic Lcd library: Description : Example :
var T6963C_dataPort : dword; sfr; external; T6963C Data Port. var T6963C_dataPort : byte at GPIO_PORTE_DATA;
var T6963C_ctrlwr : sbit; sfr; external; Write signal. var T6963C_ctrlwr : sbit at GPIO_PORTD_DATA2_bit;
var T6963C_ctrlrd : sbit; sfr; external; Read signal. var T6963C_ctrlrd : sbit at GPIO_PORTD_DATA1_bit;
var T6963C_ctrlcd : sbit; sfr; external; Command/Data signal. var T6963C_ctrlcd : sbit at GPIO_PORTD_DATA0_bit;
var T6963C_ctrlrst : sbit; sfr; external; Reset signal. var T6963C_ctrlrst : sbit at GPIO_PORTD_DATA4_bit;
var T6963C_ctrlwr_Direction : sbit; sfr; external; Direction of the Write pin. var T6963C_ctrlwr_Direction : sbit at GPIO_PORTD_DIR2_bit;
var T6963C_ctrlrd_Direction : sbit; sfr; external; Direction of the Read pin. var T6963C_ctrlrd_Direction : sbit at GPIO_PORTD_DIR1_bit;
var T6963C_ctrlcd_Direction : sbit; sfr; external; Direction of the Command/Data pin. var T6963C_ctrlcd_Direction : sbit at GPIO_PORTD_DIR0_bit;
var T6963C_ctrlrst_Direction : sbit; sfr; external; Direction of the Reset pin. var T6963C_ctrlrst_Direction : sbit at GPIO_PORTD_DIR4_bit;

MSP432

The following variables must be defined in all projects using T6963C Graphic Lcd library: Description : Example :
var T6963C_dataPortIn : word; sfr; external; T6963C Data Input Port. var T6963C_dataPortIn : word at DIO_P5IN;
var T6963C_dataPortIn : word; sfr; external; T6963C Data Output Port. var T6963C_dataPortIn : word at DIO_P5OUT;
var T6963C_ctrlwr : sbit; sfr; external; Write signal. var T6963C_ctrlwr : sbit at DIO_P6OUT.B0;
var T6963C_ctrlrd : sbit; sfr; external; Read signal. var T6963C_ctrlrd : sbit at DIO_P6OUT.B1;
var T6963C_ctrlcd : sbit; sfr; external; Command/Data signal. var T6963C_ctrlcd : sbit at DIO_P6OUT.B2;
var T6963C_ctrlrst : sbit; sfr; external; Reset signal. var T6963C_ctrlrst : sbit at DIO_P6OUT.B3;
var T6963C_ctrlwr_Direction : sbit; sfr; external; Direction of the Write pin. var T6963C_ctrlwr_Direction : sbit at DIO_P6DIR.B0;
var T6963C_ctrlrd_Direction : sbit; sfr; external; Direction of the Read pin. var T6963C_ctrlrd_Direction : sbit at DIO_P6DIR.B0;
var T6963C_ctrlcd_Direction : sbit; sfr; external; Direction of the Command/Data pin. var T6963C_ctrlcd_Direction : sbit at DIO_P6DIR.B0;
var T6963C_ctrlrst_Direction : sbit; sfr; external; Direction of the Reset pin. var T6963C_ctrlrst_Direction : sbit at DIO_P6DIR.B0;

STM32

The following variables must be defined in all projects using T6963C Graphic Lcd library: Description : Example :
var T6963C_dataPort_Input : dword; sfr; external; T6963C Data Input Port. var T6963C_dataPort_Input : dword at GPIOD_IDR;
var T6963C_dataPort_Output : dword; sfr; external; T6963C Data Output Port. var T6963C_dataPort_Output : dword at GPIOD_ODR;
var T6963C_ctrlwr : sbit; sfr; external; Write signal. var T6963C_ctrlwr : sbit at GPIOD_ODR.B8;
var T6963C_ctrlrd : sbit; sfr; external; Read signal. var T6963C_ctrlrd : sbit at GPIOD_ODR.B9;
var T6963C_ctrlcd : sbit; sfr; external; Command/Data signal. var T6963C_ctrlcd : sbit at GPIOD_ODR.B11;
var T6963C_ctrlrst : sbit; sfr; external; Reset signal. var T6963C_ctrlrst : sbit at GPIOD_ODR.B12;

CEC1x02

The following variables must be defined in all projects using T6963C Graphic Lcd library: Description : Example :
var T6963C_dataPort_Input : byte; sfr; external; T6963C Data Input Port. var T6963C_dataPort_Input : byte at GPIO_INPUT_010_017;
var T6963C_dataPort_Output : byte; sfr; external; T6963C Data Output Port. var T6963C_dataPort_Output : byte at GPIO_OUTPUT_010_017;
var T6963C_ctrlwr : sbit; sfr; external; Write signal. var T6963C_ctrlwr : sbit at GPIO_OUTPUT_PIN_001_bit;
var T6963C_ctrlrd : sbit; sfr; external; Read signal. var T6963C_ctrlrd : sbit at GPIO_OUTPUT_PIN_002_bit;
var T6963C_ctrlcd : sbit; sfr; external; Command/Data signal. var T6963C_ctrlcd : sbit at GPIO_OUTPUT_PIN_003_bit;
var T6963C_ctrlrst : sbit; sfr; external; Reset signal. var T6963C_ctrlrst : sbit at GPIO_OUTPUT_PIN_004_bit;

Library Routines

T6963C_init

Prototype

procedure T6963C_init(width, height, fntW : word);

Description

Initalizes the Graphic Lcd controller.

Display RAM organization:
The library cuts the RAM into panels : a complete panel is one graphics panel followed by a text panel (see schematic below).

+---------------------+ /\
+ GRAPHICS PANEL #0   +  |
+                     +  |
+                     +  |
+                     +  |
+---------------------+  | PANEL 0
+ TEXT PANEL #0       +  |
+                     + \/   
+---------------------+ /\  
+ GRAPHICS PANEL #1   +  |
+                     +  |
+                     +  |
+                     +  |
+---------------------+  | PANEL 1
+ TEXT PANEL #1       +  |
+                     +  |
+---------------------+ \/            	
            
Parameters
  • width: width of the Glcd panel
  • height: height of the Glcd panel
  • fntW: font width
Returns

Nothing.

Requires

External dependencies of the library from the top of the page must be defined before using this function.

Example

Stellaris

// T6963C module connections
var T6963C_dataPort          : byte at GPIO_PORTE_DATA;    // DATA port

var T6963C_ctrlwr            : sbit at GPIO_PORTD_DATA2_bit; // WR write signal
var T6963C_ctrlrd            : sbit at GPIO_PORTD_DATA1_bit; // RD read signal
var T6963C_ctrlcd            : sbit at GPIO_PORTD_DATA0_bit; // CD command/data signal
var T6963C_ctrlrst           : sbit at GPIO_PORTD_DATA4_bit; // RST reset signal

var T6963C_ctrlwr_Direction  : sbit at GPIO_PORTD_DIR2_bit;  // WR write signal direction
var T6963C_ctrlrd_Direction  : sbit at GPIO_PORTD_DIR1_bit;  // RD read signal direction
var T6963C_ctrlcd_Direction  : sbit at GPIO_PORTD_DIR0_bit;  // CD command/data signal direction
var T6963C_ctrlrst_Direction : sbit at GPIO_PORTD_DIR4_bit;  // RST reset signal direction

// Signals not used by library, they are set in main function
var T6963C_ctrlce            : sbit at GPIO_PORTD_DATA3_bit; // CE signal
var T6963C_ctrlfs            : sbit at GPIO_PORTD_DATA6_bit; // FS signal
var T6963C_ctrlmd            : sbit at GPIO_PORTD_DATA5_bit; // MD signal

var T6963C_ctrlce_Direction  : sbit at GPIO_PORTD_DIR3_bit;  // CE signal direction
var T6963C_ctrlfs_Direction  : sbit at GPIO_PORTD_DIR6_bit;  // FS signal direction
var T6963C_ctrlmd_Direction  : sbit at GPIO_PORTD_DIR5_bit;  // MD signal direction
// End T6963C module connections
       
...
// init display for 240 pixel width, 128 pixel height and 8 bits character width
T6963C_init(240, 128, 8);

MSP432

// T6963C module connections
var T6963C_dataPortIn          : byte at DIO_P5IN;    // DATA port
var T6963C_dataPortOut          : byte at DIO_P5OUT;    // DATA port

var T6963C_ctrlwr            : sbit at DIO_P6OUT.B0; // WR write signal
var T6963C_ctrlrd            : sbit at DIO_P6OUT.B1; // RD read signal
var T6963C_ctrlcd            : sbit at DIO_P6OUT.B2; // CD command/data signal
var T6963C_ctrlrst           : sbit at DIO_P6OUT.B3; // RST reset signal

var T6963C_ctrlwr_Direction  : sbit at DIO_P6DIR.B0;  // WR write signal direction
var T6963C_ctrlrd_Direction  : sbit at DIO_P6DIR.B1;  // RD read signal direction
var T6963C_ctrlcd_Direction  : sbit at DIO_P6DIR.B0;  // CD command/data signal direction
var T6963C_ctrlrst_Direction : sbit at DIO_P6DIR.B3;  // RST reset signal direction

// Signals not used by library, they are set in main function
var T6963C_ctrlce            : sbit at DIO_P6OUT.B4; // CE signal
var T6963C_ctrlfs            : sbit at DIO_P6OUT.B5; // FS signal
var T6963C_ctrlmd            : sbit at DIO_P6OUT.B6; // MD signal

var T6963C_ctrlce_Direction  : sbit at DIO_P6DIR.B4;  // CE signal direction
var T6963C_ctrlfs_Direction  : sbit at DIO_P6OUT.B5;  // FS signal direction
var T6963C_ctrlmd_Direction  : sbit at DIO_P6OUT.B6;  // MD signal direction
// End T6963C module connections
       
...
// init display for 240 pixel width, 128 pixel height and 8 bits character width
T6963C_init(240, 128, 8);

STM32

// T6963C module connections
var T6963C_dataPort_Output         : dword at GPIOD_ODR;     // DATA port
var T6963C_dataPort_Input          : dword at GPIOD_IDR;     // DATA port

var T6963C_ctrlwr            : sbit at GPIOD_ODR.B8; // WR write signal
var T6963C_ctrlrd            : sbit at GPIOD_ODR.B9; // RD read signal
var T6963C_ctrlcd            : sbit at GPIOD_ODR.B11; // CD command/data signal
var T6963C_ctrlrst           : sbit at GPIOD_ODR.B12; // RST reset signal

// Signals not used by library, they are set in main function
var T6963C_ctrlce            : sbit at GPIOD_ODR.B10; // CE signal
var T6963C_ctrlfs            : sbit at GPIOD_ODR.B13; // FS signal
// End T6963C module connections
...
// init display for 240 pixel width, 128 pixel height and 8 bits character width
T6963C_init(240, 128, 8);

CEC1x02

// T6963C module connections
var T6963C_dataPort_Output         : byte at GPIO_OUTPUT_010_017;     // DATA port
var T6963C_dataPort_Input          : byte at GPIO_INPUT_010_017;     // DATA port

var T6963C_ctrlwr            : sbit at GPIO_OUTPUT_PIN_001_bit; // WR write signal
var T6963C_ctrlrd            : sbit at GPIO_OUTPUT_PIN_002_bit; // RD read signal
var T6963C_ctrlcd            : sbit at GPIO_OUTPUT_PIN_003_bit; // CD command/data signal
var T6963C_ctrlrst           : sbit at GPIO_OUTPUT_PIN_004_bit; // RST reset signal

// Signals not used by library, they are set in main function
var T6963C_ctrlce            : sbit at GPIO_OUTPUT_PIN_005_bit; // CE signal
var T6963C_ctrlfs            : sbit at GPIO_OUTPUT_PIN_006_bit; // FS signal
// End T6963C module connections
       
...
// init display for 240 pixel width, 128 pixel height and 8 bits character width
T6963C_init(240, 128, 8);
Notes

None.

T6963C_writeData

Prototype

procedure T6963C_writeData(mydata : byte);

Description

Writes data to T6963C controller.

Parameters
  • mydata: data to be written
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_writeData(AddrL);
Notes

None.

T6963C_writeCommand

Prototype

procedure T6963C_writeCommand(mydata : byte);

Description

Writes command to T6963C controller.

Parameters
  • mydata: command to be written
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_writeCommand(T6963C_CURSOR_POINTER_SET);
Notes

None.

T6963C_setPtr

Prototype

procedure T6963C_setPtr(p : word; c : byte);

Description

Sets the memory pointer p for command p.

Parameters
  • p: address where command should be written
  • c: command to be written
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_setPtr(T6963C_grHomeAddr + start, T6963C_ADDRESS_POINTER_SET);
Notes

None.

T6963C_Set_Ext_Buffer

Prototype

procedure T6963C_Set_Ext_Buffer(getExtDataPtr : ^TT6963C_Get_Ext_Data_Ptr);

Returns

Nothing.

Description

Function sets pointer to the user function which manipulates the external resource.

Parameters :

  • TT6963C_Get_Ext_Data_Ptr - pointer to the user function.

User function prototype should be in the following format: function External(offset : dword; count : dword; var num : dword) : ^byte;

Parameters used in the function have the following meaning :

  • offset - offset from the beginning of the resource from where the data is requested.
  • count - requested number of bytes.
  • num - variable for holding the returned number of bytes (less or equal to the number of acquired bytes).
Requires

Glcd module needs to be initialized. See the T6963C_Init routine.

Example
T6963C_Set_Ext_Buffer(@ReadExternalBuffer);

T6963C_waitReady

Prototype

procedure T6963C_waitReady();

Description

Pools the status byte, and loops until Toshiba Glcd module is ready.

Parameters

None.

Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_waitReady();
Notes

None.

T6963C_fill

Prototype

procedure T6963C_fill(v : byte; start, len : word);

Description

Fills controller memory block with given byte.

Parameters
  • v: byte to be written
  • start: starting address of the memory block
  • len: length of the memory block in bytes
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_fill(0x33,0x00FF,0x000F);
Notes

None.

T6963C_dot

Prototype

procedure T6963C_dot(x, y : integer; color : byte);

Description

Draws a dot in the current graphic panel of Glcd at coordinates (x, y).

Parameters
  • x: dot position on x-axis
  • y: dot position on y-axis
  • color: color parameter. Valid values: T6963C_BLACK, T6963C_WHITE and T6963C_INVERT.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_dot(x0, y0, pcolor);
Notes

None.

T6963C_Set_Font_Adv

Prototype

procedure T6963C_Set_Font_Adv(const activeFont : ^byte; font_color : word; font_orientation : byte);

Description

Sets font that will be used with T6963C_Write_Char_Adv and T6963C_Write_Text_Adv routines.

Parameters
  • activeFont: font to be set. Needs to be formatted as an array of char.
  • font_color: sets font color.
  • font_orientation: sets font orientation.
Returns

Nothing.

Requires

Glcd needs to be initialized, see T6963C_Init routine.

Example
T6963C_Set_Font_Adv(@myfont, 0, 0);
Notes

None.

T6963C_Set_Ext_Font_Adv

Prototype

procedure T6963C_Set_Ext_Font_Adv(activeFont : dword; font_color : word; font_orientation : word);

Description

Sets font that will be used with T6963C_Write_Char_Adv and T6963C_Write_Text_Adv routines. Font is located in an external resource.

Parameters
  • activeFont: font to be set. This parameter represents the address in the exteral resource from where the font data begins.
  • font_color: sets font color.
  • font_orientation: sets font orientation.
Returns

Nothing.

Requires

Glcd needs to be initialized, see T6963C_Init routine.

Example
T6963C_Set_Ext_Font_Adv(173296, 0, 0);
Notes

None.

T6963C_write_char

Prototype

procedure T6963C_write_char(c, x, y, mode : byte);

Description

Writes a char in the current text panel of Glcd at coordinates (x, y).

Parameters
  • c: char to be written
  • x: char position on x-axis
  • y: char position on y-axis
  • mode: mode parameter. Valid values: T6963C_ROM_MODE_OR, T6963C_ROM_MODE_XOR, T6963C_ROM_MODE_AND and T6963C_ROM_MODE_TEXT

Mode parameter explanation:

  • OR Mode: In the OR-Mode, text and graphics can be displayed and the data is logically "OR-ed". This is the most common way of combining text and graphics for example labels on buttons.
  • XOR-Mode: In this mode, the text and graphics data are combined via the logical "exclusive OR". This can be useful to display text in the negative mode, i.e. white text on black background.
  • AND-Mode: The text and graphic data shown on display are combined via the logical "AND function".
  • TEXT-Mode: This option is only available when displaying just a text. The Text Attribute values are stored in the graphic area of display memory.
For more details see the T6963C datasheet.

Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_write_char('A',22,23,T6963C_ROM_MODE_AND);
Notes

None.

T6963C_write_char_adv

Prototype

procedure T6963C_Write_Char_Adv(ch, x, y : word);

Description

Writes a char in the current text panel of Glcd at coordinates (x, y).

Parameters
  • c: char to be written
  • x: char position on x-axis
  • y: char position on y-axis
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_write_char_adv('A',22,23);
Notes

None.

T6963C_write_text

Prototype

procedure T6963C_write_text(var str : string; x, y, mode : byte);

Description

Writes text in the current text panel of Glcd at coordinates (x, y).

Parameters
  • str: text to be written
  • x: text position on x-axis
  • y: text position on y-axis
  • mode: mode parameter. Valid values: T6963C_ROM_MODE_OR, T6963C_ROM_MODE_XOR, T6963C_ROM_MODE_AND and T6963C_ROM_MODE_TEXT

Mode parameter explanation:

  • OR Mode: In the OR-Mode, text and graphics can be displayed and the data is logically "OR-ed". This is the most common way of combining text and graphics for example labels on buttons.
  • XOR-Mode: In this mode, the text and graphics data are combined via the logical "exclusive OR". This can be useful to display text in the negative mode, i.e. white text on black background.
  • AND-Mode: The text and graphic data shown on display are combined via the logical "AND function".
  • TEXT-Mode: This option is only available when displaying just a text. The Text Attribute values are stored in the graphic area of display memory.
For more details see the T6963C datasheet.

Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_write_text('GLCD LIBRARY DEMO, WELCOME !', 0, 0, T6963C_ROM_MODE_XOR);	
Notes

None.

T6963C_Write_Text_Adv

Prototype

procedure T6963C_Write_Text_Adv(var text : string; x, y : word);

Description

Writes text in the current text panel of Glcd at coordinates (x, y).

Parameters
  • str: text to be written
  • x: text position on x-axis
  • y: text position on y-axis
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_Write_Text_Adv("Glcd LIBRARY DEMO, WELCOME !", 0, 0);	
Notes

None.

T6963C_line

Prototype

procedure T6963C_line(x0, y0, x1, y1 : integer; pcolor : byte);

Description

Draws a line from (x0, y0) to (x1, y1).

Parameters
  • x0: x coordinate of the line start
  • y0: y coordinate of the line end
  • x1: x coordinate of the line start
  • y1: y coordinate of the line end
  • pcolor: color parameter. Valid values: T6963C_BLACK, T6963C_WHITE and T6963C_INVERT.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_line(0, 0, 239, 127, T6963C_WHITE);
Notes

None.

T6963C_rectangle

Prototype

procedure T6963C_rectangle(x0, y0, x1, y1 : integer; pcolor : byte);

Description

Draws a rectangle on Glcd.

Parameters
  • x0: x coordinate of the upper left rectangle corner
  • y0: y coordinate of the upper left rectangle corner
  • x1: x coordinate of the lower right rectangle corner
  • y1: y coordinate of the lower right rectangle corner
  • pcolor: color parameter. Valid values: T6963C_BLACK, T6963C_WHITE and T6963C_INVERT.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_rectangle(20, 20, 219, 107, T6963C_WHITE);
Notes

None.

T6963C_rectangle_round_edges

Prototype

procedure T6963C_rectangle_round_edges(x0, y0, x1, y1, radius : integer; pcolor : byte);

Description

Draws a rounded edge rectangle on Glcd.

Parameters
  • x0: x coordinate of the upper left rectangle corner
  • y0: y coordinate of the upper left rectangle corner
  • x1: x coordinate of the lower right rectangle corner
  • y1: y coordinate of the lower right rectangle corner
  • round_radius: radius of the rounded edge.
  • pcolor: color parameter. Valid values: T6963C_BLACK, T6963C_WHITE and T6963C_INVERT.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_Init routine.

Example
T6963C_rectangle_round_edges(20, 20, 219, 107, 12, T6963C_WHITE);
Notes

None.

T6963C_rectangle_round_edges_fill

Prototype

procedure T6963C_rectangle_round_edges_fill(x0, y0, x1, y1, radius : integer; pcolor : byte);

Description

Draws a filled rounded edge rectangle on Glcd.

Parameters
  • x0: x coordinate of the upper left rectangle corner
  • y0: y coordinate of the upper left rectangle corner
  • x1: x coordinate of the lower right rectangle corner
  • y1: y coordinate of the lower right rectangle corner
  • round_radius: radius of the rounded edge
  • pcolor: color parameter. Valid values: T6963C_BLACK, T6963C_WHITE and T6963C_INVERT.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_Init routine.

Example
T6963C_rectangle_round_edges_fill(20, 20, 219, 107, 12, T6963C_WHITE);
Notes

None.

T6963C_box

Prototype

procedure T6963C_box(x0, y0, x1, y1 : integer; pcolor : byte);

Description

Draws a box on the Glcd

Parameters
  • x0: x coordinate of the upper left box corner
  • y0: y coordinate of the upper left box corner
  • x1: x coordinate of the lower right box corner
  • y1: y coordinate of the lower right box corner
  • pcolor: color parameter. Valid values: T6963C_BLACK, T6963C_WHITE and T6963C_INVERT.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_box(0, 119, 239, 127, T6963C_WHITE);
Notes

None.

T6963C_circle

Prototype

procedure T6963C_circle(x, y : integer; r : longint; pcolor : word);

Description

Draws a circle on the Glcd.

Parameters
  • x: x coordinate of the circle center
  • y: y coordinate of the circle center
  • r: radius size
  • pcolor: color parameter. Valid values: T6963C_BLACK, T6963C_WHITE and T6963C_INVERT.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_circle(120, 64, 110, T6963C_WHITE);
Notes

None.

T6963C_Circle_fill

Prototype

procedure T6963C_Circle_fill(x, y : integer; r : longint; pcolor : word);

Description

Draws a filled circle on the Glcd.

Parameters
  • x: x coordinate of the circle center
  • y: y coordinate of the circle center
  • r: radius size
  • pcolor: color parameter. Valid values: T6963C_BLACK, T6963C_WHITE and T6963C_INVERT.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_Init routine.

Example
T6963C_Circle_fill(120, 64, 110, T6963C_WHITE);
Notes

None.

T6963C_image

Prototype

procedure T6963C_image(const pic : ^byte);

Description

Displays bitmap on Glcd.

Parameters
  • pic: image to be displayed. Bitmap array can be located in both code and RAM memory (due to the mikroPascal PRO for ARM pointer to const and pointer to RAM equivalency).
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_image(@my_image);
Notes

Image dimension must match the display dimension.

Use the integrated Glcd Bitmap Editor (menu option Tools › Glcd Bitmap Editor) to convert image to a constant array suitable for displaying on Glcd.

T6963C_Ext_Image

Prototype

procedure T6963C_Ext_Image(pic : dword);

Description

Displays a bitmap from an external resource.

Parameters
  • pic: image to be displayed. This parameter represents the address in the exteral resource from where the image data begins.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_Ext_image(153608);
Notes

Image dimension must match the display dimension.

Use the integrated Glcd Bitmap Editor (menu option Tools › Glcd Bitmap Editor) to convert image to a constant array suitable for displaying on Glcd.

T6963C_PartialImage

Prototype

procedure T6963C_PartialImage(x_left, y_top, width, height, picture_width, picture_height : word; const image : ^byte);

Description

Displays a partial area of the image on a desired location.

Parameters
  • x_left: x coordinate of the desired location (upper left coordinate).
  • y_top: y coordinate of the desired location (upper left coordinate).
  • width: desired image width.
  • height: desired image height.
  • picture_width: width of the original image.
  • picture_height: height of the original image.
  • image: image to be displayed. Bitmap array can be located in both code and RAM memory (due to the mikroPascal PRO for ARM pointer to const and pointer to RAM equivalency).
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See T6963C_init routine.

Example
// Draws a 10x15 part of the image starting from the upper left corner on the coordinate (10,12). Original image size is 16x32. 
T6963C_PartialImage(10, 12, 10, 15, 16, 32, @image);
Notes

Image dimension must match the display dimension.

Use the integrated Glcd Bitmap Editor (menu option Tools › Glcd Bitmap Editor) to convert image to a constant array suitable for displaying on Glcd.

T6963C_Ext_PartialImage

Prototype

procedure T6963C_Ext_PartialImage(x_left, y_top, width, height, picture_width, picture_height : word; image : dword);

Description

Displays a partial area of the image (from an external resource) on a desired location.

Parameters
  • x_left: x coordinate of the desired location (upper left coordinate).
  • y_top: y coordinate of the desired location (upper left coordinate).
  • width: desired image width.
  • height: desired image height.
  • picture_width: width of the original image.
  • picture_height: height of the original image.
  • image: image to be displayed. This parameter represents the address in the exteral resource from where the image data begins.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See T6963C_init routine.

Example
T6963C_Ext_PartialImage(10, 12, 10, 15, 16, 32, 0);
Notes

Image dimension must match the display dimension.

Use the integrated Glcd Bitmap Editor (menu option Tools › Glcd Bitmap Editor) to convert image to a constant array suitable for displaying on Glcd.

T6963C_sprite

Prototype

procedure T6963C_sprite(px, py : byte; const pic : ^byte; sx, sy : byte);

Description

Fills graphic rectangle area (px, py) to (px+sx, py+sy) with custom size picture.

Parameters
  • px: x coordinate of the upper left picture corner. Valid values: multiples of the font width
  • py: y coordinate of the upper left picture corner
  • pic: picture to be displayed
  • sx: picture width. Valid values: multiples of the font width
  • sy: picture height
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_sprite(76, 4, einstein, 88, 119); // draw a sprite
Notes

If px and sx parameters are not multiples of the font width they will be scaled to the nearest lower number that is a multiple of the font width.

T6963C_set_cursor

Prototype

procedure T6963C_set_cursor(x, y : byte);

Description

Sets cursor to row x and column y.

Parameters
  • x: cursor position row number
  • y: cursor position column number
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_set_cursor(cposx, cposy);
Notes

None.

T6963C_displayGrPanel

Prototype

procedure T6963C_displayGrPanel(n : word);

Description

Display selected graphic panel.

Parameters
  • n: graphic panel number. Valid values: 0 and 1.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
// display graphic panel 1
T6963C_displayGrPanel(1);
Notes

None.

T6963C_displayTxtPanel

Prototype

procedure T6963C_displayTxtPanel(n : word);

Description

Display selected text panel.

Parameters
  • n: text panel number. Valid values: 0 and 1.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
// display text panel 1
T6963C_displayTxtPanel(1);
Notes

None.

T6963C_setGrPanel

Prototype

procedure T6963C_setGrPanel(n : word);

Description

Compute start address for selected graphic panel and set appropriate internal pointers. All subsequent graphic operations will be preformed at this graphic panel.

Parameters
  • n: graphic panel number. Valid values: 0 and 1.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
// set graphic panel 1 as current graphic panel. 
T6963C_setGrPanel(1);
Notes

None.

T6963C_setTxtPanel

Prototype

procedure T6963C_setTxtPanel(n : word);

Description

Compute start address for selected text panel and set appropriate internal pointers. All subsequent text operations will be preformed at this text panel.

Parameters
  • n: text panel number. Valid values: 0 and 1.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
// set text panel 1 as current text panel. 
T6963C_setTxtPanel(1);
Notes

None.

T6963C_panelFill

Prototype

procedure T6963C_panelFill(v : word);

Description

Fill current panel in full (graphic+text) with appropriate value (0 to clear).

Parameters
  • v: value to fill panel with.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
clear current panel
T6963C_panelFill(0);
Notes

None.

T6963C_grFill

Prototype

procedure T6963C_grFill(v: word);

Description

Fill current graphic panel with appropriate value (0 to clear).

Parameters
  • v: value to fill graphic panel with.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
// clear current graphic panel 
T6963C_grFill(0);
Notes

None.

T6963C_txtFill

Prototype

procedure T6963C_txtFill(v : word);

Description

Fill current text panel with appropriate value (0 to clear).

Parameters
  • v: this value increased by 32 will be used to fill text panel.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
// clear current text panel
T6963C_txtFill(0);
Notes

None.

T6963C_cursor_height

Prototype

procedure T6963C_cursor_height(n: word);

Description

Set cursor size.

Parameters
  • n: cursor height. Valid values: 0..7.
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
T6963C_cursor_height(7);
Notes

None.

T6963C_graphics

Prototype

procedure T6963C_graphics(n : word);

Description

Enable/disable graphic displaying.

Parameters
  • n: graphic enable/disable parameter. Valid values: 0 (disable graphic dispaying) and 1 (enable graphic displaying).
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
// enable graphic displaying
T6963C_graphics(1);
Notes

None.

T6963C_text

Prototype

procedure T6963C_text(n : word);

Description

Enable/disable text displaying.

Parameters
  • n: on/off parameter. Valid values: 0 (disable text displaying) and 1 (enable text displaying).
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
// enable text displaying 
T6963C_text(1);
Notes

None.

T6963C_cursor

Prototype

procedure T6963C_cursor(n : word);

Description

Set cursor on/off.

Parameters
  • n: on/off parameter. Valid values: 0 (set cursor off) and 1 (set cursor on).
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
// set cursor on
T6963C_cursor(1);
Notes

None.

Prototype

procedure T6963C_cursor_blink(n : word);

Description

Enable/disable cursor blinking.

Parameters
  • n: cursor blinking enable/disable parameter. Valid values: 0 (disable cursor blinking) and 1 (enable cursor blinking).
Returns

Nothing.

Requires

Toshiba Glcd module needs to be initialized. See the T6963C_init routine.

Example
// enable cursor blinking 
T6963C_cursor_blink(1);
Notes

None.