You are on page 1of 15

T6963C Graphic Lcd Library (mC PRO for PIC) - Support Center

Home Support Desk Knowledge Base Support Forums Projects Download Books Contact Us
 
Support Center » Knowledgebase » Hardware libraries » T6963C Graphic Lcd Library (mC PRO for PIC)

 T6963C Graphic Lcd Library (mC PRO for PIC)  How to register?
Support ticket system uses Login
Article
Share option linked to our Forum
users database. If you are still not a
T6963C Graphic Lcd Library registered Forum user, you should
register here
The mikroC PRO for PIC provides a library for working with Glcds based on TOSHIBA T6963C controller. The Toshiba T6963C is  Log in  
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 Username:
mobile measurement equipment. Although small, this contoller has a capability of displaying and merging text and graphics Password:
and it manages all the interfacing signals to the displays Row and Column drivers.
Remember
Me:
For creating a custom set of Glcd images use Glcd Bitmap Editor Tool.
  Log in
Notes :
 Search
ChipEnable(CE), FontSelect(FS) and Reverse(MD) have to be set to appropriate levels by the user outside of the Search
T6963C_Init function. See the Library Example code at the bottom of this page.
--Entire
-- Entire Support
Support Site -- Site --
Some mikroElektronika's adapter boards have pinout different from T6369C datasheets. Appropriate relations
between these labels are given in the table below:  Article Options

 Add Comment
Adapter Board T6369C datasheet
 Print Article
RS C/D

R/W /RD  E-mail Article

E /WR  Add to Favorites

External dependencies of T6963C Graphic Lcd Library

The following variables
must be defined in all
Description : Example :
projects using T6963C
Graphic Lcd library:

extern sfr char char T6963C_dataPort at
T6963C Data Port.
T6963C_dataPort; PORTD;

extern sfr sbit sbit T6963C_ctrlwr at
Write signal.
T6963C_ctrlwr; RC2_bit;

extern sfr sbit sbit T6963C_ctrlrd at
Read signal.
T6963C_ctrlrd; RC1_bit;

extern sfr sbit Command/Data sbit T6963C_ctrlcd at
T6963C_ctrlcd; signal. RC0_bit;

extern sfr sbit sbit T6963C_ctrlrst at
Reset signal.
T6963C_ctrlrst; RC4_bit;

sbit
extern sfr sbit Direction of the Write
T6963C_ctrlwr_Direction
T6963C_ctrlwr_Direction; pin.
at TRISC2_bit;

sbit
extern sfr sbit Direction of the Read
T6963C_ctrlrd_Direction
T6963C_ctrlrd_Direction; pin.
at TRISC1_bit;

sbit
extern sfr sbit Direction of the Data
T6963C_ctrlcd_Direction
T6963C_ctrlcd_Direction; pin.
at TRISC0_bit;

sbit
extern sfr sbit Direction of the Reset
T6963C_ctrlrst_Direction
T6963C_ctrlrst_Direction; pin.
at TRISC4_bit;

Library Routines

T6963C_Init
T6963C_WriteData
T6963C_WriteCommand
T6963C_SetPtr
T6963C_WaitReady
T6963C_Fill
T6963C_Dot
T6963C_Write_Char

http://www.mikroe.com/esupport/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0,63[21/03/2011 0:15:14]

