MicroWire Interface
7-42
7.4.4
Example of Protocol Using an LCD Controller (COP472-3)
Set up the interface by writing in setup 1 register (SR1) the following value:
J
CS_EDGE_RD = 1
J
CS_EDGE_WR = 0
J
CSCS_LVL = 0
J
CS_FRQ = 10
J
CS_CHK = 0
In this example, a loading sequence to drive a four-digit display is described.
7.4.4.1
Loading Sequence
1) Set the following fields of the control and status register (CSR):
J
NB_BITS_RD: 0
J
NB_BITS_WR: 0
J
INDEX: 01
J
CS_CMD: 1
J
START: 0
2) Wait for the CSRB bit of the control and status register (CSR) to be reset.
3) Load the transmit data register (TDR) with:
J
D7d1...D0d1 D7d2...D0d2 D7d1...D0d1: Data for digit 1
J
D7d2...D0d2: Data for digit 2
4) Set the following fields of the control and status register (CSR):
J
NB_BITS_RD: 0
J
NB_BITS_WR: 16 (decimal)
J
INDEX: 01
J
CS_CMD: 1
J
START: 1
5) Wait for the CSRB bit of the control and status register (CSR) to be reset.
6) Load the transmit data register (TDR) with:
J
D7d3...D0d3 D7d4...D0d4 D7d3...D0d3: Data for digit 3
J
D7d4...D0d4: Data for digit 4
7) Set the following fields of the control and status register (CSR):
J
NB_BITS_RD: 0
J
NB_BITS_WR: 16 (decimal)
J
INDEX: 01
J
CS_CMD: 1
J
START: 1