User’s Manual 39
The following sample programs are found in the RS485 subdirectory in SAMPLES\BL2100.
• MASTER.C—This program demonstrates a simple RS-485 transmission of lower case
letters to a slave BL2100. The slave will send back converted upper case letters back to
the master BL2100 and display them in the STDIO window. Use SLAVE.C to program
the slave BL2100.
• SLAVE.C—This program demonstrates a simple RS-485 transmission of lower case
letters to a slave BL2100. The slave will send back converted upper case letters back to
the master BL2100 and display them in the STDIO window. Use MASTER.C to program
the master BL2100.
4.2.3 A/D Converter Inputs
The following sample programs are found in the ADC subdirectory in SAMPLES\BL2100.
• AD_CALIB.C—Demonstrates how to recalibrate an A/D converter channel using two
knownvoltages to generate two coefficients, gain and offset, which are rewritten into
the user block data area. The voltage that is being monitored is displayed continuously.
Make sure that you don't exceed the voltage range of the A/D converter input channel.
NOTE: This sample program will overwrite the calibration constants set at the factory.
• AD1.C—Demonstrates how to access the A/D internal test voltages in both the
TLC2543 and TLC1543 A/D converter chips. The program reads the A/D internal volt-
ages and then uses the STDIO window to display the RAW data.
• AD2.C—Demonstrates how to access the A/D channels using the anaInVolt func-
tion. The program uses the STDIO window to display the voltage that is being moni-
tored.
• AD3.C—Demonstrates how to access the A/D converter channels with the low-level
A/D driver. The program uses the STDIO window to display the voltage that is being
monitored on all the A/D channels using the low-level A/D driver.
•
AD4.C—Demonstrates how to use the A/D converter channels with the low-level A/D
driver. The program uses the
STDIO window to display the voltage (average of 10 sam-
ples) that is being monitored on all the A/D converter channels using the low-level A/D
driver.
4.2.4 D/A Converter Outputs
The following sample programs are found in the
DAC subdirectory in SAMPLES\BL2100.
• DACAL.C—This program demonstrates how to recalibrate an D/A converter channel
using two known voltages, and defines the two coefficients, gain and offset, that will be
rewritten into the D/A converter's EEPROM simulated in flash memory.
NOTE: This sample program will overwrite the calibration constants set at the factory.
• DAOUT1.C—This program outputs a voltage that can be read with a voltmeter. The out-
put voltage is computed using the calibration constants that are read from the EEPROM
simulated in flash memory.