63[21/03/2011 0:15:14] . schematic: +---------------------+ /\ + GRAPHICS PANEL #0 + | + + | + + | + + | +---------------------+ | PANEL 0 + TEXT PANEL #0 + | + + \/ +---------------------+ /\ + GRAPHICS PANEL #1 + | + + | + + | + + | +---------------------+ | PANEL 1 + TEXT PANEL #1 + | + + | +---------------------+ \/ Requires Global variables : T6963C_dataPort: Data Port T6963C_ctrlwr: Write signal pin T6963C_ctrlrd: Read signal pin T6963C_ctrlcd: Command/Data signal pin T6963C_ctrlrst: Reset signal pin T6963C_ctrlwr_Direction: Direction of Write signal pin T6963C_ctrlrd_Direction: Direction of Read signal pin T6963C_ctrlcd_Direction: Direction of Command/Data signal pin T6963C_ctrlrst_Direction: Direction of Reset signal pin must be defined before using this function.com/esupport/index. Returns Nothing. sbit T6963C_ctrlwr at RC2_bit. http://www. These macros can be found in the T6963C.T6963C Graphic Lcd Library (mC PRO for PIC) .Support Center T6963C_Write_Text T6963C_Line T6963C_Rectangle T6963C_Box T6963C_Circle T6963C_Image T6963C_Sprite T6963C_Set_Cursor Note: The following low level library routines are implemented as macros. Description Initalizes the Graphic Lcd controller.h header file which is located in the T6963C example projects folders. T6963C_ClearBit T6963C_SetBit T6963C_NegBit T6963C_DisplayGrPanel T6963C_DisplayTxtPanel T6963C_SetGrPanel T6963C_SetTxtPanel T6963C_PanelFill T6963C_GrFill T6963C_TxtFill T6963C_Cursor_Height T6963C_Graphics T6963C_Text T6963C_Cursor T6963C_Cursor_Blink T6963C_Init Prototype void T6963C_Init(unsigned int width. Parameters : width: width of the Glcd panel height: height of the Glcd panel fntW: font width   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). unsigned char height. unsigned char fntW).mikroe.   Example // T6963C module connections char T6963C_dataPort at PORTD.php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0.

// CE signal sbit T6963C_ctrlfs at RC6_bit. Description Writes data to T6963C controller. Parameters : mydata: data to be written   Requires Toshiba Glcd module needs to be initialized. Example T6963C_WriteCommand(T6963C_CURSOR_POINTER_SET). // init display for 240 pixel width.63[21/03/2011 0:15:14] . sbit T6963C_ctrlrst at RC4_bit. // FS signal direction sbit T6963C_ctrlmd_Direction at TRISC5_bit. 8). // FS signal sbit T6963C_ctrlmd at RC5_bit. Description Writes command to T6963C controller. sbit T6963C_ctrlrst_Direction at TRISC4_bit. // MD signal sbit T6963C_ctrlce_Direction at TRISC3_bit. Example T6963C_WriteData(AddrL). See the T6963C_Init routine.T6963C Graphic Lcd Library (mC PRO for PIC) . 128. unsigned char c).. // CE signal direction sbit T6963C_ctrlfs_Direction at TRISC6_bit.com/esupport/index. 128 pixel height and 8 bits character width T6963C_Init(240. sbit T6963C_ctrlcd at RC0_bit. T6963C_WriteCommand Prototype void T6963C_WriteCommand(unsigned char mydata). sbit T6963C_ctrlrd_Direction at TRISC1_bit. // MD signal direction // End T6963C module connections . Description Sets the memory pointer p for command c. they are set in main function sbit T6963C_ctrlce at RC3_bit. sbit T6963C_ctrlwr_Direction at TRISC2_bit.mikroe. Returns Nothing. T6963C_SetPtr Prototype void T6963C_SetPtr(unsigned int p. See the T6963C_Init routine.. T6963C_WriteData Prototype void T6963C_WriteData(unsigned char mydata). Parameters : p: address where command should be written http://www.Support Center sbit T6963C_ctrlrd at RC1_bit. sbit T6963C_ctrlcd_Direction at TRISC0_bit. Returns Nothing. // End of T6963C module connections // Signals not used by library. Returns Nothing. Parameters : mydata: command to be written   Requires Toshiba Glcd module needs to be initialized.php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0.

