Rabbit RabbitCore RCM5400W User Manual

RabbitCore RCM5400W
C-Programmable Wi-Fi Core Modul e
OEM User’s Manual
019–0169 080630–A
RabbitCore RCM5400W OEM User’s Manual
©2008 Digi International Inc. • All rights reserved.
No part of the contents of this manual may be reproduced or transmitted in any form or by any means without the express written permission of Digi International.
Permission is granted to make one or more copies as long as the copyright page contained therein is included. These copies of the manuals may not be let or sold for any reason without the express written permission of Digi International.
Digi International reserves the right to make changes and
improvements to its products without providing n otice.
T r ade mark s
Rabbit, RabbitCore, and Dynamic C are registered trademarks of Digi International Inc.
Wi-Fi is a registered trademark of the Wi-Fi Alliance.
Rabbit 5000 is a trademark of Digi International Inc.
The latest revision of this manual is available on the Rabbit Web s ite, www.rabbit.com , for free, unregistered download.
Rabbit Semiconductor Inc.
www.rabbit.com
RabbitCore RCM5400W

TABLE OF CONTENTS

Chapter 1. Introduction 1
1.1 RCM5400W/RCM5450W Features .....................................................................................................2
1.2 Advantages of the RCM5400W............................................................................................................3
1.3 Development and Evaluation Tools......................................................................................................4
1.3.1 RCM5400W Development Kit.....................................................................................................4
1.3.2 Software........................................................................................................................................5
1.3.3 Online Documentation..................................................................................................................5
1.4 Certifications.........................................................................................................................................6
1.4.1 FCC Part 15 Class B.....................................................................................................................6
1.4.2 Industry Canada Labeling.............................................................................................................7
1.4.3 Europe...........................................................................................................................................8
Chapter 2. Getting Started 9
2.1 Install Dynamic C.................................................................................................................................9
2.2 Hardware Connections........................................................................................................................10
2.2.1 Step 1 — Prepare the Prototyping Board for Development........................................................10
2.2.2 Step 2 — Attach the Antenna to the RCM5400W Module ........................................................11
2.2.3 Step 3 — Attach Module to Prototyping Board..........................................................................12
2.2.4 Step 4 — Connect Programming Cable......................................................................................13
2.2.5 Step 5 — Connect Power............................................................................................................14
2.3 Run a Sample Program.......................................................................................................................15
2.3.1 Troubleshooting..........................................................................................................................16
2.4 Where Do I Go From Here? ...............................................................................................................17
2.4.1 Technical Support.......................................................................................................................17
Chapter 3. Running Sample Programs 19
3.1 Introduction.........................................................................................................................................19
3.2 Sample Programs................................................................................................................................20
3.2.1 Use of Serial Flash......................................................................................................................22
3.2.2 Serial Communication.................................................................................................................23
3.2.3 Real-Time Clock.........................................................................................................................25
Chapter 4. Hardware Reference 27
4.1 RCM5400W Digital Inputs and Outputs ............................................................................................28
4.1.1 Memory I/O Interface.................................................................................................................35
4.1.2 Other Inputs and Outputs............................................................................................................35
4.2 Serial Communication ........................................................................................................................36
4.2.1 Serial Ports..................................................................................................................................36
4.2.1.1 Using the Serial Ports......................................................................................................... 37
4.2.2 Programming Port.......................................................................................................................38
4.3 Wi-Fi...................................................................................................................................................39
4.4 Programming Cable............................................................................................................................42
4.4.1 Changing Between Program Mode and Run Mode....................................................................42
4.4.2 Standalone Operation of the RCM5400W..................................................................................43
4.5 Other Hardware...................................................................................................................................44
4.5.1 Clock Doubler.............................................................................................................................44
4.5.2 Spectrum Spreader......................................................................................................................44
OEM User’s Manual
4.6 Memory..............................................................................................................................................45
4.6.1 SRAM.........................................................................................................................................45
4.6.2 Flash Memory.............................................................................................................................45
4.6.3 Serial Flash.................................................................................................................................45
Chapter 5. Software Reference 47
5.1 More About Dynamic C .....................................................................................................................47
5.2 Dynamic C Function Calls................................................................................................................49
5.2.1 Digital I/O...................................................................................................................................49
5.2.2 Serial Communication Drivers...................................................................................................49
5.2.3 User Block..................................................................................................................................49
5.2.4 SRAM Use..................................................................................................................................50
5.2.5 Wi-Fi Drivers..............................................................................................................................50
5.2.6 Prototyping Board Function Calls..............................................................................................51
5.2.6.1 Board Initialization............................................................................................................ 51
5.2.6.2 Alerts.................................................................................................................................. 52
5.3 Upgrading Dynamic C .......................................................................................................................53
5.3.1 Add-On Modules........................................................................................................................53
Chapter 6. Using the Wi-Fi Features 55
6.1 Introduction to Wi-Fi .........................................................................................................................55
6.1.1 Infrastructure Mode....................................................................................................................55
6.1.2 Ad-Hoc Mode.............................................................................................................................56
6.1.3 Additional Information...............................................................................................................56
6.2 Running Wi-Fi Sample Programs......................................................................................................57
6.2.1 Wi-Fi Setup ................................................................................................................................58
6.2.2 What Else You Will Need..........................................................................................................59
6.2.3 Configuration Information..........................................................................................................60
6.2.3.1 Network/Wi-Fi Configuration........................................................................................... 60
6.2.3.2 PC/Laptop/PDA Configuration......................................................................................... 61
6.2.4 Wi-Fi Sample Programs.............................................................................................................63
6.2.4.1 Wi-Fi Operating Region Configuration............................................................................. 63
6.2.4.2 Wi-Fi Operation................................................................................................................. 65
6.2.5 RCM5400W Sample Programs..................................................................................................68
6.3 Dynamic C Wi-Fi Configurations......................................................................................................71
6.3.1 Configuring TCP/IP at Compile Time .......................................................................................71
6.3.2 Configuring TCP/IP at Run Time...............................................................................................75
6.3.3 Other Key Function Calls...........................................................................................................75
6.4 Where Do I Go From Here?...............................................................................................................76
Appendix A. RCM5400W Specifications 77
A.1 Electrical and Mechanical Characteristics ........................................................................................78
A.1.1 Antenna......................................................................................................................................82
A.1.2 Headers......................................................................................................................................83
A.2 Rabbit 5000 Microprocessor DC Characteristics..............................................................................84
A.3 I/O Buffer Sourcing and Sinking Limit.............................................................................................85
A.4 Bus Loading ......................................................................................................................................85
A.5 Jumper Configurations...................................................................................................................... 88
Appendix B. Prototyping Board 91
B.1 Introduction .......................................................................................................................................92
B.1.1 Prototyping Board Features.......................................................................................................93
B.2 Mechanical Dimensions and Layout.................................................................................................95
B.3 Power Supply.....................................................................................................................................96
RabbitCore RCM5400W
B.4 Using the Prototyping Board..............................................................................................................97
B.4.1 Adding Other Components.........................................................................................................99
B.4.2 Measuring Current Draw............................................................................................................99
B.4.3 Analog Features........................................................................................................................100
B.4.4 Serial Communication..............................................................................................................100
B.4.4.1 RS-232............................................................................................................................. 100
B.5 Prototyping Board Jumper Configurations ......................................................................................102
Appendix C. Power Supply 105
C.1 Power Supplies.................................................................................................................................105
C.1.1 Battery-Backup.........................................................................................................................105
C.1.2 Battery-Backup Circuit.............................................................................................................106
C.1.3 Reset Generator........................................................................................................................107
C.1.4 Onboard Power Supplies..........................................................................................................107
Index 109
Schematics 113
OEM User’s Manual
RabbitCore RCM5400W

