Hardware Reference
In-Depth Information
Data transfer to and from the TC72 consists of one address byte followed by one or mul-
tiple data (2 to 4) bytes. The most significant bit (A7) of the address byte determines whether
a read (A7 5 0) or a write (A7 5 1) operation will occur. A multiple-byte read operation starts
from a high address toward lower addresses. The user needs send in only the temperature result
high byte address and read the temperature result high byte, low byte, and the control register.
The timing diagrams for the single-data-byte write, single-data-byte read, and three-data-byte
read are shown in Figure 10.15a, b, and c, respectively.
The procedure for reading the temperature result is as follows:
Step 1
Pull the CE pin to high to enable SPI transfer.
Step 2
Send the temperature result high-byte-read address (0x02) to the TC72. Wait until the SPI
transfer is complete.
Step 3
Read the temperature result high byte. Write a dummy byte into the SSPBUF register to
trigger eight pulses to be sent out from the SCK pin so that the temperature result high
byte can be shifted in.
CE
1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6
SCK
A7 = 1
A
7
A
6
A
5
A
4
A
3
A
2
A
1
A
0
D
7
D
6
D
5
D
4
D
3
D
2
D
1
D
0
SDI
High Z
SDO
Figure 10.15a Single-data-byte write operation
CE
1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6
SCK
A7 = 0
A
7
A
6
A
5
A
4
A
3
A
2
A
1
A
0
SDI
High Z
D
7
D
6
D
5
D
4
D
3
D
2
D
1
D
0
SDO
High Z
Figure 10.15b Single-data-byte read operation
Search WWH ::




Custom Search