See the T6963C_Init routine. unsigned char y. Requires Toshiba Glcd module needs to be initialized.php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0. Valid values: T6963C_BLACK and T6963C_WHITE   Requires Toshiba Glcd module needs to be initialized. T6963C_ADDRESS_POINTER_SET). Example T6963C_Fill(0x33. unsigned char http://www. unsigned int start. unsigned int len). Example T6963C_Dot(x0. T6963C_Write_Char void T6963C_Write_Char(unsigned char c.0x000F). Returns Nothing.0x00FF. Returns Nothing. Parameters : v: byte to be written start: starting address of the memory block len: length of the memory block in bytes   Requires Toshiba Glcd module needs to be initialized. y0. T6963C_WaitReady Prototype void T6963C_WaitReady(void).Support Center c: command to be written   Requires Toshiba Glcd module needs to be initialized. Parameters : x: dot position on x-axis y: dot position on y-axis color: color parameter. Example T6963C_WaitReady().com/esupport/index. See the T6963C_Init routine. See the T6963C_Init routine. y).mikroe. Example T6963C_SetPtr(T6963C_grHomeAddr + start. T6963C_Fill Prototype void T6963C_Fill(unsigned char v. int y. T6963C_Dot Prototype void T6963C_Dot(int x. and loops until Toshiba Glcd module is ready. Description Draws a dot in the current graphic panel of Glcd at coordinates (x. Description Pools the status byte. Returns Nothing. unsigned char x.63[21/03/2011 0:15:14] .T6963C Graphic Lcd Library (mC PRO for PIC) . See the T6963C_Init routine. unsigned char color). Description Fills controller memory block with given byte. pcolor).

22. For more details see the T6963C datasheet.Support Center Prototype mode). 0.   Requires Toshiba Glcd module needs to be initialized.T6963C Graphic Lcd Library (mC PRO for PIC) . AND-Mode: The text and graphic data shown on display are combined via the logical "AND function". int y1. Description Writes text in the current text panel of Glcd at coordinates (x. T6963C_ROM_MODE_XOR. T6963C_ROM_MODE_XOR). Description Writes a char in the current text panel of Glcd at coordinates (x. unsigned char mode).e. This is the most common way of combining text and graphics for example labels on buttons. See the T6963C_Init routine. i. int x1. T6963C_ROM_MODE_AND and T6963C_ROM_MODE_TEXT   Mode parameter explanation: OR Mode: In the OR-Mode. AND-Mode: The text and graphic data shown on display are combined via the logical "AND function".e. y). white text on black background. http://www. T6963C_Line Prototype void T6963C_Line(int x0. Parameters : c: char to be written x: char position on x-axis y: char position on y-axis mode: mode parameter. Returns Nothing. int y0. unsigned char x. text and graphics can be displayed and the data is logically "OR- ed".   Requires Toshiba Glcd module needs to be initialized. WELCOME !". unsigned char pcolor). Returns Nothing. Valid values: T6963C_ROM_MODE_OR. Example T6963C_Write_Text(" Glcd LIBRARY DEMO. i. T6963C_ROM_MODE_XOR. For more details see the T6963C datasheet. TEXT-Mode: This option is only available when displaying just a text. Parameters : str: text to be written x: text position on x-axis y: text position on y-axis mode: mode parameter. T6963C_Write_Text Prototype void T6963C_Write_Text(unsigned char *str.com/esupport/index. T6963C_ROM_MODE_AND and T6963C_ROM_MODE_TEXT   Mode parameter explanation: OR Mode: In the OR-Mode. 0. XOR-Mode: In this mode. 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. This can be useful to display text in the negative mode. the text and graphics data are combined via the logical "exclusive OR".23. unsigned char y. y).63[21/03/2011 0:15:14] . XOR-Mode: In this mode.php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0.mikroe. See the T6963C_Init routine. This is the most common way of combining text and graphics for example labels on buttons. white text on black background. the text and graphics data are combined via the logical "exclusive OR". Example T6963C_Write_Char('A'. The Text Attribute values are stored in the graphic area of display memory.AND). This can be useful to display text in the negative mode. Valid values: T6963C_ROM_MODE_OR. text and graphics can be displayed and the data is logically "OR- ed".