1. INTRODUCTION

The RCM5400W RabbitCore modules use the Wi-Fi/802.11b/g
®
functionality of the R abbit create a low-cost, low-power, embedded wireless control and communications solution for your embedded control system. The
®
Rabbit
5000 microprocessor features include hardware DMA, clock speeds of up to 100 MHz, I/O lines shared with up to six serial ports and four levels of alternate pin functions that include variable-phase PWM, auxiliary I/O, quadrature decoder, and input capture. Coupled with more the existing opcode instruct ions that help to reduce code size and improve processing speed, this equates to a core module that is fast, efficient, and th e ideal solu­tion for a wide range of wireless embedded applications.
The Development Kit has the essentials that you need to design your own wireless microprocessor-based syst em, and incl udes a complete Dynamic C so ftware deve lopmen t sys tem. T his Dev el­opment Kit also contains a Prototyping Board that will allow you to evaluate the RCM5400W RabbitCore modules and to prototype circuits that interface to the RCM5400W modules. You will also be able to write and test software for these modules.
5000 microprocessor to allow you to
Throughout this manual, the term RCM5400W refers to both the RCM5400W and RCM5450W RabbitCore models unless one model is referred to specifically.
In addition to onboard Wi-Fi/802.11b/g functionality, the RCM5400W has a Rabbit 5000 microprocessor operating at 73.73 MHz, static RAM, flash memories, three clocks (main oscillator, Wi-Fi oscillator, and timekeeping), and the circuitry necessary for reset and management of battery backup of the Rabbit 5000’s internal real-time clock and the static RAM. One 50-pin header brings out the Rabbit 5000 I/O bus lines, parallel ports, and serial ports.
The RCM5400W modules receive their +3.3 V power from the customer-supplied moth­erboards on which they are mounted. The RCM5400W modules can interface with many CMOS-compatible digital devices through the motherboard.
OEM User’s Manual 1

1.1 RCM5400W/RCM5450W Features

Small size: 1.84" × 2.85" × 0.55" (47 mm × 72 mm × 14 mm)
Microprocessor: Rabbit 5000 running
at 73.73 MHz
Up to 35 general-purpose I/O lines configurable with up to four alternate functions
3.3 V I/O lines with low-pow er mo des down t o 2 kH z
Six CMOS-compatible serial ports — f
our ports are configurable as a clocked serial port
(SPI), and two ports are configurable as SDLC/HDLC serial ports.
Alternate I/O bus can be configured for 8 data lines and 6 address lines (shared with parallel I/O lines), I/O read/write
Airoha single-chip 802.11b/g transceiver
Real-time clock
Watchdog supervisor
Currently there are two RCM5400W production models. Table 1 summarizes their main features.
Table 1. RCM5400W Features
Feature RCM5400W RCM5450W
Microprocessor Flash Memory 512K 1MB
Rabbit
®
5000 at 73.73 MHz
Data SRAM 512K 512K Fast Program-Execution SRAM 512K 1MB Serial Flash Memory (data) 1MB 2MB
6 shared high-speed, CMOS-compatible ports:
6 are configurable as asynchronous serial ports;
Serial P orts
Wi-Fi 802.11b/g standard, ISM 2.4 GHz
4 are configurable as clocked serial ports (SPI); 2 are configurable as SDLC/HDLC serial ports; 1 asynchronous serial port is used during programming
NOTE: There is a special version of the RCM5400W RabbitCore module for Japan. It is
functionally identical to the standard RCM5400W module and uses the same compo­nents, but has been assembled to meet the Japan regulatory requirements. Be sure to order the correct version for the market where you plan to use the RCM5400W. The two versions can be distinguished by the labels on the RF shield as shown below.
RABBIT RCM5400W
DIGI ® INTERNATIONAL
901-0190
Standard Release Label Japan Version Label
RABBIT RCM5400W
DIGI ® INTERNATIONAL
901-0191
2 RabbitCore RCM5400W
The RCM5400W series is programmed over a standard PC USB port through a program­ming cable supplied with the Development Kit.
NOTE: The RabbitLink cannot be used to program RabbitCore modules based on the
Rabbit 5000 microprocessor.
Appendix A provides detailed specifications for the RCM5400W.

1.2 Advantages of the RCM5400W

Fast time to market using a fully engineered, “ready-to-run/ready-to-program” micro­processor core module.
Competitive pricing when c ompar ed with the alternative of purchasing and assembling individual components.
Easy C-language program development and debugging
Rabbit Field Utility to download compiled Dynamic C .bin files, and cloning board
options for rapid production loading of programs.
Generous memory size allows large programs with tens of thousands of lines of code, and substantial data storage.
Easily scalable for commercial deployment applications
OEM User’s Manual 3

1.3 Development and Evaluation Tools

1.3.1 RCM5400W Development Kit

