28
TMC223 DATASHEET (V. 1.05 / March 7, 2011)
DATA
DATA
A
A
A
S
Slave addr
R/W
P
(n Bytes + acknowledge)
'0' (Write)
master to slave
slave to master
S: Start Condition
P: Stop Condition
A: Acknowledge (SDA low)
A: not Acknowledge (SDA high)
Figure 19: Two Wire Serial Interface - Writing Data to Slave
6.5 Read data from TMC223
When reading data from a slave two datagrams are needed. The first datagram consists of two bytes
of data. The first byte consists of the slave address and the write bit. The second byte consists of the
address of an internal register of the TMC223. The internal register address is stored in the circuits
RAM. The second datagram consists of the slave address and the read bit. Then the master can read
the data bits on the SDA line with every rising edge of the SCL line. After each byte of data the master
has to acknowledge correct data reception by pulling SDA low. The last byte must not be
acknowledged by the master so that the slave knows the end of transmission (see figure below).
Dump Internal Address to Slave
S
Slave addr
R/W
A
internal addr
A
P
'0' (Write)
Read Data from Slave
Slave addr
S
R/W
A
DATA
A
DATA
A
P
(n Bytes + acknowledge)
'1' (Read)
master to slave
slave to master
S: Start Condition
P: Stop Condition
A: Acknowledge (SDA low)
A: not Acknowledge (SDA high)
Figure 20: Two Wire Serial Interface - Read Data from Slave
Copyright © 2007-2011 TRINAMIC Motion Control GmbH & Co. KG