36
Wolf (BL2600)
•
HIGH_CURRENT_IO.C
—Demonstrates the use of the high-current outputs configured
as either sinking or sourcing outputs. High-current output HOUT0 is configured for
sourcing to provide power to the Demonstration Board. Outputs HOUT1 and HOUT2
are configured to demonstrate tristate operation to toggle the LEDs on the Demonstra-
tion Board. Output HOUT3 is configured as a sinking output to toggle an LED on the
Demonstration Board. See Appendix D for hookup instructions for the Demonstration
Board.
•
PWM.C
—Demonstrates the use of the four PWM channels on Parallel Port F (PF4–PF7)
on pins DIN20–DIN23. The PWM signals are set for a frequency of 10 kHz with the
duty cycle adjustable from 1 to 99% by the user. Since the output voltage swing is 0 V
to 2.5 V DC, the PWM outputs should interface only with TTL-compatible compo-
nents. Follow these instructions when running this sample program.
1. Connect the jumper across pins 7–8 on header JP4 to select the GND option.
2. Once you have compiled and run this program, you may change duty cycle for a given PWM chan-
nel via the Dynamic C
STDIO
window and use either an oscilloscope or a voltmeter to view the
output. When monitoring with a voltmeter, you can compute the expected voltage Vout = PWM
percentage × 2.5 V.
4.2.3 Serial Communication
The following sample programs are found in the
RS232
subdirectory in
SAMPLES\BL2600
.
•
PARITY.C
—This sample program repeatedly sends byte values 0–127 from Serial Port F
to Serial Port C. The program switches between generating parity and not generating
parity on Serial Port F. Serial Port C will always be checking parity, so parity errors
should occur during every other sequence. The results are displayed in the Dynamic C
STDIO
window.
Connect TxF to RxC before compiling and running this sample program.
NOTE:
For the sequence that does yield parity errors, the errors won't occur for each
byte received. This is because certain byte patterns along with the stop bit will appear to
generate the correct parity for the UART.
•
SIMPLE3WIRE.C
—This program demonstrates basic RS-232 serial communication.
Connect TxC to RxF on header J17 and connect TxF to RxC on header J17 before com-
piling and running this sample program.
•
SIMPLE5WIRE.C
—This program demonstrates 5-wire RS-232 serial communication.
Connect TxC to RxC on header J17 and connect TxF to RxF on header J17 before com-
piling and running this sample program.
TxF and RxF become the flow control RTS and CTS. To test flow control, disconnect
RTS from CTS while running this program. Characters should stop printing in the
Dynamic C
STDIO
window and should resume when RTS and CTS are connected again
Содержание Wolf BL2600
Страница 1: ...Wolf BL2600 C Programmable Single Board Computer with Ethernet User s Manual 019 0142 040731 B ...
Страница 36: ...32 Wolf BL2600 ...
Страница 66: ...62 Wolf BL2600 ...
Страница 100: ...96 Wolf BL2600 ...
Страница 104: ...100 Wolf BL2600 ...
Страница 106: ......