The RCM5400W Development Kit contains the hardware essentials you will need to use the RCM5400W module. The items in the Development Kit and their use are as follows.
RCM5400W module with 2.4 GHz dipole antenna.
Prototyping Board.
Universal AC adapter, 12 V DC, 1 A (includes Canada/Japan/U.S., Australia/N.Z.,
U.K., and European style plugs). Development Kits sold in North America ma y contain an AC adapter with only a North American style plug.
USB programming cable with 10-pin header.
10-pin header to DB9 serial cable.
Dynamic C® CD-ROM, with complete product documentation on disk.
Getting Started instructions.
A bag of accessory parts for use on the Prototyping Board.
Rabbit 5000 Processor Easy Reference poster.
Registration card.
DIAG
PROG
Programming
Quick Start Guide
1. Install Dynamic C.
2. Attach antenna to RCM5400W RabbitCore module.
3. Install RCM440W module on Prototyping Board, connect programming cable to PC, connect AC adapter.
4. Explore sample programs in the Dynamic C Samples\TCPIP\WiFi folder.
RabbitCore RCM5400W
The RCM5400W RabbitCore module provides Wi-Fi/802.11b/g functionality, allowing you to create a low-cost, low-power, Wi-Fi based control and communications solution for your embedded system. These Getting Started instructions included with the Development Kit will help you get your RCM5400W up and running so that you can run the sample programs to explore its capabilities and develop your own applications.
Development Kit Contents
The RCM5400W Development Kit contains the following items
RCM5400W module with 2.4 GHz dipole antenna..
Prototyping Board.
Universal AC adapter, 12 V DC, 1 A (includes Canada/Japan/U.S., Australia/N.Z., U.K., and European
style plugs). Development Kits sold in North America may contain an AC adapter with only a North American style plug.
USB programming cable with 10-pin header.
10-pin header to DB9 serial cable.
®
Dynamic C
CD-ROM, with complete product documentation on disk.
Getting Started instructions.
Plastic and metal standoffs with 4-40 screws and washers.
A bag of accessory parts for use on the Prototyping
Board.
Rabbit 5000 Processor Easy Reference poster.
Registration card.
Visit our online Rabbit store at www.rabbit.com/store/ for the latest information on peripherals and accessories that are available for the RCM5400W RabbitCore modules.
Rabbit, RabbitCore, Dynamic C and Digi are registered trademarks of Digi International Inc.
Getting Started
Instructions
Cable
®
Installing Dynamic C
Insert the CD from the Development Kit in your PC’s CD-ROM drive. If the installation does not auto-start, run the setup.exe pro- gram in the root directory of the Dynamic C CD. Install any Dynamic C modules after you install Dynamic C
.
Accessory Parts for
Prototyping Board
Serial Cable
RX43
7
4 X R
J
RX97
RX55
RX49
3
1
3
4
X
X
U
U
2
1
4
3
X
9
X
8
U
U
X R
7
3 X U
3
UX3
6 X R
Prototyping Board
Universal
AC Adapter
with Plugs
Antenna
PWR
R 1
J1
U1
DS1
2
C1
R
GND
GND
1 D
C2
1 P
J
4
3
V
C
C
C5
JP16 JP6
7
C18
1
JP5
0
C
2
JP12
C
U3
JP4
JP3
JP14
JP8
C16
JP7 JP18 JP9
JP10
9 1
C
R25
C15
6 2 R
Q1
PC7
5
9
1
1
2
0
7
1
1
2
1
R29
2
2
1
P
P
P
P
P
P
P
J
J
J
J
J
J
J
PE1
3 1 P
J
PE3
8
6
4
3
5
7
R20
R19
1
1
1
1
1
1
R
R
R
R
R
R
PE5
R10
7
R9
R8R6R4R3R5R
PE7
PD1
PD2
LN1
LN2
9
1
4
2
0
3
1
1
1
1
1
4
3
C8C7C
C
2
2
C
C
C
C
PD4
PD3
P
P
LN4
LN3
J
PD6
PD5
LN6
LN5
RX59
RX57
PD7
CVT
LN7
1 6
X
N
VREF
AGND
R
G A
N
N
F
I
I
E
5
7
R
N
N
5
L
V
L 6 X
R
J3
T
D
N
N
N
I
I
I
V
N
6
4
2
C
G
N
N
N
A
L
L
L
3
.
J2
3
2
L1
+
D
C6
2 U
PB3
PB5
PB7
PC1
PC3
PC5
PE0
PE2
PE4
PE6 PD0 LN0
D
D
N
N
I
I
N
1
3
G
N
N
A
L
L
2 1
R 1 1
R N I
0 N
L
+5 V
2 P
GND
J
GND
/RST_OUT
/IORD
+3.3 V
RCM1
/IOWR
/RST_IN
VBAT
PA0
EXT
PA1
PA2
PA3
PA4
PA5
PA6
PA7
PB0
PB1
PB2
PB4
PB6
PC0
PC2
PC4
PC6
5
8 X R
RX75
CX27
RX73
CX25
RX79
RX77
CX23
DS3
DS2
R21
R22
JP25
R24
R23
7
8
GND
1
1
2
2
R
R
GND
GND
S3S2
1
S1
BT1
RESET
C
D
UX49
UX47
RX83
RX11
5
4 X U
UX10
7 1
RX67
X C
UX12
UX14
9 2 X
C
UX16
X
UX4
X
R T D
C
X
X
R
T
D N G
J4
9 2
X
RX81
U
7 8 X R
1
4 X C
9
3 X C
UX30
Figure 1. RCM5400W Development Kit
4 RabbitCore RCM5400W

1.3.2 Software

The RCM5400W is programmed using version 10.40 or later of Dynamic C. A compatible version is included on the Development Kit CD-ROM. This version of Dynamic C includes the popular µC/OS-II real-time operating system, point-to-point protocol (PPP), FAT file system, RabbitWeb, and other select libraries.
Rabbit also offers for purchase the Rabbit Embedded Security Pack featuring th e Secure Sockets Layer (SSL) and a specific Advanced Encryption Standard (AES) library. In addi­tion to the Web-based technical support included at no extra charge, a one-year telephone­based technical support subscription is also available for purchase. Visit our Web site at
www.rabbit.com for further information and complete documentation, or contact your
Rabbit sales representative or authorized distributor

1.3.3 Onlin e Documentation

The online documentation is installed along with Dynamic C, and an icon for the docu­mentation menu is placed on the workstation’s desktop. Double-click this icon to reach the menu. If the icon is missing, use your browser to find and load
default.htm in the docs
folder, found in the Dynamic C installation folder. The latest versions of all documents are always available for free, unregistered download
from our Web sites as well.
OEM User’s Manual 5

1.4 Certifications

The systems integrator and the end-user are ultimately responsible for the channel range and power limits complying with the regulator y requirements of the co untry where the end device will be used. Dynamic C function calls and sample programs illustrate how this is achieved by selecting the country or region, which sets the channel range and power limits automatically. See Section 6.2.4.1 for additional information and sample programs dem­onstrating how to configure an end device to meet the regulatory channel range and power limit requirements.
Only RCM5400W modules bearing the FCC certification are certified for use in Wi-Fi enabled end devices, and any applications must have been compiled using Dynamic C v.
10.40 or later. The certification is valid only for RCM5400W modules equipped with the dipole antenna that is included with the modules, or a detachable antenna with a 60 cm coaxial cable (Digi International part number 29000105). Changes or modifications to this equipment not expressly approved by Digi International may void the user's authority to operate this equipment.
In the event that these conditions cannot be met, then the FCC certification is no longer considered valid and the FCC ID can not be used on the final product. In these circum­stances, the systems integrator or end-user will be responsible for re-evaluating the end device (including the transmitter) and obtaining a separate FCC certification.
NOTE: Any regulatory certification is voided if the RF shield on the RCM5400W
module is removed.

1.4.1 FCC Part 15 Class B

