Datasheet
ST7540 Functional description
19/44
6.5 Host processor interface
ST7540 exchanges data with the host processor through a serial interface.
The data transfer is managed by REG_DATA and RxTx Lines, while data are exchanged
using RxD, TxD and CLR/T lines.
Four are the ST7540 working modes:
● Data Reception
● Data Transmission
● Control Register Read
● Control Register Write
REG_DATA and RxTx lines are level sensitive inputs.
ST7540 features two type of Host Communication Interfaces:
● SPI
● UART
The selection can be done through the UART/SPI pin. If UART/SPI pin is forced to “0” SPI
interface is selected while if UART/SPI pin is forced to “1” UART interface is selected. The
type of interface affects the Data Reception by setting the idle state of RxD line. When
ST7540 is in Receiving mode (REG_DATA=”0” and RxTx =“1”) and no data are available on
mains (or RxD is forced to an idle state, i.e. with a conditioned Detection Method), the RxD
line is forced to “0” when UART/SPI pin is forced to ”0” or it is forced to “1” when UART/SPI
pin is forced to ”1”.
The UART interface allows to connect an UART compatible device while SPI interface
allows to connect an SPI compatible device. The allowed combinations of Host
Interface/ST7540 Mains Access are:
Table 9. Data and Control register access bits configuration
REG_DATA RxTx
Data Transmission 0 0
Data Reception 0 1
Control Register Read 1 1
Control Register Write 1 0
Table 10. Host interface / ST7540 mains access combinations
Host device
interface type
UART/SPI pin
Communication
mode
Mains access
Asynchronous Synchronous
UART “1” Transmission X
UART “1” Reception X
SPI “0” Transmission X
SPI “0” Reception X