? SWITCHCHAR.C —This program transmits and then receives an ASCII string on Serial
Ports E and F. It also displays the serial data received from both ports in the 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?
Once you have compiled and run this program, press
and release S2 on the Prototyping Board to send a message from Serial Port E to Serial
Port F; press and release S3 on the Prototyping Board to send a message from Serial
Port F to Serial Port E. The data sent between the serial ports will be displayed in the
STDIO window.
Two sample programs, SIMPLE485MASTER.C and SIMPLE485SLAVE.C , are available
to illustrate RS-485 master/slave communication. To run these sample programs, you will
need a second Rabbit-based system with RS-485—the second system may be another
RCM3360/RCM3370, or it may be any Z-World single-board computer or RabbitCore
module that supports RS-485 serial communication as long as you use the master or slave
sample program associated with that board.
Before running either of these sample programs on the RCM3360/RCM3370 assembly,
make sure pins 1–2 and pins 5–6 are jumpered together on header JP5 to use the RS-485
bias and termination resistors. The sample programs use Serial Port C as the RS-485 serial
port, and they use PD7 to enable/disable the RS-485 transmitter.
The RS-485 connections between the slave and master devices are as follows.
?
?
?
RS485+ to RS485+
RS485– to RS485–
GND to GND
? SIMPLE485MASTER.C —This program demonstrates a simple RS-485 transmission of
lower case letters to a slave. The slave will send back converted upper case letters back
to the master and display them in the STDIO window. Use SIMPLE485SLAVE.C to
program the slave—reset the slave before you run SIMPLE485MASTER.C on the
master.
? SIMPLE485SLAVE.C —This program demonstrates a simple RS-485 transmission of
lower case letters to a master. The slave will send back converted upper case letters
back to the master and display them in the STDIO window. Compile and run this pro-
gram on the slave before you use SIMPLE485MASTER.C to program the master.
18
RabbitCore RCM3360/RCM3370
相关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