The RCM5400W RabbitCore module has been tested and found to comply with the l imits for Class B digital devices pursuant to Part 15 Subpart B, of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential environment. This equipment generates, uses, and can radiate radio frequency energy, and if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interfer­ence to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try and correct the interference by one or more of the following measures:
Reorient or relocate the receiving antenna.
Increase the separation between the equipment and the receiver.
Connect the equipment into an outlet on a circuit different from that to which the
receiver is connected.
Consult the dealer or an experienced radio/TV technician for help.
6 RabbitCore RCM5400W
Labeling Requirements (FCC 15.19)
FCC ID: VCB-E59C4472
This device complies with Part 15 of FCC rules. Operation is subject to the following two conditions:
(1) this device may not cause harmful interference, and (2) this device must accept any interference received, including
interference that may cause undesired operation.
If the FCC identification number is not visible when the module is installed insi de another device, then the outside of the device into which the module is installed must also display a label referring to the enclosed module or the device must be capable of displaying the FCC identification number electronically. This exterior label can use wording such as the following: “Contains Transmitter Module FCC ID: VCB-E59C4472” or “Contains FCC ID: VCB-E59C4472.” Any similar wo rding t hat exp resses the same meaning may be used.
The following caption must be included with documentation for any device incorporating the RCM5400W RabbitCore module.
Caution — Exposure to Radio-Frequency Radiation.
To comply with FCC RF exposure compliance requirements, for mobile configurations, a separation distance of at least 20 cm must be maintained between the antenna of this device and all persons.
This device must not be co-located or operating in conjunction with any other antenna or transmitter.

1.4.2 Industry Canada Labeling

7143A-E59C4472
This Class B digital apparatus complies with Canadian standard ICES-003.
Cet appareil numérique de la classe B est conforme à la norme NMB-003 du Canada.
OEM User’s Manual 7

1.4.3 Europe

The marking shall include as a minimum:
the name of the manufacturer or his trademark;
the type designation;
equipment classification, (see below).
Receiver
Class
1
2
3
Highly reliable SRD communication media, e.g., serving human life inherent systems (may result in a physical risk to a person).
Medium reliable SRD communication media, e.g., causing inconvenience to persons that cannot be overcome by other means.
Standard reliable SRD communication media,e.g., inconvenience to persons that can simply be overcome by other means.
Risk Assessment of Receiver Performance
NOTE: Manufacturers are recommended to declare the classification of their devices in
accordance with Table 2 and EN 300 440-2 [5] clause 4.2, as relevant. In particular, where an SRD that may have inherent safe ty of human life i m pli ca ti ons , manufacturers and users should pay particular attention to the potential for interference from other systems operating in the same or adjacent bands.
Regulatory Mark ing
The equipment shall be marked, where applicable, in accordance with CEPT/ERC Recom­mendation 70-03 or Directive 1999/5/EC, whichever is applicable. Where this is not appli­cable, the equipment shall be marked in accordance with the National Regulatory requirements.
8 RabbitCore RCM5400W

2. GETTING S TARTED

This chapter describes the RC M540 0W hardw are i n m ore detai l, a nd explains how to set up and use the accompanying Prototyping Board.
NOTE: This chapter (and this manual) assume that you have the RCM5400W Develop-
ment Kit. If you purchased an RCM5400W or RCM5450W module by itself, you will have to adapt the information in this chapter and elsewhere to your test and develop­ment setup.

2.1 Install Dynamic C

To develop and debug programs for the RCM5400W series of modules (and for all other Rabbit Semiconductor hardware), you must install and use Dynamic C.
If you have not yet installed Dynamic C version 10.40 (or a later version), do so now by inserting the Dynamic C CD from the Development Kit in your PC’s CD-ROM drive. If autorun is enabled, the CD installation will begin automatically.
If autorun is disabled or the installation does not start, use the Windows Start | Run menu or Windows Disk Explorer to launch setup.exe from the root folder of the CD-ROM.
The installation program will guide you through the installation process. Most steps of the process are self-explanatory.
Dynamic C uses a COM (serial ) port to communica te with the tar get deve lopment sy stem. The installation allows you to choose the COM port that will be used. The default selec­tion is COM1. You may select any available port for Dynamic C’s use. If you are not cer­tain which port is available, select COM1. This selection can be changed later within Dynamic C.
NOTE: The installation utility does not check the selected COM port in any way. Speci-
fying a port in u se by a not her device (mouse, modem, et c.) may l ea d t o a message such as
"could not open serial port" when Dynamic C is started.
Once your installation is complete, you will have up to three new icons on your PC desk­top. One icon is for Dynamic C, another opens the documentation menu, and the third is for the Rabbit Field Utility , a tool used to download precompiled software to a target system.
If you have purchased any of the optional Dynamic C modules, install them after installing Dynamic C. The modules may be installed in any order. You must install the modules in the same directory where Dynamic C was installed.
OEM User’s Manual 9

2.2 Hardware Connections

There are three steps to connecting the Prototyping Board for use with Dynamic C and the sample programs:
1. Prepare the Prototyping Board for Development.
2. Attach the antenna to the RCM5400W module.
3. Attach the RCM5400W module to the Prototyping Board.
4. Connect the programming cable between the RCM5400W and the PC.
5. Connect the power supply to the Prototyping Board.
CAUTION: Provide ESD protection such as smocks and grounding straps on your
footwear.while assembling the RCM5400W module, installing it on another board, and while making or removing any connections.
Remember to use ESD protection re gardl ess of whet her you are worki ng with th e RCM5400W module on the Prototyping Board or in your own OEM application.

2.2.1 Step 1 — Prepare the Prototyping Board for Development

