Datasheet

'*
'* If PORTA_3 is pressed, display text and graphic panels
'*
else
if ( PINA3_bit = 0) then
SPI_T6963C_graphics(1)
SPI_T6963C_text(1)
Delay_ms(300)
'*
'* If PORTA_4 is pressed, change cursor
'*
else
if( PINA4_bit = 0) then
Inc(curs)
if (curs = 3) then
curs = 0
end if
select case curs
case 0
' no cursor
SPI_T6963C_cursor(0)
case 1
' blinking cursor
SPI_T6963C_cursor(1)
SPI_T6963C_cursor_blink(1)
case 2
' non blinking cursor
SPI_T6963C_cursor(1)
SPI_T6963C_cursor_blink(0)
end select
Delay_ms(300)
end if
end if
end if
end if
end if
'*
'* Move cursor, even if not visible
'*
Inc(cposx)
if (cposx = SPI_T6963C_txtCols) then
cposx = 0
Inc(cposy)
if (cposy = SPI_T6963C_grHeight / SPI_T6963C_CHARACTER_HEIGHT)
then
cposy = 0
end if
end if
SPI_T6963C_set_cursor(cposx, cposy)
Delay_ms(100)
wend
end.
440
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6