BL4S100 User’s Manual
46
•
ADC_RD_CALDATA.C
—Demonstrates how to display the two calibration coefficients,
gain and offset, in the Dynamic C
STDIO
window for each channel and mode of
operation.
•
ADC_RD_DIFF.C
—Demonstrates how to read and display voltage and equivalent val-
ues for a differential A/D converter channel using calibration coefficients previously
stored in the user block. The user selects to display either the raw data or the voltage
equivalent.
Once you compile and run this sample program, connect the power supply across a
differential channel pair, then follow the instructions in the Dynamic C
STDIO
window.
•
ADC_RD_MA.C
—Demonstrates how to read and display voltage and equivalent values
for a milli-amp A/D converter channel using calibration coefficients previously stored
in the user block.
Before you compile and run this sample program, jumper pins 1–2 and 5–6 on headers
J10 and J11. Then connect a current meter in series with the power supply connected to
one of pins AIN0–AIN3 and AGND, then compile and run the sample program, and
follow the instructions in the Dynamic C
STDIO
window as you vary the output from
the power supply.
•
ADC_RD_SE_UNIPOLAR.C
—Demonstrates how to read and display the voltage of all
single-ended analog input channels using calibration coefficients previously stored in
the user block.
Before you compile and run this sample program, connect the power supply (which
should be OFF) between a pin (AIN0–AIN7) and AGND, then compile and run the
sample program, and follow the instructions in the Dynamic C
STDIO
window. The
voltage readings will be displayed for all the channels measured to that point.
4.2.4 Real-Time Clock
If you plan to use the real-time clock functionality in your application, you will need to set
the real-time clock. You may set the real-time clock using the
SETRTCKB.C
sample pro-
gram from the Dynamic C
SAMPLES\RTCLOCK
folder. The
RTC_TEST.C
sample pro-
gram in the Dynamic C
SAMPLES\RTCLOCK
folder provides additional examples of how
to read and set the real-time clock
4.2.5 TCP/IP Sample Programs
TCP/IP sample programs are described in Chapter 5.
4.2.6 ZigBee Sample Programs
ZigBee sample programs are described in Chapter 6.