Snap in four of the plastic standoffs supplied in the bag of accessory parts from the Devel­opment Kit in the holes at the corners as shown in Figure 2.
NOTE: Be sure to use the hole th at is point ed ou t toward s the bot tom left of the Pr ototyp -
ing Board since the hol e below it is used f or a stan doff when mounting the RCM5400W on the Prototyping Board.
PWR
R 1
J1
U1
DS1
C1
GND
D1
C5
JP16
C18
17
JP5
C
20
JP12
C
U3
JP4
JP3
JP14
JP8
C16
JP7
JP18
JP9
JP10
19
C
R25
C15
26 R
Q1
R29
JP11JP15JP19JP21JP22
R20
R18R16R14R13R15R
R10
7
RX43
47 X R
RX97
RX49
X33U U
31 X
89 X R
UX3
R8R6R4R3R5R
9
11
10
C8C7C
C
C
C14C12C
JP24JP23
RX59
RX57
RX55
41 X U
42 X
U
37 X U
PD7 LN7
X61
VREF
R
65 X R
J3
X63 R
GND
C2
JP1 3
C
2
L1
D
C6
JP6
JP20
JP17
PE1
13 JP
PE3
R19
17
PE5
R9
PE7
PD1 LN1
13
PD3
LN3 PD5 LN5
V
D N
C
G A
2 U
PC1
PC3
PC5
PC7
LN2
PD4
LN4
PD6
LN6
CVT
AGND
F E
7INLN5INLN3INLN1IN
R
LN
T
V
6INLN4INLN2INLN0IN
LN
2
JP
/RST_OUT
RCM1
/IOWR
VBAT EXT
PA1
PA3
PA5
PA7
PB1
PB2
PB3
PB4
PB5
PB6
PB7
PC0
PC2
PC4
PC6
PE0
PE2
PE4
PE6
PD0
LN0
PD2
D
N
AG
D
N AG
11
R
Figure 2. Insert Standoffs
2 R
4 C
J2
3.3 V +
GND
/IORD
/RST_IN
PA0
PA2
PA4
PA6
PB0
RX75
CX25
DS2
JP25
12 R
UX47
+5 V
GND
+3.3 V
85
RX
CX27
RX73
R23
RX79
RX77
CX23
DS3
R21
R22
R24
1
GND
1
28
R27R
GND
S3S2
1
S1
BT1
RESET
D
UX49
UX4
RX81
87 X R
RX83
X39 C
RX11
X45
U
RX67
X17 C
UX14
29 X
C
UX16
GND
UX30
UX10
UX12
XC
TX
R C
XD
R
TX
D N G
J4
29
UX
X41 C
10 RabbitCore RCM5400W

2.2.2 Step 2 — Attach the Antenna to the RCM5400W Module

Attach the antenna to the antenna SMA connector on the RCM5400W as shown in Figure 3.
FCC ID: VCBE59C4472
P1
R31
P2
C144
U19
C136
C120
L22
C135
C119
T1
C118
C121
LINK
DS2
C115
R37
C134
C105
L19
C104
C139
DS1
ACT
C103
C107
4
R33
C137
U20
R79
C108
C138
R80
C110
3
2
TP22
TP24
TP23
TP21
R65
JP6
R32
C48
C79
C37
C36
C49
C50
C51
C52 C54 C55 C39 C40 C43 C44 C46 C47 C53 C57 C64
C16
U9
C58
1
C56
R22
R17
R23
R16
R11
R25
R24
R18
R13
C18
U10
3
2
C21
Y3
C19
R20
R21
Y2
IC: 7143AE59C4472
E1 (Base)
E2 (Cover)
U21
901-0190
C117
C114
L21 C116
C106
L20
U18
INTERNATIONAL
C112
®
C111
R19
DIGI
C102
R64
RABBIT RCM5400W
C113
L18
TP26
TP25
TP28
TP27
C80
C45
R61
R59
R58
R36
C41
C42
R60
C38 C33 C34
C32
R34
C35
C31
U1
C28
C3
C30
C29
C4
C14
Q1
C73
C2
R91
J2
R3
R5
R4
R2
JP1
JP3
R1
JP2 JP4
U17
R84
C100
JP5
R83
U2
C10
C9
U4
U12
C6
C5
C27
C26
Figure 3. Attach the Antenna to the RCM5400W Module
CAUTION: Do not remove the RF shield by the antenna since any attempt to
remove the shield will damage the RF circuits underneath it. Any regulatory certif ication is voi ded if the RF shield on t he RCM5400W module
is removed.
OEM User’s Manual 11
2.2.3 Step 3 — Attach Module to Prototyping Board
Turn the RCM5400W module so that the mounting holes line up with the corresponding holes on the Prototyping Board. Insert the metal standoffs as shown in Figure 4, secure them from the bottom using the 4-40 × 3/16 screws and washers, then insert the module’s header J1 on the bottom side into socket RCM1 on the Prototyping Board.
FCC ID: VCBE59C4472
IC: 7143AE59C4472
E1 (Base)
E2 (Cover)
U21
901-0190
901-0190
C117
C114
L21 C116
C106
L20
U18
INTERNATIONAL
INTERNATIONAL
C112
®
®
C111
RCM5400W
R19
DIGI
DIGI
C102
R64
RABBIT RCM5400W
C113
L18
TP26
TP25
TP28
TP27
C80
C30
C100
C45
R61
R59
R58
R36
C41
C42
R60
U2
C38 C33 C34
C32
R34
C35
C31
U1
C28
C3
C4
C14
Q1
C73
C2
R91
J2
R3
R5
R4
R2
JP1
JP3
R1
JP2 JP4
U17
C10
D1
U12
C6
C5
C26
RX47
RCM5400W
PWR
R1
R84
JP5
R83
C9
U4
C5
L1
C6
C27
C18
C17
U3
C16
C19 C20
R25
C15
Q1
R29
R20
RX43
RX97
R10
JP24
RX55
RX49
UX41
UX33UX31
RX89
UX37 UX42
UX3
JP16
JP6 JP5
JP12
JP4 JP3
JP14
JP8 JP7
JP18
JP9
JP10
R26
JP11
C14
JP23
RX57
DS1
GND
C2
U2
RCM1
JP15
JP19
JP21
R18
R16
R14
R13
R8R6R4R3R5
C8C7C9
C12
C10
RX59
RX63
J1
U1
C1
D2
JP22
R2
GND
JP1
C4
C3
J2
+3.3 V
JP2
/RST_OUT
RCM1
/IOWR
VBAT
EXT
PA1
PA3
PA5
PA7
PB1
PB3
PB5
PB7
PC1
PC3
PC5
PC7
JP20
JP17
PE1
JP13
PE3
R19
R15
R17
PE5
R9
R7
PE7
PD1 LN1
C11
C13
PD3 LN3
PD5 LN5
PD7 LN7
VREF
RX61
RX65
J3
UX47
+5 V
GND
GND
/IORD
+3.3 V
/RST_IN
PA0
PA2
PA4
PA6
PB0
PB2
PB4
PB6
PC0
PC2
PC4
PC6
PE0
PE2
PE4
PE6
PD0 LN0
PD2 LN2
PD4 LN4
PD6 LN6
CVT
AGND
AGND
VREF
LN7IN
LN5IN
LN3IN
LN1IN
CVT
AGND
LN6IN
LN4IN
LN2IN
1
S1
BT1
RESET
UX49
UX4
RXD TXD
TXC RXC
GND
RX81
RX83
RX11
RX67
RX75
CX25
DS2
JP25
AGND
R12
R11
LN0IN
RX85
CX27
RX73
RX77
RX79
CX23
DS3
R21
R22
R24
R23
1
R27
R28
GND
S3S2
J4
UX29
RX87
CX41
CX39
UX30
UX45
UX10
CX17
UX12
UX14
CX29
UX16
GND
1
GND
Insert standoffs between mounting holes and Prototyping Board.
Line up mounting holes with holes on Prototyping Board.
P1
R31
P2
C144
U19
C136
C120
L22
C135
C119
T1
C118
C121
LINK
DS2
C115
R37
C134
C105
L19
C104
C139
DS1
ACT
C103
C107
4
R33
C137
U20
R79
C108
C138
R80
C110
3
2
TP22
TP24
TP23
TP21
R65
JP6
R32
C48
C79
C37
C36
C49
C50
C51
C52 C54 C55 C39 C40 C43 C44 C46 C47 C53 C57 C64
C16
U9
C29
C58
1
C56
R22
R17
R23
R16
R11
R25
R24
R18
R13 C18
U10
3
2
C21
Y3
C19
R20
R21
Y2
Figure 4. Install the Module on the Prototyping Board
NOTE: It is important that you line up the pins on header J1 of the module exactly with
socket RCM1 on the Pr ototyp ing Boa rd. The header pins may bec ome bent or da maged if the pin alignment is offset, and the module will not work. Permanent electrical dam­age to the module may also result if a misaligned module is powered up.
Press the module’s pins gently into the Prototyping Board socket—press down in the area above the header pins. For additional integrity, you may secure the RCM5400W to the standoffs from the top using the remaining three screws and washers.
12 RabbitCore RCM5400W

