MT312 Microprocessor Control
11.5 Examples of 2-Wire Bus Messages
KEY:
S
P
A
Start condition
Stop condition
Acknowledge
MT312 output
W
R
Write (= 0)
Read (= 1)
NA
NOT Acknowledge
ITALICS
RADD Register Address
Write operation - as a slave receiver:
S
DEVICE
ADDRESS
W
A
RADD
(n)
A
DATA
(reg n)
A
DATA
(reg n+1)
A
P
P
Read operation - MT312 as a slave transmitter:
S
DEVICE
R
A
DATA
A
DATA
A
DATA
NA
ADDRESS
(reg 0)
(reg 1)
(reg 2)
Write/read operation with repeated start - MT312 as a slave transmitter:
S
DEVICE
ADDRESS
W
A
RADD
(n)
A
S
DEVICE
ADDRESS
R
A
DATA
(reg n)
A
DATA
(reg n+1)
NA
P
Write / read / write operation with repeated start and auto increment off with IAI set high - MT312 as a slave
transmitter. This example uses the GPP CTRL register where the register address is 20 + 128 (IAI). Data is first
read from the GPP CTRL register, then following a restart, data is written to the GPP CTRL register.
S
DEVICE
ADDRESS
W
A
RADD
(148)
A
S
DEVICE
ADDRESS
R
A
DATA
(reg 20)
NA
S
DEVICE
ADDRESS
W
A
DATA
(reg 20)
A
P
To program the Tuner, use the following sequence of three messages:
Open secondary 2-wire port:
S
MT312
ADDRESS
W
A
GPP CTRL
(20)
A
A
A
DATA
(64)
A
A
A
P
Program Tuner:
S
TUNER
ADDRESS
W
A
DATA
(BYTE 2)
DATA
(BYTE 3)
DATA
(BYTE 4)
A
DATA
A
P
(BYTE 5)
Close secondary 2-wire port:
S
MT312
ADDRESS
W
A
GPP CTRL
(20)
DATA
(0)
P
Always close the secondary 2-wire port after programming the Tuner, to avoid 2-wire bus clock interference in
the Tuner.
76