22
RabbitCore RCM4000
3.2.3 A/D Converter Inputs (RCM4000 only)
The following sample programs are found in the
SAMPLES\RCM4000\ADC
folder.
•
AD_CAL_CHAN.C
—Demonstrates how to recalibrate one single-ended analog input
channel with one gain using two known voltages to generate the calibration constants
for that channel. The constants will be rewritten into the user block data area.
Connect a positive voltage to an analog input channel on the Prototyping Board, and
connect the ground to GND.
Use a voltmeter to measure the voltage, and follow the instruc-
tions in the Dynamic C
STDIO
window. Remember that analog input LN7 on the Prototyping
Board is used with the thermistor and should not be used with this sample program.
NOTE:
The above sample program will overwrite any existing calibration constants.
•
AD_RDVOLT_ALL.C
—Demonstrates how to read all single-ended A/D input channels
using previously defined calibration constants. Coefficients are read from the simulated
EEPROM in the flash memory to compute equivalent voltages, and cannot be run in
RAM.
Compile and run this sample program once you have connected a positive voltage from
0–20 V DC to an analog input (except LN7) on the Prototyping Board, and ground to
GND. Follow the prompts in the Dynamic C
STDIO
window. Computed raw data and
equivalent voltages will be displayed.
•
AD_SAMPLE.C
—Demonstrates how to how to use a low level driver on single-ended
inputs. The program will continuously display the voltage (averaged over 10 samples)
that is present on the A/D converter channels (except LN7). Coefficients are read from
the simulated EEPROM in the flash memory to compute equivalent voltages, so the
sample program cannot be run in RAM.
Compile and run this sample program once you have connected a positive voltage from
0–20 V DC to an analog input (except LN7) on the Prototyping Board, and ground to
GND. Follow the prompts in the Dynamic C
STDIO
window. Computed raw data and
equivalent voltages will be displayed. If you attach a voltmeter between the analog
input and ground, you will be able to observe that the voltage in the Dynamic C
STDIO
window tracks the voltage applied to the analog input as you vary it.
•
THERMISTOR.C
—Demonstrates how to use analog input LN7 to calculate temperature
for display to the
STDIO
window. This sample program assumes that the thermistor is
the one included in the Development Kit whose values for beta, series resistance, and
resistance at standard temperature are given in the part specification.
Install the thermistor at location JP25 on the Prototyping Board before running this
sample program.
3.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. Set the real-time clock using the
SETRTCKB.C
sample program from
the Dynamic C
SAMPLES\RTCLOCK
folder, using the onscreen prompts. The
RTC_TEST.C
sample program in the Dynamic C
SAMPLES\RTCLOCK
folder provides
additional examples of how to read and set the real-time clock.
Summary of Contents for RabbitCore RCM4000
Page 6: ...RabbitCore RCM4100...
Page 12: ...6 RabbitCore RCM4000...
Page 20: ...14 RabbitCore RCM4000...
Page 46: ...40 RabbitCore RCM4000...
Page 68: ...62 RabbitCore RCM4000...
Page 82: ...76 RabbitCore RCM4000...
Page 96: ...90 RabbitCore RCM4000...
Page 114: ...108 RabbitCore RCM4000...
Page 118: ...112 RabbitCore RCM4000...
Page 122: ...116 RabbitCore RCM4000...
Page 124: ......