2.2.4 Step 4 — Connect Programming Cable

The programming cable connects the module to the PC running Dynamic C to download programs and to monitor the module during debugging.
Connect the 10-pin connector of the programming cable labeled
PROG to header J2 on
the RCM5400W as shown in Figure 5. Be sure to orient the marked (usually red) edge of the cable towards pin 1 of the connector. (Do not use the DIAG connector, which is used for a normal serial connection.)
Insert tab into slot
1
Assemble
AC Adapter
Snap plug into place
2
AC Adapter
3-pin
power connector
To
PC USB port
PROG
Programming
Cable
Colored
edge
C52 C54 C55 C39
J2
C40 C43 C44 C46 C47 C53 C57 C64
1
2
J1
PWR
R1
J1
U1
DS1
C1
U3
901-0190
901-0190
C19 C20
C112
C102
TP28
TP27
C45
C41
C42
C38 C33 C34
C32
C35
UX33UX31
C3
C4
C14
UX3
Q1
DIAG
L1
E1 (Base)
E2 (Cover)
C18
C15
R19
Q1
TP26
TP25
R58
R36
RX55
R34
GND
C2
D2
C6
FCC ID: VCBE59C4472
IC: 7143AE59C4472
C73
C2
R91
J2
U2
JP16
JP6
JP1
JP5
C17
JP12
JP3
JP4 JP3
JP2 JP4
JP14
JP8
C16
JP7
JP18
JP9
JP10
R25
R26
R64
U17
R29
JP11
JP15
JP19
JP21
JP22
R20
R18
R16
R14
R13
R10
C100
R8R6R4R3R5
R61
R59
C8C7C9
R60
C14
C12
C10
U2
JP24
JP23
C10
RX59
RX57
U12
C6
C5
C26
UX37 UX42 UX41
RX63
D1
C5
P1
R31
P2
C144
U19
C136
C120
L22
U21
C135
C119
C117
T1
C114
C118
C121
LINK
C105
C104
C139
ACT
4
C137
U20
C138
3
2
TP22
TP23
TP21
C49
C50
C56
R22
R17
R23
R16
C21
R20
Y2
L21
C116
C115
C134
C106
L19
L20
U18
INTERNATIONAL
INTERNATIONAL
®
®
C103
C107
C111
RCM5400W
DIGI
DIGI
C108
RABBIT RCM5400W
C110
C113
L18
TP24
R65
C48
C79
C37
C36
C80
RX43
RX47
RX97
RX49
C31
U1
C28
C30
C29
C58
R11
R25
R24
RX89
R13
C18
U10
R21
DS2
R37
DS1
R33
R79
R80
JP6
R32
C51
C16
U9
R18
3
Y3
C19
RCM1
R5
JP20
R15
GND
PROG
R4
R17
R7
JP5
RX61
RX65
/RST_OUT
JP17
C11
R2
JP1
C4
C3
J2
+3.3 V
JP2
/IOWR
VBAT
EXT
PA1
R3
PA3
R2
PA5
PA7
R1
PB1
PB3
PB5
PB7
PC1
PC3
PC5
PC7
PE1
JP13
PE3
R19
R84
PE5
R9
PE7
PD1 LN1
R83
C13
PD3 LN3
PD5
C9
LN5
U4
PD7 LN7
VREF
C27
J3
UX47
+5 V
GND
GND
/IORD
+3.3 V
/RST_IN
PA0
PA2
PA4
PA6
PB0
PB2
PB4
PB6
PC0
PC2
PC4
PC6
PE0
PE2
PE4
PE6
PD0 LN0
PD2 LN2
PD4 LN4
PD6 LN6
CVT
AGND
AGND
VREF
LN7IN
LN5IN
LN3IN
LN1IN
CVT
AGND
LN6IN
LN4IN
LN2IN
RESET
1
S1
BT1
RESET
UX49
UX4
RXD TXD
TXC RXC
GND
RX81
RX83
RX11
RX67
RX75
CX25
DS2
JP25
AGND
R12
R11
LN0IN
RX85
CX27
RX73
RX77
RX79
CX23
DS3
R21
R22
R24
R23
1
R27
R28
GND
S3S2
J4
UX29
RX87
CX41
CX39
UX30
UX45
UX10
CX17
UX12
UX14
CX29
UX16
GND
1
GND
Figure 5. Connect Programming Cable and Power Supply
Connect the other end of the programming cable to an available USB port on your PC or workstation.
Your PC should recognize the new USB hardware, and the LEDs in the shrink-wrapped area of the USB programming cable will flash — if you get an error message, you will have to install USB dr i ve rs . Drivers for Windows XP are available in the Dynamic C
Drivers\Rabbit USB Programming Cable\WinXP_2K folder — double-click DPInst.exe to install the USB drivers. Drivers for other operating systems are available
online at www.ftdichip.com/Drivers/VCP.htm.
OEM User’s Manual 13

2.2.5 Step 5 — Connect Power

Once all the other connections have been made, you can connect power to the Prototyping Board.
If you have the universal AC adapter, p repare the AC adapter for the country where it will be used by selecti n g th e a pp ro p ri at e p lu g . Snap in the top of the plug assembly into the slot at the top of the AC adapter as shown in Figure 5, then press down on the plug until it clicks into place.
Connect the AC adapter to 3-pin header J1 on the Prototyping Board as shown in Figure 5 above. The connector may be attached either way as long as it is not offset to one side— the center pin of J1 is always connected to the positive terminal, and either edge pin is ground.
Plug in the AC adapter. The
PWR LED on the Prototyping Board next to the power con-
nector at J1 should light up. The RCM5400W and the Prototyping Board are now ready to be used.
NOTE: A RESET button is provided on the Pro totyping Bo ard next t o the batt ery holder
to allow a hardware reset without disconnecting power.
14 RabbitCore RCM5400W

