Datasheet

AD7730/AD7730L
–37–
CONFIGURING THE AD7730
The AD7730 contains twelve on-chip registers that can be accessed via the serial interface. Figure 5 and Figure 6 have outlined a
flowchart for the reading and writing of these registers. Table XIX and Table XX outline sample pseudo-code for some commonly
used routines. The required operating conditions will dictate the values loaded to the Mode, Filter and DAC Registers. The values
given here are for example purposes only.
Table XIX. Pseudo-Code for Initiating a Self-Calibration after Power-On/Reset
Write 03 Hex to Serial Port
1
/* Writes to Communications Register Setting Next Operation as Write to
Filter Register*/
Write 800010 Hex to Serial Port
1
/* Writes to Filter Register Setting a 50 Hz Output Rate in CHOP Mode*/
Write 04 Hex to Serial Port
1
/* Writes to Communications Register Setting Next Operation as Write to
DAC Register*/
Write 23 Hex to Serial Port
1
/* Writes to DAC Register Setting a Subtraction Value of 7.5 mV (5 V Refer-
ence) on the TARE DAC*/
Write 02 Hex to Serial Port /* Writes to Communications Register Setting Next Operation as Write to
Mode Register*/
Write B180 Hex to Serial Port /* Writes to Mode Register Initiating Internal Full-Scale Calibration for 0 mV
to +10 mV Input Range*/
Wait for RDY Low /* Wait for RDY pin to go low to indicate end of calibration cycle*/
Write 02 Hex to Serial Port /* Writes to Communications Register Setting Next Operation as Write to
Mode Register*/
Write 9180 Hex to Serial Port /* Writes to Mode Register Initiating Internal Zero-Scale Calibration for
0 mV to +10 mV Input Range*/
Wait for RDY Low /* Wait for RDY pin to go low to indicate end of calibration cycle*/
/* The part has now completed self-calibration and is in idle mode*/
1
This operation is not necessary if the default values of the Filter Register or the DAC Register are the values used in the application.
Table XX. Pseudo-Code for Setting Up AD7730 for Continuous Conversion and Continuous Read Operation
Write 02 Hex to Serial Port /* Writes to Communications Register Setting Next Operation as Write to
Mode Register*/
Write 2180 Hex to Serial Port /* Writes to Mode Register Starting Continuous Conversions for 0 mV to
+10 mV Input Range*/
Write 21 Hex to Serial Port /* Writes to Communications Register Setting Next Operation as Continuous
Read From Data Register*/
Set DIN Line of AD7730 Low /* Ensures Part is not Reset While in Continuous Read Mode*/
READ_DATA: Wait for RDY Low /* Wait for RDY pin to go low to Indicate Output Update*/
Read 24-Bit Data From Serial Port /* Read Conversion Result from AD7730's Data Register*/
Loop to READ_DATA Until All Data Gathered
Write 30 Hex to Serial Port /* Ends Continuous Read Operation and Places Part in Mode Where It
Expects Write to Communications Register*/
REV. B