Sample Programs; General Bl2000 Sample Programs; Digital I/O - Z-World Wildcat BL2000 User Manual

C-programmable, with ethernet
Table of Contents

Advertisement

4.2 Sample Programs

Sample programs are provided in the Dynamic C
demonstrates the output to the
PONG.C
folder contain specific sample programs that illustrate the use of the correspond-
SAMPLES
ing Dynamic C libraries.
The
SAMPLES\BL2000
sample program has comments that describe the purpose and function of the program. Fol-
low the instructions at the beginning of the sample program.
To run a sample program, open it with the
the
Compile
menu, and then run it by selecting
be in Program mode (see Section 3.8, "Programming Cable,") and must be connected to a
PC using the programming cable as described in Section 2.1, "BL2000 Connections."
More complete information on Dynamic C is provided in the Dynamic C User's Manual.

4.2.1 General BL2000 Sample Programs

—This program is used to identify the model of BL2000 being used, and
BOARD_ID.C
displays that information in the
—This program will count from 0 to 31 in binary, using the four gen-
COUNTLEDS.C
eral-purpose LEDs, DS4–DS7, and the Processor Bad LED, DS8. The LEDs are used
in reverse logical order to minimize the cycling of the relay, which is slaved to the same
output as DS4
.
—This program creates four "devices" (lights), and four buttons to toggle
LEDS_4.C
them. Users can view the devices with their Web browser, and change the status of the
lights. If the Demonstration Board is connected to the BL2000, the lights on the Dem-
onstration Board will match the ones on the Web page. See Appendix D for hookup
instructions for the Demonstration Board.

4.2.2 Digital I/O

The following sample programs are found in the
—Demonstrates using the A/D converter channels as digital inputs. You
ANADIGIN.C
will be able to see an input channel toggle HIGH and LOW when pressing the pushbut-
tons on the Demonstration Board. See Appendix D for hookup instructions for the
Demonstration Board.
—Demonstrates the use of the digital inputs. Using the Demonstration Board,
DIGIN.C
you can see an input channel toggle from HIGH to LOW when pressing a pushbutton
on the Demonstration Board. See Appendix D for hookup instructions for the Demon-
stration Board.
—Demonstrates the use of the high-current outputs. Using the Demonstra-
DIGOUT.C
tion Board, you can see an LED toggle on/off via a high-current output. See Appendix
D for hookup instructions for the Demonstration Board.
—Demonstrates how to toggle the output LEDs on the BL2000 on/off.
LED.C
User's Manual
STDIO
folder provides sample programs specific to the BL2000. Each
File
window.
STDIO
folder. The sample program
SAMPLES
window. The various directories in the
menu (if it is not still open), compile it using
Run
in the
Run
menu. The BL2000 must
subdirectory in
IO
.
SAMPLES/BL2000
35

Advertisement

Table of Contents
loading

Table of Contents