3.2.3 Serial Communication
The following sample programs can be found in the SAMPLES\RCM3360\SERIAL folder.
? FLOWCONTROL.C —This program demonstrates hardware flow control by configuring
Serial Port F for CTS/RTS with serial data coming from TxE (Serial Port E) at 115,200
bps. One character at a time is received and is displayed in the STDIO window.
To set up the Prototyping Board, you will need to tie
TxE and RxE together on the RS-232 header at J14,
and you will also tie TxF and RxF together as shown in
the diagram.
J14
TxE RxE GND TxF RxF 485+ GND 485?
A repeating triangular pattern should print out in the
STDIO window. The program periodically switches RTS (TxF) flow control on or off to
demonstrate the effect of hardware flow control.
? PARITY.C —This program demonstrates the use of parity modes by repeatedly sending
byte values 0–127 from Serial Port E to Serial Port F. The program will switch between
generating parity or not on Serial Port E. Serial Port F will always be checking parity,
so parity errors should occur during every other sequence.
To set up the Prototyping Board, you will need to tie
TxE and RxF together on the RS-232 header at J14 as
shown in the diagram.
The Dynamic C STDIO window will display the error
J14
TxE RxE GND TxF RxF 485+ GND 485?
sequence.
? SIMPLE3WIRE.C —This program demonstrates basic RS-232 serial communication.
Lower case characters are sent by TxE, and are received by RxF. The characters are
converted to upper case and are sent out by TxF, are received by RxE, and are displayed
in the Dynamic C STDIO window.
To set up the Prototyping Board, you will need to tie
TxE and RxF together on the RS-232 header at J14, and
you will also tie RxE and TxF together as shown in the
diagram.
J14
TxE RxE GND TxF RxF 485+ GND 485?
? SIMPLE5WIRE.C —This program demonstrates 5-wire RS-232 serial communication
by providing flow control (RTS/CTS) on Serial Port F and data flow on Serial Port E.
To set up the Prototyping Board, you will need to tie
TxE and RxE together on the RS-232 header at J14,
and you will also tie TxF and RxF together as shown in
the diagram.
J14
TxE RxE GND TxF RxF 485+ GND 485?
Once you have compiled and run this program, you can
test flow control by disconnecting TxF from RxF while the program is running. Char-
acters will no longer appear in the STDIO window, and will display again once TxF is
connected back to RxF. (Do not disconnect the data path between TxE and RxE.)
User ’s Manual
17
相关PDF资料
101-1050-BE-00025 ADPT USB 2 A FEMALE-2 5PIN .25M
10112627-101LF MINI-SAS HD 1X2 EXT PCB
10112628-101LF MINI-SAS HD 1X4 EXT PCB
10136-3000PC CONN MINI-D 36POS SOLDER PLUG
10136-6000EC CONN MDR PLUG 36POS IDC GOLD
10150-4CZ3PL CONN MDR PLUG 50POS VERT T/H
10150-72E2PC CONN MINI-D 50POS R/A PLUG
10150-8000EE CONN PLUG 50 POS MINI-D
相关代理商/技术参数
101-0955 功能描述:模块化系统 - SOM RCM2260 RABBITCORE MODULE RoHS:否 制造商:Digi International 外观尺寸:ConnectCore 9P 处理器类型:ARM926EJ-S 频率:150 MHz 存储容量:8 MB, 16 MB 存储类型:NOR Flash, SDRAM 接口类型:I2C, SPI, UART 工作电源电压:3.3 V 最大工作温度:+ 85 C 尺寸:1.97 in x 1.97 in x 6.1 in
101-0956 功能描述:开发板和工具包 - 其他处理器 Powercore Flex Kit US Version RoHS:否 制造商:Freescale Semiconductor 产品:Development Systems 工具用于评估:P3041 核心:e500mc 接口类型:I2C, SPI, USB 工作电源电压:
101-0957 功能描述:开发板和工具包 - 其他处理器 Powercore Flex Kit International Vers. RoHS:否 制造商:Freescale Semiconductor 产品:Development Systems 工具用于评估:P3041 核心:e500mc 接口类型:I2C, SPI, USB 工作电源电压:
101-0961 功能描述:模块化系统 - SOM RCM3720 CORE MOD. RoHS:否 制造商:Digi International 外观尺寸:ConnectCore 9P 处理器类型:ARM926EJ-S 频率:150 MHz 存储容量:8 MB, 16 MB 存储类型:NOR Flash, SDRAM 接口类型:I2C, SPI, UART 工作电源电压:3.3 V 最大工作温度:+ 85 C 尺寸:1.97 in x 1.97 in x 6.1 in
10-109611-3S 制造商:Amphenol Corporation 功能描述:10-109611-03S - Bulk
10-109611-4S 制造商:Amphenol Corporation 功能描述:10-109611-04S - Bulk
10-109614-02S 制造商:Amphenol Corporation 功能描述:ER 4C 4#16S SKT PLUG
10-109614-05P 制造商:Amphenol Industrial Operations 功能描述:ER 5C 5#16S PIN PLUG