User’s Manual
33
4.3 Sample Programs
Sample programs are provided in the Dynamic C Samples folder. The sample program
PONG.C
demonstrates the output to the STDIO window.
The various directories in the Samples folder contain specific sample programs that illus-
trate the use of the corresponding Dynamic C libraries.
The OP6800 folder provides sample programs specific to the OP6800. Each sample pro-
gram has comments that describe the purpose and function of the program. Follow the
instructions at the beginning of the sample program.
To run a sample program, open it with the File menu (if it is not still open), then compile
and run it by pressing F9. The OP6800 must be in Program mode (see Section 3.4) and must be connected to a PC using the programming cable as described in
Section 2.1.More complete information on Dynamic C is provided in the Dynamic C User’s Manual.
TCP/IP specific functions are described in the Dynamic C TCP/IP User’s Manual. Infor-
mation on using the TCP/IP features and sample programs is provided in
Section 5,4.3.1 Board ID
The following sample program can be found in the SAMPLES\OP6800 subdirectory.
BOARD_ID.C
—Detects the type of single-board computer and displays the information
in the STDIO window. For the OP6800, the STDIO window should show OP6800.
4.3.2 Demonstration Board
The following sample programs are found in the DEMO_BD subdirectory in SAMPLES\OP6800.
BUZZER.C
—Demonstrates the use of the buzzer on the Demonstration Board. Remem-
ber to set the jumper across pins 1–2 of header JP1 on the Demonstration Board (see
Figure C-4) to enable the buzzer on. When you finish with BUZZER.C, it is recom- mended that you reconnect the jumper across pins 2–3 of header JP1 on the Demonstra-
tion Board to disable the buzzer.
KEYPAD.C
—Flashes the LED above a keypad button when the corresponding keypad
button is pressed. The corresponding LED on the Demonstration Board will also flash
if a keypad button in the top row of the keypad is pressed. A message is also displayed
on the LCD.
SWITCHES.C
—Flashes the LED on the Demonstration Board and the OP6800 when
the corresponding pushbutton switch on the Demonstration Board is pressed. A mes-
sage is also displayed on the LCD.