0. 239. int y1. T6963C_WHITE). y0) to (x1. int x1. See the T6963C_Init routine. int y1. T6963C_WHITE). T6963C_Box Prototype void T6963C_Box(int x0. Description Draws a line from (x0. T6963C_WHITE). Example T6963C_Rectangle(20. Returns Nothing. unsigned char pcolor). Valid values: T6963C_BLACK and T6963C_WHITE   Requires Toshiba Glcd module needs to be initialized. 119. 239. 127. int x1. 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. http://www. Valid values: T6963C_BLACK and T6963C_WHITE   Requires Toshiba Glcd module needs to be initialized. int y0. long r. See the T6963C_Init routine.com/esupport/index. Valid values: T6963C_BLACK and T6963C_WHITE   Requires Toshiba Glcd module needs to be initialized.63[21/03/2011 0:15:14] . Example T6963C_Line(0. int y0. 127. Example T6963C_Box(0. See the T6963C_Init routine. Description Draws a box on 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. 20. 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. y1).mikroe. Returns Nothing. 219. unsigned char pcolor). Returns Nothing. T6963C_Circle Prototype void T6963C_Circle(int x. 107. T6963C_Rectangle Prototype void T6963C_Rectangle(int x0.php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0. unsigned char pcolor).T6963C Graphic Lcd Library (mC PRO for PIC) . Description Draws a rectangle on Glcd.Support Center Returns Nothing. int y.

119). See the T6963C_Init routine. unsigned char sy). Example T6963C_Sprite(76. Valid values: multiples of the font width sy: picture height   Note: 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.Support Center Description Draws a circle on Glcd. See the T6963C_Init routine. Valid values: multiples of the font width py: y coordinate of the upper left picture corner pic: picture to be displayed sx: picture width. T6963C_WHITE).php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0. 64.mikroe. // draw a sprite T6963C_Set_Cursor Prototype void T6963C_Set_Cursor(unsigned char x. Parameters : pic: image to be displayed. unsigned char py. unsigned char y). T6963C_Sprite Prototype void T6963C_Sprite(unsigned char px. py+sy) with custom size picture. Description Fills graphic rectangle area (px. Example T6963C_Circle(120. 88. Requires Toshiba Glcd module needs to be initialized. const code char *pic. Description Displays bitmap on Glcd. Bitmap array can be located in both code and RAM memory (due to the mikroC PRO for PIC pointer to const and pointer to RAM equivalency). http://www. See the T6963C_Init routine. Returns Nothing. Parameters : px: x coordinate of the upper left picture corner. T6963C_Image Prototype void T6963C_Image(const code char *pic).T6963C Graphic Lcd Library (mC PRO for PIC) . Parameters : x: x coordinate of the circle center y: y coordinate of the circle center r: radius size pcolor: color parameter. Returns Nothing.63[21/03/2011 0:15:14] . 110.   Use the integrated Glcd Bitmap Editor (menu option Tools › Glcd Bitmap Editor) to convert image to a constant array suitable for displaying on Glcd. Note: Image dimension must match the display dimension. Example T6963C_Image(mc). 4.com/esupport/index. py) to (px+sx. Requires Toshiba Glcd module needs to be initialized. einstein. Valid values: T6963C_BLACK and T6963C_WHITE   Requires Toshiba Glcd module needs to be initialized. unsigned char sx.

