Datasheet

' ' If Port Expander Library uses SPI2 module
' Pass pointer to SPI Read function of used SPI module
' Spi_Rd_Ptr = @SPI2_Read ' Pass pointer to SPI Read
function of used SPI module
' Initialize SPI module used with PortExpander
' SPI2_Init_Advanced(_SPI_MASTER, _SPI_FCY_DIV2,
_SPI_CLK_HI_TRAILING)
' Initialize SPI Toshiba 240x128
SPI_T6963C_Config(240, 128, 8, 0, 2, 1, 0, 4)
'Delay_ms(1000)
' *
' * Enable both graphics and text display at the same time
' *
SPI_T6963C_graphics(1)
SPI_T6963C_text(1)
panel = 0
i = 0
curs = 0
cposx = 0
cposy = 0
' *
' * Text messages
' *
SPI_T6963C_write_text(txt, 0, 0, SPI_T6963C_ROM_MODE_XOR)
SPI_T6963C_write_text(txt1, 0, 15, SPI_T6963C_ROM_MODE_XOR)
'*
'* Cursor
'*
SPI_T6963C_cursor_height(8) ' 8 pixel height
SPI_T6963C_set_cursor(0, 0) ' move cursor to top left
SPI_T6963C_cursor(0) ' cursor off
'*
'* Draw rectangles
'*
SPI_T6963C_rectangle(0, 0, 239, 127, SPI_T6963C_WHITE)
SPI_T6963C_rectangle(20, 20, 219, 107, SPI_T6963C_WHITE)
SPI_T6963C_rectangle(40, 40, 199, 87, SPI_T6963C_WHITE)
SPI_T6963C_rectangle(60, 60, 179, 67, SPI_T6963C_WHITE)
438
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6