Sample Programs; Power Modes; Digital I/O - Z-World Fox LP3500 User Manual

C-programmable single-board computer
Table of Contents

Advertisement

4.3 Sample Programs

Sample programs are provided in the Dynamic C
demonstrates the output to the
PONG.C
The various directories in the
trate the use of the corresponding Dynamic C libraries.
The
folder provides sample programs specific to the LP3500. Each sample pro-
LP3500
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
using the
Compile
menu, and then run it by selecting
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
—This program demonstrates switching from the normal raw DC power
POWER.C
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.
—This program demonstrates a low-power mode with the normal power
LOWPWRDEMO.C
source connected to the LP3500.

4.3.2 Digital I/O

The following sample programs are found in the
—Demonstrates the use of the digital inputs. Using the Prototyping Board, you
DIGIN.C
can see an input channel toggle from HIGH to LOW when pressing a pushbutton on the
Prototyping Board.
—Demonstrates the use of the high-current outputs configured as either sink-
DIGOUT.C
ing or sourcing outputs. Using the Prototyping Board, you can see an LED toggle
on/off via a high-current output.
—Demonstrates the use of the digital inputs. Using the Prototyping
DIGBANKIN.C
Board, you can see a bank of input channels toggle from HIGH to LOW when pressing
a pushbutton on the Prototyping Board.
—Demonstrates the use of the high-current outputs configured as either
DIGBANKOUT.C
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.
38
Samples
window.
STDIO
folder contain specific sample programs that illus-
Samples
File
menu (if it is not still open), compile it
POWER
IO
folder. The sample program
Run
in the
Run
menu. The LP3500
subdirectory in
SAMPLES\LP3500
subdirectory in
SAMPLES\LP3500
.
.
Fox (LP3500)

Advertisement

Table of Contents
loading

Table of Contents