Mikroelektronika MIKROE-742 데이터 시트
SPI_T6963C_WriteData
432
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Requires
Global variables :
-
SPExpanderCS
: Chip Select line
-
SPExpanderRST
: Reset line
-
SPExpanderCS_Direction
: Direction of the Chip Select pin
-
SPExpanderRST_Direction
: Direction of the Reset pin
must be defined before using this function.
SPI module needs to be initialized. See SPI1_Init and SPI1_Init_Advanced routines.
Example
' port expander pinout definition
var SPExpanderCS as sbit at PORTB.B1
var SPExpanderCS as sbit at PORTB.B1
SPExpanderRST as
sbit at PORTB.B0
SPExpanderCS_Direction as
sbit at DDRB.B1
SPExpanderRST_Direction as
sbit at DDRB.B0
...
// Initialize SPI module
SPI1_Init_Advanced(_SPI_MASTER, _SPI_FCY_DIV32,
_SPI_CLK_HI_TRAILING);
SPI1_Init_Advanced(_SPI_MASTER, _SPI_FCY_DIV32,
_SPI_CLK_HI_TRAILING);
SPI_Rd_Ptr := @SPI1_Read; // Pass pointer to
SPI Read function of used SPI module
SPI_T6963C_Config(240, 64, 8, 0, 0, 1, 3, 4);
SPI_T6963C_Config(240, 64, 8, 0, 0, 1, 3, 4);
Prototype
procedure SPI_T6963C_WriteData(Ddata : byte);
Returns
Nothing.
Description
Writes data to T6963C controller via SPI interface.
Parameters :
-
Ddata
: data to be written
Requires
Toshiba Glcd module needs to be initialized. See SPI_T6963C_Config routine.
Example
SPI_T6963C_WriteData(AddrL);