Functional description ST7540
22/44
6.5.2 Control register access
The communication with ST7540 Control Register is always synchronous. The access is
achieved using the same lines of the Mains interface (RxD, TxD, RxTx and CLR/T) plus
REG_DATA Line.
With REG_DATA = 1 and RxTx = 0, the data present on TxD are loaded into the Control
Register MSB first. The ST7540 samples the TxD line on CLR/T rising edges. The control
Register content is updated at the end of the register access section (REG_DATA falling
edge).
In Normal Control Register mode (Control Register bit 21 = ”0”, see Ta bl e 1 2) if more than
24 bits are transferred to ST7540 only latest 24 bits are stored inside the Control Register. If
less than 24 bits are transferred to ST7540 the Control Register writing is aborted.
In order to avoid undesired Control Register writings caused by REG_DATA line fluctuations
(for example because of surge or burst on mains), in Extended Control Register mode
(Control Register bit 21 = ”1” see Tabl e 1 2 ) exactly 24 or 48 bits must be transferred to
ST7540 in order to properly write the Control Register, otherwise writing is aborted. If 24 bits
are transferred, only the first 24 Control Register bits (from 23 to 0) are written.
With REG_DATA = 1 and RxTx = 1, the content of the Control Register is sent on RxD port.
The Data on RxD are stable on CLR/T rising edges MSB First. In Normal Control Register
mode 24 bits are transferred from ST7540 to the Host. In Extended Control Register mode
24 or 48 bits are transferred from ST7540 to the Host depending on content of Control
Register bit 18 (with bit 18 = ”0” the first 24 bits are transferred, otherwise all 48 bits are
transferred, see Ta b l e 1 2).
Figure 9. Data reception
➨ control register read ➨ data reception timing diagram
Figure 10. data reception
➨ control register write ➨ data reception timing diagram
T
CC
T
DS
T
DH
T
CR
T
CR
T
B
T
DS
T
DH
T
CC
CLR_T
RxD
REG_DATA
RxTx
D03IN1404
BIT23 BIT22
T
CC
T
CR
T
CR
T
CR
T
CR
T
B
T
DH
T
DS
T
CC
CLR_T
RxD
RxTx
TxD
REG_DATA
D03IN1403
BIT23 BIT22
T
S
T
H