38
Fox (LP3500)
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
LP3500
folder provides sample programs specific to the LP3500. 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), compile it
using the
Compile
menu, and then run it by selecting
Run
in the
Run
menu. The LP3500
must be in the
Program
mode (see Section 4.2, “Programming Cable”) and must be con-
nected to a PC using the programming cable as described in Section 2.1, “LP3500 Con-
nections.”
Appendix G, “Running a Sample Program,” takes you through the steps of running one of
the sample programs.
4.3.1 Power Modes
The following sample program is found in the
POWER
subdirectory in
SAMPLES\LP3500
.
•
POWER.C
—This program demonstrates switching from the normal raw DC power
source to an external battery using the Prototyping Board. Pressing a switch will
change from the power source and will be displayed by flashing LEDs.
•
LOWPWRDEMO.C
—This program demonstrates a low-power mode with the normal power
source connected to the LP3500.
4.3.2 Digital I/O
The following sample programs are found in the
IO
subdirectory in
SAMPLES\LP3500
.
•
DIGIN.C
—Demonstrates the use of the digital inputs. Using the Prototyping Board, you
can see an input channel toggle from HIGH to LOW when pressing a pushbutton on the
Prototyping Board.
•
DIGOUT.C
—Demonstrates the use of the high-current outputs configured as either sink-
ing or sourcing outputs. Using the Prototyping Board, you can see an LED toggle
on/off via a high-current output.
•
DIGBANKIN.C
—Demonstrates the use of the digital inputs. Using the Prototyping
Board, you can see a bank of input channels toggle from HIGH to LOW when pressing
a pushbutton on the Prototyping Board.
•
DIGBANKOUT.C
—Demonstrates the use of the high-current outputs configured as either
sinking or sourcing outputs. Using the Prototyping Board, you can see a bank of chan-
nels toggle the corresponding LEDs on/off via high-current outputs.
Summary of Contents for Fox LP3500
Page 1: ...Fox LP3500 C Programmable Single Board Computer User s Manual 019 0111 041029 E ...
Page 6: ...Fox LP3500 ...
Page 14: ...8 Fox LP3500 ...
Page 22: ...16 Fox LP3500 ...
Page 86: ...80 Fox LP3500 ...
Page 120: ...114 Fox LP3500 ...
Page 130: ...124 Fox LP3500 ...
Page 134: ...128 Fox LP3500 ...
Page 138: ...132 Fox LP3500 ...
Page 142: ...136 Fox LP3500 ...
Page 144: ......