English
Language : 

HT16L21 Datasheet, PDF (21/36 Pages) Holtek Semiconductor Inc – RAM Mapping 32x4 LCD Driver
HT16L21
SPI Serial Interface
SPI Operation
The device also includes a 3-wire SPI serial interface. The SPI operations are described as follows:
• The CSB pin is used to activate the data transfer. When the CSB pin is at a high level, the SPI operation will be
reset and stopped. If the CSB pin changes state from high to low, data transmission will start.
• The data is transferred from the MSB of each byte and is shifted into the shift register on each CLK rising edge.
• The input data is automatically latched into the internal register for each 8-bit input data after the CSB signal
goes low.
• For read operations, the MCU should assert a high pulse on the CSB pin to change the data transfer direction
from input mode to output mode on the DIO pin after sending the command byte and the setting values. If the
MCU sets the CSB signal to a high level again after receiving the output data, the data direction on the DIO pin
will be changed into input mode and the read operation will end.
• For a read operation, the data is output on the DIO pin at the CLK falling edge.
• For display RAM data read/write operations using the SPI interface, the read/write control bit is contained in
the Display Data Input Command. Refer to the Display Data Input Command description for more details.
SPI Interface Write Operation
Byte Write Operation
• Single Command Type
A Single Command write operation is activated by the CSB signal going low. The 8-bit command byte is
shifted from the MSB into the shift register at each CLK rising edge.
CSB
CLK
DIO
Command byte
BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
SPI Single Command Type Write Operation
• Compound Command Type
For a compound command, an 8-bit command byte is first shifted into the shift register followed by an 8-bit
command setting. Note that the CLK high pulse width, after the command byte has been shifted in, must
remain at this level for at least 2μs after which the command setting data can be consecutively shifted in.
CSB
CLK
2μs(min)
DIO
Command byte
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
Command setting
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
SPI Compound Command Type Write Operation
Rev. 1.00
21
November 16, 2011