Datasheet
AD5626
Rev. A | Page 16 of 20
MICROPROCESSOR INTERFACING
AD5626 to MC68HC11 Interface
The circuit illustrated in Figure 35 shows a serial interface
between the AD5626 and the MC68HC11 8-bit microcontroller.
SCK of the MC68HC11 drives SCLK of the AD5626, whereas
the MOSI output drives the serial data line, SDIN, of the AD5626.
The
CLR
,
LDAC
, and
CS
signals of the DAC are derived from
the PC1, PD5, and PC0 port lines, respectively, as shown.
For correct operation of the serial interface, configure the
MC68HC11 such that its CPOL bit is set to 1 and its CPHA bit
is also set to 1. When the serial data is to be transmitted to the
DAC, PC0 is taken low, asserting the
CS
input of the DAC. When
the MC68HC11 is configured in this manner, serial data on
MOSI is valid on the rising edge of SCLK. The MC68HC11
transmits its serial data in 8-bit bytes (MSB first), with only
eight rising clock edges occurring in the transmit cycle. To load
data to the input serial register of the AD5626, PC0 is left low
after the first eight bits are transferred, and a second byte of
data is then transferred serially to the AD5626. During the
second byte load, the first 4 MSBs of the first byte are pushed
out of the input shift register of the DAC. At the end of the
second byte load, PC0 is taken high. To prevent accidental
advancing of the internal shift register, SCLK must already be
asserted before PC0 is taken high. To transfer the contents of
the input shift register to the DAC register, PD5 is taken low,
asserting the
LDAC
input. The
CLR
input of the DAC, controlled
by the MC68HC11 PC1 port, provides an asynchronous clear
function, setting the DAC output to zero.
06757-035
*
ADDITIONAL PINS OMITTED FOR CLARITY.
PC1
PC0
PD5
SCK
MOSI
MC68HC11*
AD5626
CLR
CS
LDAC
SCLK
SDIN
Figure 35. AD5626 to MC68HC11 Interface