36
Wildcat (BL2000)
•
PWM.C
—Demonstrates the use of Timer B to generate a PWM signal on digital output
OUT8. The program generates a 42 Hz PWM signal with the duty cycle adjustable
from 1 to 99%.
•
RELAY.C
—Demonstrates how to control the relay on the BL2000.
4.2.3 Serial Communication
The following sample programs are found in the
RS232
subdirectory in
SAMPLES/BL2000
.
•
PUTS.C
—Transmits and then receives an ASCII string on Serial Ports B and C. It also
displays the serial data received from both ports in the
STDIO
window.
•
RELAYCHR.C
—This program echoes characters over Serial Port B to Serial Port C. It
must be run with a serial utility such as Hyperterminal.
The following sample programs are found in the
RS485
subdirectory in
SAMPLES/BL2000
.
•
MASTER.C
—This program demonstrates a simple RS-485 transmission of lower case
letters to a slave BL2000. The slave will send back converted upper case letters back to
the master BL2000 and display them in the
STDIO
window. Use
SLAVE.C
to program
the slave BL2000.
•
SLAVE.C
—This program demonstrates a simple RS-485 transmission of lower case
letters to a slave BL2000. The slave will send back converted upper case letters back to
the master BL2000 and display them in the
STDIO
window. Use
MASTER.C
to program
the master BL2000.
4.2.4 A/D Converter Inputs
The following sample programs are found in the
ADC
subdirectory in
SAMPLES/BL2000
.
•
AD_CALIB.C
—Demonstrates how to recalibrate an A/D converter channel using two
known voltages 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.
Note that 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
function.
The program uses the
STDIO
window to display the voltage that is being monitored.
•
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.
Summary of Contents for Wildcat BL2000
Page 16: ...12 Wildcat BL2000 ...
Page 36: ...32 Wildcat BL2000 ...
Page 54: ...50 Wildcat BL2000 ...
Page 82: ...78 Wildcat BL2000 ...
Page 86: ...82 Wildcat BL2000 ...
Page 90: ...86 Wildcat BL2000 ...
Page 92: ...88 Wildcat BL2000 ...
Page 96: ......