2.3 Run a Sample Program

If you already have Dynamic C installed, you are now ready to test your programming connections by running a sample program. Start Dynamic C by double-clicking on the Dynamic C icon on your desktop or in your Start menu. Select Store Program in Flash on the “Compiler” tab in the Dynamic C Options > Project Options menu. Then click on the “Communications” tab and verify that Use USB to Serial Converter is selected to support the USB programming cable. Click OK.
You may have to select the COM port assigned to the USB programming cable on your PC. In Dynamic C, select Options > Project Options, then select this COM port on the “Communications” tab, then click OK. You may type the COM port number followed by
Enter on your computer keyboard if the COM port number is outside the range on the
dropdown menu. Now find the WIFISCAN.C sample program in the Dynamic C Samples\WiFi folder,
open it with the File menu, then compile and run the sample program by pressing F9.
The Dynamic C STDIO window will display Starting scan...., and will display a list
of access points/ad-hoc hosts as shown here.
The following fields are shown in the Dynamic C STDIO window.
Channel—the channel the access point is on (1–11).
Signal—the signal strength of the access point.
MAC—the hardware (MAC) address of access point.
Access Point SSID—the SSID the access point is using.
OEM User’s Manual 15

2.3.1 Troubleshooting

If you receive the message Could Not Open Serial Port, check that the COM port assigned to the USB programming cable was identified and set up in Dynamic C as described in the preceding section.
If you receive the message No Rabbit Processor Detected, the programming cable may be connected to the wrong COM port, a connection may be faulty, or the tar get system may not be powered up. First, check to see that the power LED on the Prototyping Board is lit. If the LED is lit, ch eck both ends of the programm ing cable to ensure tha t it is firmly plugged into the PC and the programming header on the RCM5400W with the marked (colored) edge of the programming cable towards pin 1 of the programming header. Ensure that the module is firmly and correctly installed in its connectors on the Prototyping Board.
If Dynamic C appears to compile the BIOS successfully, but you then receive a communi­cation error message when you compile and load a sample program, it is possible that your PC cannot handle the higher program-loading baud rate. Try changing the maximum download rate to a slower baud rate as follows.
Locate the
Options > Project Opti ons menu. Select a slower Max download baud rate. Click OK
Serial Options dialog on the “Communications” tab in the Dynamic C
to save.
If a program compiles and loads, but then loses target communication before you can begin debugging, it is possible that your PC cannot handle the default debugging baud rate. Try lowering the debugging baud rate as follows.
Locate the Serial Options dialog on the “Communications” tab in the Dynamic C
Options > Project Options menu. Choose a lower debug baud rate. Click OK to save.
Press <Ctrl-Y> to force Dyn a m i c C to re compile th e B I O S . You should receive a Bios
compiled successfully
message once this step is completed successfully.
16 RabbitCore RCM5400W

2.4 Where Do I Go From Here?

If the sample program ran fine, you are now ready to go on to the sample programs in Chapter 3 and to develop your own applications. The sample programs can be easily mod­ified for your own use. The user's manual also provides complete hardware reference information and software function calls for the RCM5400W series of modules and the Prototyping Board.
For advanced development topics, refer to the Dynamic C User’s Manual, also in the online documentation set.

2.4.1 Technical Support

NOTE: If you purchased your RCM5400W or RCM5450W through a distributor or
through a Rabbit partner, contact the distributor or partner first for technical support.
If there are any problems at this point:
Use the Dynamic C Help menu to get further assistance with Dynamic C.
Check the Rabbit Technical Bulletin Board and forums at www.rabbit.com/support/bb/
and at www.rabbit.com/forums/.
Use the Technical Support e-mail form at www.rabbit.com/support/.
OEM User’s Manual 17
18 RabbitCore RCM5400W

3. RUNNING SAMPLE PROGRAMS

To develop and debug programs for the RCM5400W (and for all other Rabbit hardware), you must install and use Dynamic C. This chapter provides a tour of its m ajor features with respect to the RCM5400W modules.

3.1 Introduction

To help familiarize you with the RCM5400W modules, Dynamic C includes several sam­ple programs. Loading, executing and studying these programs will give you a solid hands-on overview of the RCM5400W’s capabilities, as well as a quick start with Dynamic C as an application development tool.
This chapter provides sam ple programs t hat illust rate the digital I/O and s erial capabil ities of the RCM5400W RabbitCore module. Section 6.2.4 discusses the sample programs that illustrate the Wi-Fi features.
NOTE:
In order to run the sample programs discussed in this chapter and elsewhere in this manual,
1. Your module must be plugged in to the Prototyping Board as described in Chapter 2, “Getting Started.”
2. Dynamic C must be installed and running on your PC.
3. The programming cable must connect the programming header on the module to your PC.
4. Power must be applied to the module through the Prototyping Board.
Refer to Chapter 2, “Getting Started,” if you need further information on these steps. To run a sample program, open it with the File menu, then compile and run it by pressing
F9.
Each sample program has comments that describe the purpose and function of the pro­gram. Follow the instructions at the beginning of the sample program.
Complete information on Dynamic C is provided in the Dynamic C User’s Manual.
The sample programs language for a suggested reading list.
.
If you do not, see the introductory pages of the Dynamic C User’s Manual
assume that you have at least an elementary grasp of the C
OEM User’s Manual 19

3.2 Sample Programs

Of the many sample programs included with Dynamic C, several are specific to the RCM5400W modules. These programs will be found in the SAMPLES\RCM5400W folder.
CONTROLLED.C—Demonstrates use of the digital outputs by having you turn LEDs DS2 and DS3 on the Prototyping Board on or off from the STDIO window on your PC.
Parallel Port B bit 2 = LED DS2 Parallel Port B bit 3 = LED DS3
Once you compile and run CONTROLLED.C, the following display will appear in the Dynamic C STDIO window.
Press “2” or “3” on your keyboard to select LED DS2 or DS3 on the Prototyping Board. Then follow the prompt in the Dynamic C STDIO window to turn the LED ON or OFF. A logic low will light up the LED you selected.
FLASHLED1.C—demonstrates the use of assembly language to flash LEDs DS2 and DS3 on the Prototyping Board at different rates. Once you have compiled and run this program, LEDs DS2 and DS3 will flash on/off at different rates.
FLASHLED2.C—demonstrates the use of cofunctions and costatements to flash LEDs DS2 and DS3 on the Prototyping Board at different rates. Once you have compiled and run this program, LEDs DS2 and DS3 will flash on/off at different rates.
20 RabbitCore RCM5400W
TAMPERDETECTION.C—demonstrates how to detect an attempt to enter the bootstrap mode. When an attempt is detected, the battery-backed onchip-encryption RAM on the Rabbit 5000 is erased. This battery-backed onchip-encryption RAM can be useful to store data such as an AES encryption key from a remote location.
This sample program shows how to load and read the battery-backed onchip-encryption RAM and how to enable a visual indicator.
Once this sample is compiled and running (you pressed the
F9 key while the sample
program is open), remove the programming cable and press the reset button on the Prototyping Board to reset the module. LEDs DS2 and DS3 will be flashing on and off.
Now press switch S2 to load the battery-backed RAM with the encryption key. The LEDs are now on continuously. Notice that the LEDs will stay on even when you press the reset button on the Prototyping Board.
Reconnect the programming cable briefly and unplug it again to simulate an attempt to access the onchip-encryption RAM. The LEDs will be flashing because the battery­backed onchip-encryption RAM has been erased. Notice that the LEDs will continue flashing even when you press the reset button on the Prototyping Board.
You may press switch S2 again and repeat the last steps to watch the LEDs.
TOGGLESWITCH.C—demonstrates the use of costatements to detect switch presses using the press-and-release method of debouncing. LEDs DS2 and DS3 on the Proto­typing Board are turned on and off when you press switches S2 and S3. S2 and S3 are controlled by PB4 and PB5 respectively.
Once you have loaded and executed these five programs and have an understanding of how Dynamic C and the RCM5400W modules interact, you can move on and try the other sample programs, or begin building your own.
OEM User’s Manual 21

