User manual
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
565
‘ * If RB11 is pressed, display text and graphic panels
else
if (RB11_bit <> 0) then
SPI_T6963C_graphics(1)
SPI_T6963C_text(1)
Delay_ms(300)
‘ * If RB12 is pressed, change cursor
else
if(RB12_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
#IFDEF COMPLETE_EXAMPLE
end if
#ENDIF
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 div SPI_T6963C_CHARACTER_HEIGHT) then
cposy = 0
end if
end if
SPI_T6963C_set_cursor(cposx, cposy)
Delay_ms(100)
wend
end.