Serial Communication - Z-World Wolf BL2600 User Manual

C-programmable single-board computer with ethernet
Table of Contents

Advertisement

HIGH_CURRENT_IO.C
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.
—Demonstrates the use of the four PWM channels on Parallel Port F (PF4–PF7)
PWM.C
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
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
—This sample program repeatedly sends byte values 0–127 from Serial Port F
PARITY.C
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
window.
STDIO
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
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
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
36
—Demonstrates the use of the high-current outputs configured
STDIO
window and use either an oscilloscope or a voltmeter to view the
—This program demonstrates basic RS-232 serial communication.
—This program demonstrates 5-wire RS-232 serial communication.
window and should resume when RTS and CTS are connected again
subdirectory in
RS232
.
SAMPLES\BL2600
Wolf (BL2600)

Advertisement

Table of Contents
loading

Table of Contents