An89 – Cirrus Logic AN89 User Manual
Page 3

AN89
AN89Rev2
3
information from the CS5525/6/9 to the 68HC05
via the SPI
TM
. Similar to send_spi, receive_spi re-
ceives a byte one bit at a time MSB first. When the
transfer is complete, highbyte, midbyte, and low-
byte byte contain the CS5525/6/9’s 24-bit gain reg-
ister.
Acquire Conversion
To acquire a conversion the subroutine convert is
called. Convert sends the command-byte 0x0C to
the converter instructing it to perform a single con-
version. Then the Done Flag bit in the configura-
tion register is polled. When DF is set, it indicates
that a conversion was performed. The 68HC05 then
reads the conversion data register to acquire the
conversion. Figure 6 depicts how 16-bit and 20-bit
conversion words are stored in the 68HC05.
An alternate method can be used to acquire a con-
version. By setting the Port Flag bit (PF, the fifth
bit in the configuration register), SDO’s function is
modified to fall to logic 0 when a conversion is
complete (refer to Figure 5). By tying SDO to the
controller’s interrupt pin, conversions can be ac-
quired via an interrupt service routine.
Figure 3. Write-Cycle Timing
Figure 4. Read-Cycle Timing