3.2.1 Use of Serial Flash

The following sample programs can be found in the SAMPLES\RCM5400W\Serial_Flash folder.
SERIAL_FLASHLOG.C—This program runs a simple Web server and stores a log of hits on the home page of the serial flash “server.” This log can be viewed and cleared from a browser at http://10.10.6.100/. You will likely have to first “configure” your net­work interface card for a “10Base-T Half-Duplex,” “100Base-T Half-Duplex,” or an “Auto-Negotiation” connection on the “Advanced” tab, which is accessed from the control panel (
Connections
Start > Settings > Control Panel) by choosing Network
.
SFLASH_INSPECT.C—This program is a handy utility for inspect ing the contents of a serial flash chip. When the sample program starts running, it attempts to initialize a serial flash chip on Serial Port B. Once a serial flash chip is found, the user can perform five different commands to print out the contents of a specified page, set all bytes on the specified page to a single random value, clear (set to zero) all the bytes in a speci­fied page, set all bytes on the specified page to a given value, or save user-specified text to a selected page.
22 RabbitCore RCM5400W

3.2.2 Serial Communication

The following sample programs are found in the SAMPLES\RCM5400W\SERIAL folder.
FLOWCONTROL.C—This program demonstrates how to configure Serial Port D for
CTS/R TS flow control with serial data coming from Serial Port C (TxC) at 1 15, 200 bps . The serial data received are displayed in the STDIO window.
To set up the Prototyping Board, you will need to tie TxD and RxD together on the RS-232 header at J4, and you will also tie TxC and RxC together using the jumpers supplied in the Development Kit as
RxC TxC
TxD RxD
GND
shown in the diagram. A repeating triangular pattern should print out in the STDIO window.
The program will periodically switch flow contr ol on or off to demonstrate th e eff ect of flow control.
If you have two Prototyping Boards with modules, run this sample program on the sending board, then disconnect the programming cable and reset the sending board so that the module is operating in the Run mode. Connect TxC, TxD, and GND on the sending board to RxC, RxD, and GND on the other board, then, with the programming cable attached to the other module, run the sample program.
PARITY.C—This program demonstrates the use of parity modes by
RxC
TxD
TxC
RxD GND
repeatedly sending byte values 0–127 from Serial Port C to Serial Port D. The program will switch between generating parity or not on Serial Port C. Serial Port D will always be checking parity, so parity errors should occur during every other sequence.
J4
J4
To set up the Prototyping Board, you will need to tie TxC and RxD together on the RS-232 header at J4 using one of the jumpers supplied in the Development Kit as shown in the diagram.
The Dynamic C STDIO window will display the error sequence.
SERDMA.CThis program demonstrates using DMA to transfer data from a circ ular
buffer to the serial port and vice versa. The Dynamic C
STDIO window is used to view or
clear the buffer.
Before you compile and run the sample program, you will need to connect the RS-232 he ade r a t J4 to y our PC as shown in the diagram using the serial to DB9 cable supplied in the Development Kit.
Colored
edge
Once you have compiled and run the sample program, start Tera Term or another terminal emulation program to connect to the selected PC serial port at a baud rate of
115,200 bps. You can observe the output in the Dynamic C
STDIO window as you type in T e ra Term, and you can
also use the Dynamic C STDIO window to clear the buffer.
J4
RxC
TxD
TxC
RxD
The Tera Term utility can be downloaded from
hp.vector.co.jp/authors/VA002416/teraterm.html.
GND
OEM User’s Manual 23
SIMPLE3WIRE.C—This program demonstrates basic RS-232 serial communication. Lower case characters are sent on TxC, and are received by RxD. The received characters are converted to upper case and are sent out on TxD, are received on RxC, and are displayed in the Dynamic C
STDIO window.
RxC TxC
TxD RxD
J4
GND
To set up the Prototyping Board, you will need to tie TxD and RxC together on the RS-232 header at J4, and you will also tie RxD and TxC together using the jumpers supplied in the Development Kit as shown in the diagram.
SIMPLE5WIRE.C—This program demonstrates 5-wire RS-232 serial communication with flow control on Serial Port D and data flow on Serial Port C.
To set up the Prototyping Board, you will need to tie TxD and RxD together on the RS-232 header at J4, and you will also tie TxC and RxC together using the jumpers supplied in the Development Kit as
RxC TxC
TxD RxD
J4
GND
shown in the diagram. Once you have compiled and run this program, you can test flow con-
trol by disconnecting the TxD jumper from RxD while the program is running. Charac­ters will no longer appear in the STDIO window, and will display again once TxD is connected back to RxD.
If you have two Prototyping Boards with modules, run this sample program on the sending board, then disconnect the programming cable and reset the sending board so that the module is operating in the Run mode. Connect TxC, TxD, and GND on the sending board to RxC, RxD, and GND on the other board, then, with the programming cable attached to the other module, run the sample program. Once you have compiled and run this program, you can test flow control by disconnecting TxD from RxD as before while the program is running. Since the J4 header locations on the two Prototyping Boards are connected with wires, there are no slip-on jumpers at J4 on either Pr ototyping Board.
SWITCHCHAR.C—This program demonstrates transmitting and then receiving an ASCII string on Serial Ports C and D. 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 TxD and RxC together on the RS-232 header at J4, and you will also tie RxD and TxC together using the jumpers supplied in the Development Kit as shown in the diagram.
RxC TxC
TxD RxD
J4
GND
Once you have compiled and run this program, press and release switches S2 and S3 on the Prototyping Board. The data sent between the serial ports will be displayed in the STDIO window.
24 RabbitCore RCM5400W
Loading...
+ 90 hidden pages