See the T6963C_Init routine.T6963C Graphic Lcd Library (mC PRO for PIC) . Returns Nothing. T6963C_SetBit Prototype void T6963C_SetBit(char b). See the T6963C_Init routine. Example T6963C_Set_Cursor(cposx.   Toshiba Glcd module needs to be initialized. Example // set bits 0 and 1 on control port T6963C_SetBit(0x03).php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0. Description Negates control port bit(s). Parameters : b: bit mask. The function will negate bit x on control port if bit x in bit mask is set to 1. http://www. The function will set bit x on control port if bit x in bit mask is set to 1. Parameters : x: cursor position row number y: cursor position column number   Requires Toshiba Glcd module needs to be initialized. cposy). See the T6963C_Init routine. Returns Nothing. Example // clear bits 0 and 1 on control port T6963C_ClearBit(0x03).mikroe.Support Center Returns Nothing. See the T6963C_Init routine.   Requires Toshiba Glcd module needs to be initialized. Parameters : b: bit mask. The function will clear bit x on control port if bit x in bit mask is set to 1. Description Clears control port bit(s).63[21/03/2011 0:15:14] . Description Sets cursor to row x and column y.   Requires Toshiba Glcd module needs to be initialized.com/esupport/index. Returns Nothing. Description Sets control port bit(s). T6963C_ClearBit Prototype void T6963C_ClearBit(char b). Parameters : b: bit mask. T6963C_NegBit Prototype void T6963C_NegBit(char b).

See the T6963C_Init routine. T6963C_SetGrPanel(1). http://www. Description Compute start address for selected graphic panel and set appropriate internal pointers.   T6963C_SetGrPanel Prototype void T6963C_SetGrPanel(char n). Requires Toshiba Glcd module needs to be initialized. T6963C_DisplayTxtPanel Prototype void T6963C_DisplayTxtPanel(char n). See the T6963C_Init routine. T6963C_DisplayGrPanel Prototype void T6963C_DisplayGrPanel(char n). All subsequent graphic operations will be preformed at this graphic panel. T6963C_SetTxtPanel Prototype void T6963C_SetTxtPanel(char n). Valid values: 0 and 1 . Parameters : n: graphic panel number.T6963C Graphic Lcd Library (mC PRO for PIC) . Returns Nothing. Valid values: 0 and 1 .php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0. Returns Nothing. Example // display text panel 1 T6963C_DisplayTxtPanel(1).mikroe.63[21/03/2011 0:15:14] . Parameters : n: text panel number. Example // display graphic panel 1 T6963C_DisplayGrPanel(1). Requires Toshiba Glcd module needs to be initialized. Parameters : n: graphic panel number. Description Display selected text panel. Returns Nothing. Nothing.com/esupport/index. Description Display selected graphic panel. Example // set graphic panel 1 as current graphic panel. Requires Toshiba Glcd module needs to be initialized.Support Center Requires Example // negate bits 0 and 1 on control port T6963C_NegBit(0x03). See the T6963C_Init routine. Valid values: 0 and 1 .

Example // clear current text panel T6963C_TxtFill(0).php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0.T6963C Graphic Lcd Library (mC PRO for PIC) .Support Center Returns Description Compute start address for selected text panel and set appropriate internal pointers. Requires Toshiba Glcd module needs to be initialized. Requires Toshiba Glcd module needs to be initialized. See the T6963C_Init routine. Parameters : v: this value increased by 32 will be used to fill text panel. T6963C_PanelFill Prototype void T6963C_PanelFill(unsigned char v). Parameters : v: value to fill graphic panel with. Returns Nothing. Parameters : v: value to fill panel with. Description Fill current text panel with appropriate value (0 to clear).com/esupport/index. All subsequent text operations will be preformed at this text panel. See the T6963C_Init routine. Returns Nothing. Returns Nothing. Valid values: 0 and 1 . T6963C_SetTxtPanel(1). Requires Toshiba Glcd module needs to be initialized. Description Fill current graphic panel with appropriate value (0 to clear). Example // set text panel 1 as current text panel. Parameters : n: text panel number. T6963C_GrFill Prototype void T6963C_GrFill(unsigned char v). T6963C_TxtFill Prototype void T6963C_TxtFill(unsigned char v). Requires Toshiba Glcd module needs to be initialized. http://www. See the T6963C_Init routine. Description Fill current panel in full (graphic+text) with appropriate value (0 to clear).63[21/03/2011 0:15:14] .mikroe. Example clear current panel T6963C_PanelFill(0). See the T6963C_Init routine. Example // clear current graphic panel T6963C_GrFill(0).

Parameters : n: on/off parameter. Description Enable/disable graphic displaying.. Requires Toshiba Glcd module needs to be initialized. T6963C_Cursor Prototype void T6963C_Cursor(char n). Description Set cursor on/off.mikroe. Description Set cursor size. Example // enable graphic displaying T6963C_Graphics(1). Parameters : n: cursor height. See the T6963C_Init routine. Valid values: 0 (disable graphic displaying) and 1 (enable graphic displaying). Parameters : n: on/off parameter. Example // enable text displaying T6963C_Text(1).php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0. http://www. T6963C_Text Prototype void T6963C_Text(char n). Requires Toshiba Glcd module needs to be initialized. See the T6963C_Init routine.63[21/03/2011 0:15:14] . Returns Nothing. Description Enable/disable text displaying. T6963C_Graphics Prototype void T6963C_Graphics(char n). Returns Nothing. Requires Toshiba Glcd module needs to be initialized. See the T6963C_Init routine. Parameters : n: on/off parameter. Example T6963C_Cursor_Height(7).Support Center T6963C_Cursor_Height Prototype void T6963C_Cursor_Height(unsigned char n). Valid values: 0 .com/esupport/index. 7 .T6963C Graphic Lcd Library (mC PRO for PIC) . See the T6963C_Init routine. Valid values: 0 (set cursor off) and 1 (set cursor on). Requires Toshiba Glcd module needs to be initialized. Valid values: 0 (disable text displaying) and 1 (enable text displaying). Returns Nothing. Returns Nothing.

WELCOME !".y position TRISA0_bit = 1. // RST reset signal // Signals not used by library. #include "__T6963C. // Font Select 8x8 T6963C_ctrlmd_Direction = 0.mikroe. // CD command/data signal sbit T6963C_ctrlrst at RC4_bit. // Cursor x . // MD signal direction // End T6963C module connections /* * bitmap pictures stored in ROM */ const code char mC[]. T6963C_ctrlmd = 0. Valid values: 0 (disable cursor blinking) and 1 (enable cursor blinking). // Set RA0 as input TRISA1_bit = 1. 128. char txt[] = " GLCD LIBRARY DEMO. Hardware configurations in this example are made for the T6963C 240x128 display. // CD command/data signal sbit T6963C_ctrlrst_Direction at TRISC4_bit. Requires Toshiba Glcd module needs to be initialized. Library Example The following drawing demo tests advanced routines of the T6963C Glcd library. // Enable T6963C T6963C_ctrlfs_Direction = 0. See the T6963C_Init routine. // FS signal direction sbit T6963C_ctrlmd_Direction at TRISC5_bit. // MD signal sbit T6963C_ctrlce_Direction at TRISC3_bit. unsigned char panel.63[21/03/2011 0:15:14] .h" // T6963C module connections char T6963C_dataPort at PORTD. they are set in main function sbit T6963C_ctrlce at RC3_bit. // Set RA1 as input TRISA2_bit = 1. // Initialize T6369C T6963C_init(240. 8). // Set RA4 as input T6963C_ctrlce_Direction = 0. // Configure AN pins as digital I/O ANSELH = 0. // CE signal direction sbit T6963C_ctrlfs_Direction at TRISC6_bit. T6963C_ctrlce = 0. cposy. // FS signal sbit T6963C_ctrlmd at RC5_bit. Parameters : n: on/off parameter. // WR write signal sbit T6963C_ctrlrd at RC1_bit. Description Enable/disable cursor blinking. // RD read signal sbit T6963C_ctrlcd_Direction at TRISC0_bit. // RD read signal sbit T6963C_ctrlcd at RC0_bit. // WR write signal sbit T6963C_ctrlrd_Direction at TRISC1_bit. // Set RA3 as input TRISA4_bit = 1. // Column number select ANSEL = 0.php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0. T6963C_ctrlfs = 0. /* * Enable both graphics and text display at the same time */ http://www. // Set RA2 as input TRISA3_bit = 1. T6963C_Cursor_Blink Prototype void T6963C_Cursor_Blink(char n). // CE signal sbit T6963C_ctrlfs at RC6_bit.com/esupport/index. // Current panel unsigned int i. const code char einstein[]. // Cursor visibility unsigned int cposx. Returns Nothing. // DATA port sbit T6963C_ctrlwr at RC2_bit.Support Center Example // set cursor on T6963C_Cursor(1). EasyPIC5 board and 16F887. // General purpose register unsigned char curs. Example // enable cursor blinking T6963C_Cursor_Blink(1). // RST reset signal sbit T6963C_ctrlwr_Direction at TRISC2_bit. void main() { char txt1[] = " EINSTEIN WOULD HAVE LIKED mE".T6963C Graphic Lcd Library (mC PRO for PIC) .

239. T6963C_text(1). 0. 110. einstein. 127. 64. T6963C_circle(120. T6963C_WHITE). T6963C_ROM_MODE_XOR). 15. T6963C_WHITE). 119). 0. 64. 0. Delay_ms(300). T6963C_WHITE). T6963C_WHITE). 199. 107. 119. T6963C_text(1). T6963C_write_text(txt1. T6963C_WHITE).com/esupport/index. 0. 64. T6963C_circle(120. 127. T6963C_displayGrPanel(panel). change cursor */ else if (RA4_bit) { curs++. 64. /* * Text messages */ T6963C_write_text(txt. T6963C_WHITE). /* * Draw a cross */ T6963C_line(0.) { // Endless loop /* * If RA0 is pressed. T6963C_WHITE). // Move cursor to top left T6963C_cursor(0). 10. 90. T6963C_circle(120. Delay_ms(300). /* * Draw solid boxes */ T6963C_box(0. // 8 pixel height T6963C_set_cursor(0. 239. 64. 0. 239. T6963C_WHITE). T6963C_line(0. if(curs == 3) curs = 0. } /* * If RA4 is pressed. T6963C_WHITE). T6963C_WHITE).. Delay_ms(300). 70. } /* * If RA2 is pressed. toggle the display between graphic panel 0 and graphic panel 1 */ else if (RA1_bit) { panel++. T6963C_rectangle(20. T6963C_WHITE). 20.php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0. 60. switch(curs) { case 0: // no cursor http://www. T6963C_WHITE). T6963C_WHITE). T6963C_ROM_MODE_XOR). display only graphic panel */ if(RA0_bit) { T6963C_graphics(1). 127. } /* * If RA3 is pressed. /* * Cursor */ T6963C_cursor_height(8). T6963C_circle(120.63[21/03/2011 0:15:14] . Delay_ms(300). 219.Support Center T6963C_graphics(1). 127. 0). // Draw a sprite T6963C_setGrPanel(1).T6963C Graphic Lcd Library (mC PRO for PIC) . 40. 87. // Select other graphic panel T6963C_image(mC). T6963C_WHITE). 4. cposx = cposy = 0. /* * Draw circles */ T6963C_circle(120. 179. panel = 0. curs = 0. 67. 64. T6963C_WHITE). 30.mikroe. i = 0. 0. 239. T6963C_text(0). 64. T6963C_circle(120. for(. 130. display text and graphic panels */ else if (RA3_bit) { T6963C_graphics(1). T6963C_rectangle(60. panel &= 1. T6963C_circle(120. 8. 239. } /* * If RA1 is pressed. T6963C_rectangle(40. T6963C_sprite(76. 88. 0. T6963C_text(1). 50. T6963C_box(0. // Cursor off /* * Draw rectangles */ T6963C_rectangle(0. display only text panel */ else if (RA2_bit) { T6963C_graphics(0).

if(cposx == T6963C_txtCols) { cposx = 0. case 1: // blinking cursor T6963C_cursor(1).mikroe. Delay_ms(100). break. T6963C_cursor_blink(0). cposy). } } HW Connection T6963C Glcd HW connection http://www. even if not visible */ cposx++. } } T6963C_set_cursor(cposx.Support Center T6963C_cursor(0). } Delay_ms(300).php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0. } /* * Move cursor.T6963C Graphic Lcd Library (mC PRO for PIC) .63[21/03/2011 0:15:14] . cposy++. T6963C_cursor_blink(1). if(cposy == T6963C_grHeight / T6963C_CHARACTER_HEIGHT) { cposy = 0. break. break. case 2: // non blinking cursor T6963C_cursor(1).com/esupport/index.

php?_m=knowledgebase&_a=viewarticle&kbarticleid=156&nav=0. mikroElektronika.mikroe.com/esupport/index.T6963C Graphic Lcd Library (mC PRO for PIC) . All trade and/or services marks mentioned are the property of their respective owners.Support Center Article Details Article ID: 156 Created On: 14 Feb 2010 10:50 AM  User Comments Add a Comment  Back Related Links: Support forums Site map Contact Legal info Copyright © 1998–2010.63[21/03/2011 0:15:14] . All rights reserved. http://www.