Rainbow Electronics DS1722 User Manual
Page 6
DS1722
6 of 13
The SDI and SDO pins are the serial data input and output pins for the DS1722, respectively. The CE
input is used to initiate and terminate a data transfer. The SCLK pin is used to synchronize data
movement between the master (microcontroller) and the slave (DS1722) devices.
The shift clock (SCLK), which is generated by the microcontroller, is active only when CE is high and
during address and data transfer to any device on the SPI bus. The inactive clock polarity is
programmable in some microcontrollers. The DS1722 offers an important feature in that the level of the
inactive clock is determined by sampling SCLK when CE becomes active. Therefore, either SCLK
polarity can be accommodated. Input data (SDI) is latched on the internal strobe edge and output data
(SDO) is shifted out on the shift edge (See Table 5 and Figure 3). There is one clock for each bit
transferred. Address and data bits are transferred in groups of eight, MSB first.
FUNCTION TABLE Table 5
MODE
CE
SCLK
SDI
SDO
Disable Reset
L
Input Disabled
Input Disabled
High Z
Write
H
CPOL=1*
CPOL=0
Data Bit Latch
High Z
Read
H
CPOL=1
CPOL=0
X
Next data bit
shift**
*CPOL is the “Clock Polarity” bit that is set in the control register of the microcontroller.
** SDO remains at High Z until eight bits of data are ready to be shifted out during a read.
NOTE:
CPHA bit polarity must be set to “1”.
SERIAL CLOCK AS A FUNCTION OF MICROCONTROLLER CLOCK
POLARITY (CPOL) Figure 3
CPOL=1
CPOL=0
NOTE:
CPOL is a bit that is set in the microcontroller’s Control Register.
CE
SCLK
CE
SCLK
INTERNAL
STROBE
SHIFT
INTERNAL
STROBE
SHIFT