Datasheet

/*
* If PB2 is pressed, display only text panel
*/
else if(PINB2) {
T6963C_graphics(0);
T6963C_text(1);
Delay_ms(300);
}
/*
* If PB3 is pressed, display text and graphic panels
*/
else if(PINB3) {
T6963C_graphics(1);
T6963C_text(1);
Delay_ms(300);
}
/*
* If PB4 is pressed, change cursor
*/
else if(PINB4) {
curs++;
if(curs == 3) curs = 0;
switch(curs) {
case 0:
// no cursor
T6963C_cursor(0);
break;
case 1:
// blinking cursor
T6963C_cursor(1);
T6963C_cursor_blink(1);
break;
case 2:
// non blinking cursor
T6963C_cursor(1);
T6963C_cursor_blink(0);
break;
}
Delay_ms(300);
}
/*
* Move cursor, even if not visible
*/
cposx++;
if(cposx == T6963C_txtCols) {
cposx = 0;
cposy++;
if(cposy == T6963C_grHeight / T6963C_CHARACTER_HEIGHT) {
cposy = 0;
}
}
T6963C_set_cursor(cposx, cposy);
Delay_ms(100);
}
}
528
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6