User manual
mikroC PRO for dsPIC
MikroElektronika
611
void main() {
char txt1[] = " EINSTEIN WOULD HAVE LIKED mE";
char txt[] = " GLCD LIBRARY DEMO, WELCOME !";
unsigned char panel; // Current panel
unsigned int i; // General purpose register
unsigned char curs; // Cursor visibility
unsigned int cposx, cposy; // Cursor x-y position
#dene COMPLETE_EXAMPLE // comment this line to make simpler/smaller example
ADPCFG = 0xFFFF; // Congure AN pins as digital
TRISB8_bit = 1; // Set RF0 as input
TRISB9_bit = 1; // Set RF1 as input
TRISB10_bit = 1; // Set RF2 as input
TRISB11_bit = 1; // Set RF3 as input
TRISB12_bit = 1; // Set RF4 as input
T6963C_ctrlce_Direction = 0;
T6963C_ctrlce = 0; // Enable T6963C
T6963C_ctrlfs_Direction = 0;
T6963C_ctrlfs = 0; // Font Select 8x8
T6963C_ctrlmd_Direction = 0;
T6963C_ctrlmd = 0; // Column number select
// Initialize T6963C
T6963C_init(240, 128, 8);
/*
* Enable both graphics and text display at the same time
*/
T6963C_graphics(1);
T6963C_text(1);
panel = 0;
i = 0;
curs = 0;
cposx = cposy = 0;
/*
* Text messages
*/
T6963C_write_text(txt, 0, 0, T6963C_ROM_MODE_XOR);
T6963C_write_text(txt1, 0, 15, T6963C_ROM_MODE_XOR);
/*
* Cursor
*/
T6963C_cursor_height(8); // 8 pixel height
T6963C_set_cursor(0, 0); // Move cursor to top left
T6963C_cursor(0); // Cursor off