RabbitCore RCM3900
C-Programmable Core Module
with microSD™ Card Storage and Ethernet
Users Manual
019–0164_F
Rabbit Semiconductor Inc.
www.rabbit.com
RabbitCore RCM3900 Users Manual
Part Number 019-0164_F • Printed in U.S.A.
©2008-2010 Digi International Inc. • All rights reserved.
Digi International reserves the right to make changes and
improvements to its products without providing notice.
Trademarks
Rabbit and Dynamic C are registered trademarks of Digi International Inc.
Rabbit 3000 and RabbitCore are trademarks of Digi International Inc.
SD and microSD are trademarks of the SD Card Association.
The latest revision of this manual is available on the Rabbit Web site, www.rabbit.com,
for free, unregistered download.
RabbitCore RCM3900 User’s Manual 3
TABLE OF CONTENTS
Chapter 1. Introduction 6
1.1 RCM3900 Features ...............................................................................................................................6
1.2 Comparing the RCM3365/RCM3375 and the RCM3900/RCM3910 ..................................................9
1.3 Advantages of the RCM3900 .............................................................................................................10
1.4 Development and Evaluation Tools....................................................................................................11
1.4.1 Development Kit .........................................................................................................................11
1.4.2 Software ......................................................................................................................................12
1.4.3 Connectivity Interface Kits .........................................................................................................12
1.4.4 Online Documentation ................................................................................................................12
Chapter 2. Getting Started 13
2.1 Install Dynamic C ...............................................................................................................................13
2.2 Hardware Connections........................................................................................................................14
2.2.1 Step 1 — Attach Module to Prototyping Board..........................................................................14
2.2.2 Step 2 — Connect Programming Cable......................................................................................15
2.2.3 Connect Power ............................................................................................................................16
2.3 Starting Dynamic C ............................................................................................................................17
2.4 Run a Sample Program .......................................................................................................................17
2.4.1 Troubleshooting ..........................................................................................................................17
2.5 Where Do I Go From Here? ...............................................................................................................18
2.5.1 Technical Support .......................................................................................................................18
Chapter 3. Running Sample Programs 19
3.1 Introduction.........................................................................................................................................19
3.2 Sample Programs ................................................................................................................................20
3.2.1 Use of NAND Flash (RCM3900 only) .......................................................................................21
3.2.2 Use of microSD™ Cards.............................................................................................................23
3.2.3 Serial Communication.................................................................................................................23
3.2.4 Real-Time Clock .........................................................................................................................25
3.2.5 Other Sample Programs ..............................................................................................................25
Chapter 4. Hardware Reference 26
4.1 RCM3900 Inputs and Outputs ............................................................................................................27
4.1.1 Memory I/O Interface .................................................................................................................32
4.1.2 LEDs ...........................................................................................................................................32
4.1.3 Other Inputs and Outputs ............................................................................................................32
4.2 Serial Communication ........................................................................................................................33
4.2.1 Serial Ports ..................................................................................................................................33
4.2.2 Ethernet Port ...............................................................................................................................34
4.2.3 Serial Programming Port.............................................................................................................35
4.3 Serial Programming Cable..................................................................................................................36
4.3.1 Changing Between Program Mode and Run Mode ....................................................................36
4.3.2 Standalone Operation of the RCM3900......................................................................................37
RabbitCore RCM3900 User’s Manual 4
4.4 Memory...............................................................................................................................................38
4.4.1 SRAM .........................................................................................................................................38
4.4.2 Flash EPROM .............................................................................................................................38
4.4.3 NAND Flash (RCM3900 only)...................................................................................................38
4.4.4 microSD™ Cards ........................................................................................................................39
4.5 Other Hardware...................................................................................................................................42
4.5.1 Clock Doubler .............................................................................................................................42
4.5.2 Spectrum Spreader ......................................................................................................................42
Chapter 5. Software Reference 43
5.1 More About Dynamic C .....................................................................................................................43
5.1.1 Developing Programs Remotely with Dynamic C......................................................................45
5.2 Dynamic C Functions ........................................................................................................................46
5.2.1 Digital I/O ...................................................................................................................................46
5.2.2 SRAM Use ..................................................................................................................................46
5.2.3 Serial Communication Drivers....................................................................................................47
5.2.4 TCP/IP Drivers............................................................................................................................47
5.2.5 NAND Flash Drivers ..................................................................................................................47
5.2.6 microSD™ Card Drivers.............................................................................................................48
5.2.7 Prototyping Board Function Calls...............................................................................................49
5.2.7.1 Board Initialization............................................................................................................. 49
5.2.7.2 Digital I/O .......................................................................................................................... 50
5.2.7.3 Switches, LEDs, and Relay................................................................................................ 52
5.2.7.4 Serial Communication........................................................................................................ 55
5.3 Upgrading Dynamic C ........................................................................................................................56
5.3.1 Extras ..........................................................................................................................................56
Chapter 6. Using the TCP/IP Features 57
6.1 TCP/IP Connections ...........................................................................................................................57
6.2 TCP/IP Primer on IP Addresses..........................................................................................................59
6.2.1 IP Addresses Explained ..............................................................................................................61
6.2.2 How IP Addresses are Used........................................................................................................62
6.2.3 Dynamically Assigned Internet Addresses .................................................................................63
6.3 Placing Your Device on the Network .................................................................................................64
6.4 Running TCP/IP Sample Programs ....................................................................................................65
6.4.1 How to Set IP Addresses in the Sample Programs .....................................................................66
6.4.2 How to Set Up your Computer for Direct Connect ....................................................................67
6.5 Run the PINGME.C Sample Program ................................................................................................68
6.6 Running Additional Sample Programs With Direct Connect.............................................................68
6.6.1 RabbitWeb Sample Programs .....................................................................................................69
6.7 Where Do I Go From Here? ...............................................................................................................70
Appendix A. RCM3900 Specifications 71
A.1 Electrical and Mechanical Characteristics .........................................................................................72
A.1.1 Headers.......................................................................................................................................76
A.2 Bus Loading .......................................................................................................................................77
A.3 Rabbit 3000 DC Characteristics.........................................................................................................80
A.4 I/O Buffer Sourcing and Sinking Limit .............................................................................................81
A.5 Conformal Coating.............................................................................................................................82
A.6 Jumper Configurations.......................................................................................................................83
Appendix B. Prototyping Board 85
B.1 Introduction ........................................................................................................................................86
B.1.1 Prototyping Board Features........................................................................................................87
B.2 Mechanical Dimensions and Layout..................................................................................................89
B.3 Power Supply .....................................................................................................................................91
B.4 Using the Prototyping Board..............................................................................................................92
RabbitCore RCM3900 User’s Manual 5
B.4.1 Adding Other Components.........................................................................................................93
B.4.2 Digital I/O...................................................................................................................................94
B.4.2.1 Digital Inputs ..................................................................................................................... 94
B.4.3 CMOS Digital Outputs...............................................................................................................95
B.4.4 Sinking Digital Outputs..............................................................................................................95
B.4.5 Relay Outputs .............................................................................................................................95
B.4.6 Serial Communication................................................................................................................96
B.4.6.1 RS-232 ............................................................................................................................... 97
B.4.6.2 RS-485 ............................................................................................................................... 98
B.4.7 RabbitNet Port............................................................................................................................99
B.4.8 Other Prototyping Board Modules ...........................................................................................100
B.4.9 Quadrature Decoder .................................................................................................................100
B.4.10 Stepper-Motor Control ...........................................................................................................100
B.5 Prototyping Board Jumper Configurations ......................................................................................102
B.6 Use of Rabbit 3000 Parallel Ports ....................................................................................................104
Appendix C. LCD/Keypad Module 106
C.1 Specifications ...................................................................................................................................106
C.2 Contrast Adjustments for All Boards...............................................................................................108
C.3 Keypad Labeling ..............................................................................................................................109
C.4 Header Pinouts .................................................................................................................................110
C.4.1 I/O Address Assignments.........................................................................................................110
C.5 Mounting LCD/Keypad Module on the Prototyping Board ............................................................111
C.6 Bezel-Mount Installation..................................................................................................................112
C.6.1 Connect the LCD/Keypad Module to Your Prototyping Board...............................................114
C.7 Sample Programs .............................................................................................................................115
C.8 LCD/Keypad Module Function Calls ..............................................................................................116
C.8.1 LCD/Keypad Module Initialization..........................................................................................116
C.8.2 LEDs.........................................................................................................................................117
C.8.3 LCD Display.............................................................................................................................118
C.8.4 Keypad......................................................................................................................................154
Appendix D. Power Supply 161
D.1 Power Supplies.................................................................................................................................161
D.1.1 Battery Backup.........................................................................................................................161
D.1.2 Battery-Backup Circuit ............................................................................................................162
D.1.3 Reset Generator........................................................................................................................163
Index 164
Schematics 168
RabbitCore RCM3900 User’s Manual 6
1. INTRODUCTION
The RCM3900 RabbitCore modules feature a compact module that incorporates the latest
revision of the powerful Rabbit® 3000 microprocessor, flash memory, onboard mass storage
(NAND flash), static RAM, digital I/O ports, and removable (“hot-swappable”) memory
cards. The RCM3900 RabbitCore modules both have an integrated 10/100Base-T Ethernet
port, and provide for LAN and Internet-enabled systems to be built as easily as serial-com-
munication systems.
A Development Kit provides the essentials that you need to design your own microproces-
sor-based system, and includes a complete Dynamic C software development system. The
Development Kit also contains a Prototyping Board that will allow you to evaluate the
RCM3900 module and to prototype circuits that interface to the module. You will also be
able to write and test software for the RCM3900 modules.
Throughout this manual, the term RCM3900 refers to the complete series of RCM3900
RabbitCore modules unless other production models are referred to specifically.
The RCM3900 has a Rabbit 3000 microprocessor operating at 44.2 MHz, a fast program-
execution SRAM, data SRAM, flash memory, two clocks (main oscillator and real-time
clock), and the circuitry necessary for reset and management of battery backup of the
Rabbit 3000’s internal real-time clock and the data SRAM. Two 34-pin headers bring out
the Rabbit 3000 I/O bus lines, parallel ports, and serial ports.
The RCM3900 receives its +3.3 V power from the customer-supplied motherboard on
which it is mounted. The RCM3900 can interface with all kinds of CMOS-compatible
digital devices through the motherboard.
The RCM3900’s mass-storage capabilities make it suited to running the optional Dynamic C
FAT file system module where data are stored and handled using the same directory file
structure commonly used on PCs. A removable microSD™ Card can be hot-swapped to
transfer data quickly and easily using a standardized file system that can be read away
from the RCM3900 installation.
1.1 RCM3900 Features
Small size: 1.85" x 2.73" x 0.86"
(47 mm x 69 mm x 22 mm)
Microprocessor: latest revision of Rabbit 3000 running
at 44.2 MHz
RabbitCore RCM3900 User’s Manual 7
10/100Base-T auto MDI/MDIX Ethernet port chooses Ethernet interface automatically
based on whether a crossover cable or a straight-through cable is used in a particular
setup
52 parallel 5 V tolerant I/O lines: 44 configurable for I/O, 4 fixed inputs, 4 fixed outputs
Three additional digital inputs, two additional digital outputs
External reset
External I/O bus can be configured for 8 data lines and 5 address lines (shared with
parallel I/O lines), I/O read/write
Ten 8-bit timers (six cascadable) and one 10-bit timer with two match registers
512K flash memory, 512K program execution SRAM, 512K data SRAM
Fixed and hot-swappable mass-storage memory options, which may be used with the
standardized directory structure supported by the Dynamic C FAT File System module.
Real-time clock
Watchdog supervisor
Provision for customer-supplied backup battery via connections on header J62
10-bit free-running PWM counter and four pulse-width registers
Two-channel Input Capture (shared with parallel I/O ports) can be used to time input
signals from various port pins
Two-channel Quadrature Decoder accepts inputs from external incremental encoder
modules
Five or six 3.3 V CMOS-compatible serial ports with a maximum asynchronous baud
rate of 5.525 Mbps
. Three ports are configurable as a clocked serial port (SPI), and two
ports are configurable as SDLC/HDLC serial ports (shared with parallel I/O ports).
Supports 1.15 Mbps IrDA transceiver
RabbitCore RCM3900 User’s Manual 8
There are two RCM3900 production models. Table 1 below summarizes their main
features.
The RCM3900 is programmed over a standard PC serial port through a USB programming
cable supplied with the Development Kit, and can also be programmed directly over an
Ethernet link using the Dynamic C download manager with or without a RabbitLink.
Appendix A provides detailed specifications for the RCM3900.
Table 1. RCM3900 Features
Feature RCM3900 RCM3910
Microprocessor Rabbit 3000 running at 44.2 MHz
SRAM 512K program (fast SRAM) + 512K data
Flash Memory
(program) 512K
Mass Data
Storage
32MB (fixed NAND flash)
+ 128MB–1GB microSD™
Card
128MB–1GB microSD™ Card
Serial Ports
6 shared high-speed, 3.3 V CMOS-compatible ports:
all 6 are configurable as asynchronous serial ports;
4 are configurable as a clocked serial port (SPI) and 1 is
configurable as an HDLC serial port;
option for second HDLC serial port at the expense of 2 clocked
serial ports (SPI)
RabbitCore RCM3900 User’s Manual 9
1.2 Comparing the RCM3365/RCM3375 and the RCM3900/RCM3910
Temperature Specifications — We can no longer obtain certain components for the
RCM3365/RCM3375 RabbitCore modules that support the -40°C to +70°C temperature
range. RCM3365/RCM3375 RabbitCore modules manufactured after May, 2008, are
specified to operate at 0°C to +70°C. The RCM3900/RCM3910, rated for -20°C to
+85°C, are available after May, 2008.
Removable Mass Storage — The hot-swappable xD-Picture Card™ mass storage
device with up to 128MB of memory has been replaced with the SD Card with up to
1GB of memory. The SD Card is more readily available today, and is expected to
remain readily available for a long time. In addition, SD Cards provide a significantly
larger memory capacity, which has been requested by customers. The trade-off for the
larger memory capacity is that the data transfer rate to/from the SD Card is about an
order of magnitude slower than to/from the xD-Picture Card.
NOTE: RCM3365/RCM3375 RabbitCore modules may eventually be discontinued
because of changes to the xD-Picture Card™. The miniSD™ Card card initially used
with the RCM3900 series has since been replaced by the microSD™ Card. Aside
from using a different sized memory card, the boards function the same.
Serial Ports — Serial Port B, available as either a clocked serial port or an asynchro-
nous serial port on the RCM3365/RCM3375, is used by the RCM3900/RCM3910 as a
clocked serial peripheral interface (SPI) for the microSD™ Card, and is not brought out
for customer use.
General-Purpose I/O — PD2, a configurable I/O pin on the RCM3365/RCM3375, is
used to detect whether the microSD™ Card is installed on the RCM3900/RCM3910,
and so PD2 is not brought out for customer use on the RCM3900/RCM3910.
Maximum Current — The RCM3365/RCM3375 draws 250 mA vs. the 325 mA
required by the RCM3900/RCM3910.
LEDs — The SPEED and user (USR/BSY)LED locations have been swapped between
the RCM3365/RCM3375 and the RCM3900/RCM3910, the LNK/ACT LEDs have
been combined to one LED on the RCM3900/RCM3910, and the RCM3900/RCM3910
has an FDX/COL LED instead of the FM LED on the RCM3365/RCM3375. The LED
placements on the boards remain unchanged.
Ethernet chip — A different Ethernet controller chip is used on the RCM3900. The
Ethernet chip is able to detect automatically whether a crossover cable or a straight-
through cable is being used in a particular setup, and will configure the signals on the
Ethernet jack interface.
Dynamic C — As long as no low-level FAT file system calls or direct xD-Picture Card
access calls to the NFLASH.LIB library were used in your application developed for the
RCM3365/RCM3375, you may run that application on the RCM3900/RCM3910 after
you recompile it using Dynamic C v. 9.62.
NOTE: The Dynamic C RabbitSys option for programming an RCM3365 over an
Ethernet link is not supported for the RCM3900.
RabbitCore RCM3900 User’s Manual 10
1.3 Advantages of the RCM3900
Fast time to market using a fully engineered, “ready-to-run/ready-to-program” micro-
processor core.
Competitive pricing when compared with the alternative of purchasing and assembling
individual components.
Easy C-language program development and debugging
Program download utility (Rabbit Field Utility) 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.
Integrated Ethernet port for network connectivity, with royalty-free TCP/IP software.
Ideal for network-enabling security and access systems, home automation, HVAC
systems, and industrial controls.
nauuncm ncmmn
RabbitCore RCM3900 User’s Manual 11
1.4 Development and Evaluation Tools
1.4.1 Development Kit
The Development Kit contains the hardware and software needed to use the RCM3900.
RCM3900 module.
Prototyping Board.
1 GB microSD™ Card with SD Card adapter.
Universal AC adapter, 12 V DC, 1 A (includes Canada/Japan/U.S., Australia/N.Z., U.K.,
and European style plugs).
USB programming cable with 10-pin header.
Dynamic C CD-ROM, with complete product documentation on disk.
Getting Started instructions.
Accessory parts for use on the Prototyping Board.
Screwdriver and Cat. 5 Ethernet cables.
Rabbit 3000 Processor Easy Reference poster.
Registration card.
Figure 1. RCM3900 Development Kit
microSD Card
and SD Card Adapter
TM
Programming
Cable Universal
AC Adapter
with Plugs
Getting Started
Instructions Prototyping Board
Accessory Parts for
Prototyping Board
Ethernet
Cables
Screwdriver
t
t
t
t
t
t
t
t
t
t
t
set up.exe
RabbitCore RCM3900 User’s Manual 12
1.4.2 Software
The RCM3900 is programmed using version 9.62 of Dynamic C.
A compatible version is
included on the Development Kit CD-ROM. This version of Dynamic C includes the pop-
ular µC/OS-II real-time operating system, point-to-point protocol (PPP), FAT file system,
RabbitWeb, and other select libraries.
Rabbit also offers the Rabbit Embedded Security Pack featuring the Secure Sockets Layer
(SSL) and a specific Advanced Encryption Standard (AES) library. In addition 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.4.3 Connectivity Interface Kits
Rabbit has available a Connector Adapter Board to allow you to use the RCM3900 with
header sockets that have a 0.1" pitch.
Connector Adapter Board (Part No. 151-0114)—allows you to plug the RCM3900
whose headers have a 2 mm pitch into header sockets with a 0.1" pitch.
Visit our Web site at www.rabbit.com or contact your Rabbit sales representative or autho-
rized distributor for further information.
1.4.4 Online 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.
Each Dynamic C module has complete documentation available with the online documen-
tation described above.
The latest versions of all documents are always available for free, unregistered download
from our Web sites as well.
RabbitCore RCM3900 User’s Manual 13
2. GETTING STARTED
This chapter describes the RCM3900 hardware in more detail, and explains how to set up
and use the accompanying Prototyping Board.
NOTE: It is assumed that you have the RCM3900 Development Kit. If you purchased an
RCM3900 module by itself, you will have to adapt the information in this chapter and
elsewhere to your test and development setup.
2.1 Install Dynamic C
To develop and debug programs for the RCM3900 (and for all other Rabbit hardware), you
must install and use Dynamic C.
If you have not yet installed Dynamic C, do so now by inserting the Dynamic C CD from
the RCM3900 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 otherwise does not start, use the Windows
Start | Run menu or Windows 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 communicate with the target development system.
The installation allows you to choose the COM port that will be used. The default selec-
tion is COM1. Select any available USB port for Dynamic C’s use. 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 use by another device (mouse, modem, etc.) may lead to 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 icons on your PC desktop.
One icon is for Dynamic C, one 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 plan to use the optional Dynamic C Rabbit Embedded Security Pack, install it after
installing Dynamic C. You must install the Rabbit Embedded Security Pack in the same
directory where Dynamic C was installed.
RabbitCore RCM3900 User’s Manual 14
2.2 Hardware Connections
There are three steps to setting up the Prototyping Board:
1. Attach the RCM3900 module to the Prototyping Board.
2. Connect the serial programming cable between the RCM3900 and the workstation PC.
3. Connect the power supply to the Prototyping Board.
2.2.1 Step 1 — Attach Module to Prototyping Board
Turn the RCM3900 module so that the Ethernet jack is facing the direction shown in
Figure 2 below. Align the pins from headers J61 and J62 on the bottom side of the module
into header sockets JA and JB on the Prototyping Board. The microSD™ Card does not
have to be inserted into connector J2 on the RCM3900 at this time—there is a protective
spacer insert that you simply pull out before inserting a microSD™ Card for the first time.
Figure 2. Install the RCM3900 Series on the Prototyping Board
NOTE: It is important that you line up the pins on headers J61 and J62 of the RCM3900
module exactly with the corresponding pins of header sockets JA and JB on the Proto-
typing Board. The header pins may become bent or damaged if the pin alignment is off-
set, and the module will not work. Permanent electrical damage to the module may also
result if a misaligned module is powered up.
Press the module’s pins firmly into the Prototyping Board header sockets—press down in
the area above the header pins using your thumbs or fingers over the header pins as shown
in Figure 2. Do not press down on the microSD™ Card connector (J2) even if the
microSD™ Card is installed, but rather press down on the circuit board along the edge by
the connector. Also, do not press down on the middle of the module to avoid flexing the
module, which could damage the module or components on the module.
Should you need to remove the module, grasp it with your fingers along the sides by the
connectors and gently work the module up to pull the pins away from the sockets where
they are installed. Do not remove the module by grasping it at the top and bottom.
RCM3900
Do not press down
here or on
microSD Card holder
CAUTION: You will sense a soft click
once you insert the microSD™ Card
completely. To remove it, gently press
the card towards the middle of the
RCM3900 — you will sense a soft click
and the card will be ready to be removed.
Do not attempt to pull the card from the
socket before pressing it in — otherwise
the ejection mechanism will get dam-
aged. The ejection mechanism is spring-
loaded, and will partially eject the card
when used correctly.
m" up m m. A c adapter Wummwm i mm mm 3-pin power connector 01$! [:33 «35% fl ’ Co‘ored edge Programming Ciblfi
RabbitCore RCM3900 User’s Manual 15
2.2.2 Step 2 — Connect Programming Cable
The programming cable connects the RCM3900 to the PC running Dynamic C to down-
load programs and to monitor the RCM3900 module during debugging.
Connect the 10-pin connector of the programming cable labeled PROG to header J1 on
the RCM3900 as shown in Figure 3. There is a small dot on the circuit board next to pin 1
of header J1. 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 nonprogramming
serial connection.)
Figure 3. 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.
RabbitCore RCM3900 User’s Manual 16
2.2.3 Connect Power
When all other connections have been made, you can connect power to the Prototyping
Board.
First, prepare the AC adapter for the country where it will be used by selecting the plug.
The RCM3900 Development Kit presently includes Canada/Japan/U.S., Australia/N.Z.,
U.K., and European style plugs. Snap in the top of the plug assembly into the slot at the
top of the AC adapter as shown in Figure 3, then press down on the spring-loaded clip
below the plug assembly to allow the plug assembly to click into place.
Connect the AC adapter to 3-pin header J2 on the Prototyping Board as shown in Figure 3.
Plug in the AC adapter. The red CORE LED on the Prototyping Board should light up. The
RCM3900 and the Prototyping Board are now ready to be used.
NOTE: A RESET button is provided on the Prototyping Board to allow a hardware reset
without disconnecting power.
RabbitCore RCM3900 User’s Manual 17
2.3 Starting Dynamic C
Once the RCM3900 is connected as described in the preceding pages, start Dynamic C by
double-clicking on the Dynamic C icon on your desktop or in your Start menu. Dynamic C
uses the serial port specified during installation. Select Code and BIOS in Flash, Run in
RAM 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.
This program shows that the CPU is working. The sample program described in
Section 6.5, “Run the PINGME.C Sample Program,” tests the TCP/IP portion of the board.
2.4 Run a Sample Program
Use the File menu to open the sample program PONG.C, which is in the Dynamic C
SAMPLES folder. Press function key F9 to compile and run the program. The STDIO
window will open on your PC and will display a small square bouncing around in a box.
2.4.1 Troubleshooting
If Dynamic C cannot find the target system (error message "No Rabbit Processor
Detected."):
Check that the RCM3900 is powered correctly — the red CORE LED on the Prototyp-
ing Board should be lit when the RCM3900 is mounted on the Prototyping Board and
the AC adapter is plugged in.
Check both ends of the programming cable to ensure that they are firmly plugged into
the PC and the PROG connector, not the DIAG connector, is plugged in to the program-
ming port on the RCM3900 with the marked (colored) edge of the programming cable
towards pin 1 of the programming header.
Ensure that the RCM3900 module is firmly and correctly installed in its connectors on
the Prototyping Board.
Select a different COM port within Dynamic C. From the Options menu, select Proj-
ect Options, then select another COM port from the list on the Communications tab,
then click OK. Press <Ctrl-Y> to force Dynamic C to recompile the BIOS.
If you get an error message when you plugged the programming cable into a USB port,
you will have to install USB drivers. 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.
RabbitCore RCM3900 User’s Manual 18
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 Serial Options dialog on the “Communications” tab in the Dynamic C
Options > Project Options menu. Select a slower Max download baud rate. Click OK
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 in the Dynamic C Options > Project Options >
Communications menu. Choose a lower debug baud rate. Click OK to save.
Press <Ctrl-Y> to force Dynamic C to recompile the BIOS. The LEDs on the USB pro-
gramming cable will blink and you should receive a Bios compiled successfully
message.
2.5 Where Do I Go From Here?
If the sample program ran fine, you are now ready to go on to other sample programs and to
develop your own applications. The source code for the sample programs is provided to allow
you to modify them for your own use. The RCM3900 Users Manual also provides com-
plete hardware reference information and describes the software function calls for the
RCM3900, the Prototyping Board, and the optional LCD/keypad module.
For advanced development topics, refer to the Dynamic C Users Manual and the
Dynamic C TCP/IP Users Manual, also in the online documentation set.
2.5.1 Technical Support
NOTE: If you purchased your RCM3900 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/.
RabbitCore RCM3900 User’s Manual 19
3. RUNNING SAMPLE PROGRAMS
To develop and debug programs for the RCM3900 (and for all other Rabbit hardware),
you must install and use Dynamic C.
3.1 Introduction
To help familiarize you with the RCM3900 modules, Dynamic C includes several sample
programs. Loading, executing and studying these programs will give you a solid hands-on
overview of the RCM3900’s capabilities, as well as a quick start with Dynamic C as an
application development tool.
NOTE: The sample programs assume that you have at least an elementary grasp of the C
programming language. If you do not, see the introductory pages of the Dynamic C
Users Manual for a suggested reading list.
In order to run the sample programs discussed in this chapter and elsewhere in this manual,
1. Your RCM3900 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 (J1) on the RCM3900
to your PC.
4. Power must be applied to the RCM3900 through the Prototyping Board.
Refer to Chapter 2, “Getting Started,” if you need further information on these steps.
Since the RCM3900 runs at 44.2 MHz and is equipped with a fast program execution
SRAM, remember to allow the compiler to run the application in the fast program execu-
tion SRAM by selecting Code and BIOS in Flash, Run in RAM from the Dynamic C
Options > Project Options > Compiler menu.
To run a sample program, open it with the File menu, then compile and run it by pressing
F9.
Complete information on Dynamic C is provided in the Dynamic C Users Manual.
< donvroned="" leds'="" suaws:="" )="">> us» n55 use arr Afllzl From Po keybuar . Semen 3155, 4:351. 5:nss. muss. 7=usER w nugg|e LEDS < press="" 'n’="" in="" an:="">
RabbitCore RCM3900 User’s Manual 20
3.2 Sample Programs
Of the many sample programs included with Dynamic C, several are specific to the
RCM3900. Sample programs illustrating the general operation of the RCM3900, serial
communication, and the NAND flash are provided in the SAMPLES\RCM3900 folder. Each
sample program has comments that describe the purpose and function of the program.
Follow the instructions at the beginning of the sample program.
TCP/IP sample programs are described in Chapter 6, “Using the TCP/IP Features.” Sample
programs for the optional LCD/keypad module that is used on the RCM3900 Prototyping
Board are described in Appendix C.
CONTROLLEDS.c—Demonstrates use of the digital outputs by having you turn the
LEDs on the Prototyping Board on or off from the STDIO window on your PC.
Once you compile and run CONTROLLEDS.C, the following display will appear in the
Dynamic C STDIO window.
Press “3” or “4” or “5”or “6” or “7”on your keyboard to select LED DS3 or DS4 or
DS5 or DS6 on the Prototyping Board or the USR LED on the RCM3900. Then follow
the prompt in the Dynamic C STDIO window to turn the LED on or off.
FLASHLEDS.c—Demonstrates assembly-language program by flashing the USR LED
on the RCM3900 and LEDs DS3, DS4, DS5, and DS6 on the Prototyping Board.
SWRELAY.c—Demonstrates the relay-switching function call using the relay installed
on the Prototyping Board by toggling the relay output state via the Dynamic C STDIO
window.
TOGGLESWITCH.c—Uses costatements (cooperative multitasking) to detect switches
S2 and S3 using debouncing. The corresponding LEDs (DS3 and DS4) will turn on or
off.
Once you have loaded and executed these four programs and have an understanding of
how Dynamic C and the RCM3900 modules interact, you can move on and try the other
sample programs, or begin building your own.
Source code
RabbitCore RCM3900 User’s Manual 21
3.2.1 Use of NAND Flash (RCM3900 only)
The following sample programs can be found in the SAMPLES\RCM3900\NANDFlash folder.
NOTE: These sample programs cannot be run on the RCM3910, which does not have
NAND flash installed.
NFLASH_DUMP.C—This program is a utility for dumping the nonerased contents of a
NAND flash chip to the Dynamic C STDIO window, and the contents may be redi-
rected to a serial port.
When the sample program starts running, it attempts to communicate with the NAND
flash chip. If this communication is successful and the main page size is acceptable, the
nonerased page contents (non 0xFF) from the NAND flash page are dumped to the
Dynamic C STDIO window.
Note that an error message might appear when the first 32 pages (0x20 pages) are
“dumped.” You may ignore the error message.
NFLASH_ERASE.C—This program is a utility for erasing all the good blocks of a
NAND flash device.
When the sample program starts running, it attempts to initialize the onboard NAND
flash chip. If this initialization is successful, the progress of the blocks being erased is
reported in the Dynamic C STDIO window.
NFLASH_INSPECT.C—This program is a utility for inspecting the contents of a NAND
flash chip. When the sample program starts running, it attempts to initialize the onboard
NAND flash chip. If this initialization is successful, the user can execute various com-
mands to print out the contents of a specified page, clear (set to zero) all the bytes in a
specified page, erase (set to FF), or write a specified value or count pattern to specified
pages.
When you run this sample program, setting the NFLASH_USEERASEBLOCKSIZE
macro to (0) zero makes the NAND flash driver use smaller (512-byte) chunks of data,
which are less tedious to manage in this program than the alternative larger (16K)
chunks of data. However, using smaller chunks of data means more NAND flash block
erases are required to update all the program pages in an erased block, one per program
page written. In contrast, updating all the program pages in an erased block can require
only a single block erase when all of the program pages within the erase block are
treated as a single large page. See the nf_initDevice() function help for more
information.
NFLASH_LOG.C—This program runs a simple Web server that stores a log of hits in
the NAND flash. This log can be viewed and cleared from a Web browser by connect-
ing the RJ-45 jack on the RCM3900 to your PC as described in Section 6.1. The sidebar
on the next page explains how to set up your PC or notebook to view this log.
Before you compile and run this sample program, make any configuration changes to
match your requirements. Once you are viewing the results in a Web browser, click the
Source code” link on the Web page to see this sample program’s #ximported file
content.
RabbitCore RCM3900 User’s Manual 22
Note that this sample program does not use the optimum method of writing to the
NAND flash. The inefficiency resulting from the small amount of data written in each
append operation is offset somewhat by the expected relative infrequency of these
writes, and by the sample program’s method of “walking” through the flash blocks
when appending data as well as when a log is cleared.
There is little difference in the number of NAND flash block erase operations regard-
less of whether the NFLASH_USEERASEBLOCKSIZE macro to 0 (zero) or 1 (one). It is
slightly more efficient to have the NAND flash driver use larger (16K) chunks of data.
See the nf_initDevice() function help for more information.
As long as you have not modified the TCPCONFIG 1 macro in the sample program,
enter the following server address in your Web browser to bring up the Web page
served by the sample program.
http://10.10.6.100
Otherwise use the TCP/IP settings you entered in the
LIB\TCPIP\
TCP_CONFIG.LIB
library.
Follow these instructions to set up your PC or notebook. Check with your administra-
tor if you are unable to change the settings as described here since you may need
administrator privileges. The instructions are specifically for Windows 2000, but the
interface is similar for other versions of Windows.
TIP: If you are using a PC that is already on a network, you will disconnect the PC
from that network to run these sample programs. Write down the existing settings
before changing them to facilitate restoring them when you are finished with the
sample programs and reconnect your PC to the network.
1. Go to the control panel (Start > Settings > Control Panel), and then double-click
the Network icon.
2. Select the network interface card used for the Ethernet interface you intend to use
(e.g., TCP/IP Xircom Credit Card Network Adapter) and click on the “Proper-
ties” button. Depending on which version of Windows your PC is running, you may
have to select the “Local Area Connection” first, and then click on the “Properties”
button to bring up the Ethernet interface dialog. Then “Configure” your interface
card for a “10Base-T Half-Duplex” or an “Auto-Negotiation” connection on the
“Advanced” tab.
NOTE: Your network interface card will likely have a different name.
3. Now select the IP Address tab, and check Specify an IP Address, or select TCP/IP
and click on “Properties” to assign an IP address to your computer (this will disable
“obtain an IP address automatically”):
IP Address : 10.10.6.101
Netmask : 255.255.255.0
Default gateway : 10.10.6.1
4. Click <OK> or <Close> to exit the various dialog boxes.
fis§c§ows
RabbitCore RCM3900 User’s Manual 23
3.2.2 Use of microSD™ Cards
The following sample program can be found in the SAMPLES\RCM3900\SD_Flash folder.
SDFLASH_INSPECT.C—This program is a utility for inspecting the contents of a
microSD™ Card. When the sample program starts running, it attempts to initialize the
microSD™ Card on Serial Port B. The following five commands are displayed in the
Dynamic C STDIO window if a microSD™ Card is found:
p — print out the contents of a specified page on the microSD™ Card
r — print out the contents of a range of pages on the microSD™ Card
c — clear (set to zero) all of the bytes in a specified page
f — sets all bytes on the specified page to the given value
t — write user-specified text to a selected page
The sample program prints out a single line for a page if all bytes in the page are set to
the same value. Otherwise it prints a hex/ASCII dump of the page.
This utility works with the microSD™ Card at its lowest level, and writing to pages
will likely make the microSD™ Card unreadable by a PC. For PC compatibility, you
must use the Dynamic C FAT file system module, which allows you to work with files
on the microSD™ Card in a way that they will be PC-compatible.
SDFLASH_LOG.C—This program demonstrates a simple Web server that stores a log
of hits in the microSD™ Cards data flash. This log can be viewed and cleared from a
Web browser—see the NFLASH_LOG.C sample program for information on how to
access the Web page and configure your PC or workstation.
3.2.3 Serial Communication
The following sample programs can be found in the SAMPLES\RCM3900\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.
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. You may use an oscilloscope to
observe the CTS/RTS signals to see flow control operating
J14
TxE RxE GND TxF RxF 485+ GND 485
&$&’&.N‘\V asacxoas asacxoas asscaxoas
RabbitCore RCM3900 User’s Manual 24
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
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.
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.
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.)
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.
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.
J14
TxE RxE GND TxF RxF 485+ GND 485
J14
TxE RxE GND TxF RxF 485+ GND 485
J14
TxE RxE GND TxF RxF 485+ GND 485
J14
TxE RxE GND TxF RxF 485+ GND 485
RabbitCore RCM3900 User’s Manual 25
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
RCM3900, or it may be any Rabbit single-board computer or RabbitCore module that sup-
ports 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 RCM3900 assembly, make sure
pins 1–2 and pins 5–6 are jumpered together on header JP5 to use the RS-485 bias and ter-
mination 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.
3.2.4 Real-Time Clock
If you plan to use the real-time clock functionality in your application, you will need to set
the real-time clock. Set the real-time clock using the Dynamic C SAMPLES\RTCLOCK\
SETRTCKB.C sample program by following the onscreen prompts. The Dynamic C
SAMPLES\RTCLOCK\RTC_TEST.C sample program provides additional examples of
how to read and set the real-time clock.
3.2.5 Other Sample Programs
Section 6.6 describes the TCP/IP sample programs, and Appendix C.7 provides sample
programs for the optional LCD/keypad module that can be installed on the Prototyping
Board.
..._.._
RabbitCore RCM3900 User’s Manual 26
4. HARDWARE REFERENCE
Chapter 4 describes the hardware components and principal hardware subsystems of the
RCM3900 modules.
Appendix A, “RCM3900 Specifications,” provides complete physical
and
electrical specifications.
Figure 4 shows the Rabbit-based subsystems designed into the RCM3900.
Figure 4. RCM3900 Subsystems
TM
microSD
Card
Program
Flash
Data
SRAM
Fast SRAM
(program)
32 kHz
osc
44.2 MHz
osc
Ethernet
CMOS-level signals
Customer-specific
applications
Level
converter
RS-232, RS-485
serial communication
drivers on motherboard
Customer-supplied
external 3 V battery
RabbitCore Module
RABBIT
3000
Battery-Backup
Circuit
HHHHHHHHHHHHHHHHH DDDDDDDDDDDDDDDDD I U a: a: a: a: a: a: a: a: a: a: a: a: a: a: a: a: HHHHHHHHHHHHHHHHH
RabbitCore RCM3900 User’s Manual 27
4.1 RCM3900 Inputs and Outputs
Figure 5 shows the RCM3900 pinouts for headers J61 and J62.
Figure 5. RCM3900 Pinouts
The pinouts for the RCM3000, RCM3100, RCM3200, RCM3300/RCM3305/RCM3309/
RCM3319, RCM3360/RCM3370, RCM3365/RCM3375, and RCM3900 are almost compati-
ble, except signals PB0, PC4, and PC5. are used for the SPI interface to the serial flash on the
RCM3305/RCM3309/RCM3315/RCM3319 and for the microSD™ Card on the RCM3900/
RCM3910, but are available on the other modules.
Headers J61 and J62 are standard 2 × 17 headers with a nominal 2 mm pitch. An RJ-45
Ethernet port is also included with the RCM3900.
Pins 29–32 on header J61 are configured using 0 resistors at locations JP9, JP10, JP7,
and JP8 to enable connections to PD2, PD3, PD6, and PD7 respectively. Note that there is
no 0 resistor at location JP9 since PD2/TPO– is not available on header J61. They may
also be reconfigured to carry the Ethernet signals TPO–, TPO+, TPI–, and TPI+, but this
capability is reserved for future use.
Pins 33 and 34 on header J61 are wired via 0 surface-mount resistors at JP2 and JP3 to
carry the ACT and LINK signals that illuminate the corresponding LEDs on the RCM3900
module. These pins may be “configured” to carry PD0 and PD1, an option that is reserved
for future use.
See Appendix A.6 for more information about the locations of these headers.
/RES
PB2
PB4
PB6
PF4
PF6
PE7
PE5
PE3
PE0
PG6
PG4
/IORD
SMODE1
VRAM
+3.3 VIN
n.c.
n.c./PB0
PB3
PB5
PB7
PF5
PF7
PE6
PE4
PE1
PG7
PG5
/IOWR
SMODE0
/RESET_IN
VBAT_EXT
GND
GND
J62
Note: These pinouts are as seen on
the Bottom Side of the module.
n.c. = not connected
STATUS
PA6
PA4
PA2
PA0
PF2
PF0
PC1
PC3
n.c./PC5
PC7-RxA
PG1
PG3
PD5
PD3/TPO+
PD7/TPI+
ACT/n.c.
GND
PA7
PA5
PA3
PA1
PF3
PF1
PC0
PC2
n.c./PC4
PC6-TxA
PG0
PG2
PD4
n.c.
PD6/TPI
LINK/n.c.
J61
I i . I: 1 i“
RabbitCore RCM3900 User’s Manual 28
Figure 6 shows the use of the Rabbit 3000 microprocessor ports in the RCM3900 modules.
Figure 6. Use of Rabbit 3000 Ports
The ports on the Rabbit 3000 microprocessor used in the RCM3900 are configurable, and
so the factory defaults can be reconfigured. Table 2 lists the Rabbit 3000 factory defaults
and the alternate configurations.
RabbitCore RCM3900 User’s Manual 29
Table 2. RCM3900 Pinout Configurations
Pin Pin Name Default Use Alternate Use Notes
Header J61
1GND
2 STATUS Output (Status) Output
3–10 PA[7:0] Parallel I/O
External data bus
(ID0–ID7)
Slave port data bus
(SD0–SD7)
External Data Bus
11 PF3 Input/Output QD2A
12 PF2 Input/Output QD2B
13 PF1 Input/Output QD1A
CLKC
14 PF0 Input/Output QD1B
CLKD
15 PC0 Output TXD
Serial Port D
16 PC1 Input RXD
17 PC2 Output TXC
Serial Port C
18 PC3 Input RXC
19 PC4 Output TXB Serial Port B (used by microSD™
Card SPI)
20 PC5 Input RXB
21 PC6 Output TXA Serial Port A
(programming port)
22 PC7 Input RXA
23 PG0 Input/Output TCLKF Serial Clock F output
24 PG1 Input/Output RCLKF Serial Clock F input
25 PG2 Input/Output TXF
Serial Port F
26 PG3 Input/Output RXF
27 PD4 Input/Output ATXB
28 PD5 Input/Output ARXB
29 not connected
Optional Ethernet transmit port
30 PD3/TPO+ Input/Output TPOUT+ *
31 PD6/TPI– Input/Output TPIN– *
Optional Ethernet receive port
32 PD7/TPI+ Input/Output TPIN+ *
33 LINK Output Max. sinking current draw 1 mA
(see Note 1)
34 ACT Output
*Pins 30–32 Ethernet option is reserved for future use.
RabbitCore RCM3900 User’s Manual 30
Header J62
1 /RES Reset output Reset output from Reset
Generator
2 PB0 Input/Output CLKB CLKB (used by microSD™ Card
SPI)
3 PB2 Input/Output IA0
/SWR
External Address 0
Slave port write
4 PB3 Input/Output IA1
/SRD
External Address 1
Slave port read
5 PB4 Input/Output IA2
SA0
External Address 2
Slave port Address 0
6 PB5 Input/Output IA3
SA1
External Address 3
Slave port Address 1
7 PB6 Input/Output IA4 External Address 4
8 PB7 Input/Output IA5
/SLAVEATTN
External Address 5
Slave Attention
9 PF4 Input/Output AQD1B
PWM0
10 PF5 Input/Output AQD1A
PWM1
11 PF6 Input/Output AQD2B
PWM2
12 PF7 Input/Output AQD2A
PWM3
13 PE7 Input/Output I7
/SCS
I/O Strobe 7
Slave Port Chip Select
14 PE6 Input/Output I6 I/O Strobe 6
15 PE5 Input/Output I5
INT1B
I/O Strobe 5
Interrupt 1B
16 PE4 Input/Output I4
INT0B
I/O Strobe 4
Interrupt 0B
17 PE3 Input/Output I3 I/O Strobe 3
18 PE1 Input/Output I1
INT1A
I/O Strobe 1
Interrupt 1A
19 PE0 Input/Output I0
INT0A
I/O Strobe 0
Interrupt 0A
Table 2. RCM3900 Pinout Configurations (continued)
Pin Pin Name Default Use Alternate Use Notes
RabbitCore RCM3900 User’s Manual 31
Notes
1. When using pins 33–34 on header J3 to drive LEDs, these pins can handle a sinking
current of up to 8 mA.
2. The VRAM voltage is temperature-dependent. If the VRAM voltage drops below about
1.2 V to 1.5 V, the contents of the battery-backed SRAM may be lost. If VRAM drops
below 1.0 V, the 32 kHz oscillator could stop running. Pay careful attention to this volt-
age if you draw any current from this pin.
3. Do not overload the /IOWR line because the NAND flash memories have critical
timing requirements. In some cases it may be necessary to buffer /IOWR on the
motherboard.
Header J62
20 PG7 Input/Output RXE
Serial Port E
21 PG6 Input/Output TXE
22 PG5 Input/Output RCLKE Serial Clock E input
23 PG4 Input/Output TCLKE Serial Clock E ouput
24 /IOWR Output External write strobe
25 /IORD Output External read strobe
26–27 SMODE0,
SMODE1
(0,0)—start executing at address zero
(0,1)—cold boot from slave port
(1,0)—cold boot from clocked Serial
Port A
SMODE0 =1, SMODE1 = 1
Cold boot from asynchronous Serial
Port A at 2400 bps (programming cable
connected)
Also connected to programming
cable
28 /RESET_IN Input Input to Reset Generator
29 VRAM Output See Notes below table
30 VBAT_EXT 3 V battery Input Minimum battery voltage 2.85 V
31 +3.3 VIN Power Input 3.15–3.45 V DC
32 GND
33 n.c. Reserved for future use
34 GND
Table 2. RCM3900 Pinout Configurations (continued)
Pin Pin Name Default Use Alternate Use Notes
RabbitCore RCM3900 User’s Manual 32
4.1.1 Memory I/O Interface
The Rabbit 3000 address lines (A0–A18) and all the data lines (D0–D7) are routed
internally to the onboard flash memory and SRAM chips. I/O write (/IOWR) and I/O read
(/IORD) are available for interfacing to external devices—pay attention to the loading on
these two signals if you use them since these signals are also used by the RCM3900.
Parallel Port A can also be used as an external I/O data bus to isolate external I/O from the
main data bus. Parallel Port B pins PB2–PB7 can also be used as an auxiliary address bus.
When using the external I/O bus for a digital output or the LCD/keypad module on the
Prototyping Board, or for any other reason, you must add the following line at the begin-
ning of your program.
#define PORTA_AUX_IO // required to enable auxiliary I/O bus
4.1.2 LEDs
The RCM3900 has three Ethernet status LEDs located beside the RJ-45 Ethernet jack—
these are discussed in Section 4.2.2.
Additionally, there is one dual LED DS4. PD1 on the Rabbit 3000’s Parallel Port D is used
to enable the NAND flash on the RCM3900 model, but is connected to the green CE LED
at DS4, which is not used. The red BSY LED at DS4 is a user-programmable LED, and is
controlled by PD0. The CONTROLLEDS.C and FLASHLEDS.C sample programs in the
Dynamic C SAMPLES\RCM3900 folder show how to set up and use this user-
programmable LED.
4.1.3 Other Inputs and Outputs
The status, /RESET_IN, SMODE0, and SMODE1 I/O are normally associated with the
programming port. Since the status pin is not used by the system once a program has been
downloaded and is running, the status pin can then be used as a general-purpose CMOS
output. The programming port is described in more detail in Section 4.2.3.
/RESET_IN is an external input used to reset the Rabbit 3000 microprocessor and the
RCM3900 onboard peripheral circuits. /RES is an output from the reset circuitry that can
be used to reset external peripheral devices.
RabbitCore RCM3900 User’s Manual 33
4.2 Serial Communication
The RCM3900 does not have any serial protocol-level transceivers directly on the board.
However, a serial interface may be incorporated into the board the RCM3900 is mounted
on. For example, the Prototyping Board has RS-232 and RS-485 transceiver chips.
4.2.1 Serial Ports
There are six serial ports designated as Serial Ports A, B, C, D, E, and F. All six serial
ports can operate in an asynchronous mode up to the baud rate of the system clock divided
by 8. An asynchronous port can handle 7 or 8 data bits. A 9th bit address scheme, where
an additional bit is sent to mark the first byte of a message, is also supported.
Serial Port A is normally used as a programming port, but may be used either as an asyn-
chronous or as a clocked serial port once the RCM3900 has been programmed and is oper-
ating in the Run Mode.
Serial Port B is used as the SPI interface for the microSD™ Card, and is not available for
other use.
Serial Ports C and D can also be operated in the clocked serial mode. In this mode, a clock
line synchronously clocks the data in or out. Either of the two communicating devices can
supply the clock.
Serial Ports E and F can also be configured as HDLC serial ports. The IrDA protocol is
also supported in SDLC format by these two ports.
f fl+m
RabbitCore RCM3900 User’s Manual 34
4.2.2 Ethernet Port
Figure 7 shows the pinout for the RJ-45 Ethernet port (J3). Note that some Ethernet
connectors are numbered in reverse to the order used here.
Figure 7. RJ-45 Ethernet Port Pinout
The RJ-45 connector is shielded to minimize EMI effects to/from the Ethernet signals.
The Ethernet chip supports auto MDI/MDIX on the Ethernet port to choose the Ethernet
interface automatically based on whether a crossover cable or a straight-through cable is
used in a particular setup. The Ethernet chip may spike the current draw by up to 200 mA
while it is searching to determine the type of Ethernet cable. This search is repeated every
second if no Ethernet cable is detected. If you do not plan to connect an Ethernet cable,
use the Dynamic C pd_powerdown() function call to turn off the Ethernet chip. The
pd_powerup() function call is available to turn the Ethernet chip back on at a later time.
These function calls are described in the Dynamic C TCP/IP User’s Manual, Volume 1.
Three LEDs are placed next to the RJ-45 Ethernet
jack, one to indicate Ethernet link/activity (LNK/
ACT), one to indicate when the RCM3900 is con-
nected to a functioning 100Base-T network (SPD),
and one (FDX/COL) to indicate whether the Ether-
net connection is in full-duplex mode (steady on) or
that a half-duplex connection is experiencing colli-
sions (blinks).
The transformer/connector assembly ground is con-
nected to the RCM3900 printed circuit board digital
ground via a ferrite bead, L1, as shown in Figure 8.
Figure 8. Ferrite Bead Isolation
ETHERNET
RJ-45 Plug
1. E_Tx+
2. E_Tx
3. E_Rx+
6. E_Rx
18
RJ-45 Jack
RJ-45 Ethernet Jack
L1
Chassis
Ground
Board
Ground
RabbitCore RCM3900 User’s Manual 35
4.2.3 Serial Programming Port
The RCM3900 is programmed either through the serial programming port, which is
accessed using header J1, or through the Ethernet jack. The RabbitLink may be used to
provide a serial connection via the RabbitLink’s Ethernet jack. The programming port
uses the Rabbit 3000’s Serial Port A for communication; Serial Port A is not used when
programming is done over an Ethernet connection via the Dynamic C download manager.
Dynamic C uses the programming port to download and debug programs.
The programming port is also used for the following operations.
Cold-boot the Rabbit 3000 on the RCM3900 after a reset.
Remotely download and debug a program over an Ethernet connection using the
RabbitLink EG2110.
Fast copy designated portions of flash memory from one Rabbit-based board (the
master) to another (the slave) using the Rabbit Cloning Board.
In addition to Serial Port A, the Rabbit 3000 startup-mode (SMODE0, SMODE1), status,
and reset pins are available on the serial programming port.
The two startup mode pins determine what happens after a reset—the Rabbit 3000 is
either cold-booted or the program begins executing at address 0x0000.
The status pin is used by Dynamic C to determine whether a Rabbit microprocessor is
present. The status output has three different programmable functions:
1. It can be driven low on the first op code fetch cycle.
2. It can be driven low during an interrupt acknowledge cycle.
3. It can also serve as a general-purpose CMOS output.
The /RESET_IN pin is an external input that is used to reset the Rabbit 3000 and the
RCM3900 onboard peripheral circuits. The serial programming port can be used to force a
hard reset on the RCM3900 by asserting the /RESET_IN signal.
Alternate Uses of the Serial Programming Port
All three clocked Serial Port A signals are available as
a synchronous serial port
an asynchronous serial port, with the clock line usable as a general CMOS I/O pin
The programming port may also be used as a serial port once the application is running.
The SMODE pins may then be used as inputs and the status pin may be used as an output.
Refer to the Rabbit 3000 Microprocessor Users Manual for more information.
RabbitCore RCM3900 User’s Manual 36
4.3 Serial Programming Cable
The programming cable is used to connect the serial programming port of the RCM3900
to a PC USB COM port. The programming cable converts the voltage levels used by the
PC USB port to the CMOS voltage levels used by the Rabbit 3000.
When the
PROG connector on the programming cable is connected to the RCM3900
serial programming port at header J1, programs can be downloaded and debugged over the
serial interface.
The DIAG connector of the programming cable may be used on header J1 of the RCM3900
with the RCM3900 operating in the Run Mode. This allows the programming port to be
used as a regular serial port.
4.3.1 Changing Between Program Mode and Run Mode
The RCM3900 is automatically in Program Mode when the PROG connector on the pro-
gramming cable is attached, and is automatically in Run Mode when no programming
cable is attached. When the Rabbit 3000 is reset, the operating mode is determined by the
state of the SMODE pins. When the programming cable’s PROG connector is attached,
the SMODE pins are pulled high, placing the Rabbit 3000 in the Program Mode. When the
programming cable’s PROG connector is not attached, the SMODE pins are pulled low,
causing the Rabbit 3000 to operate in the Run Mode.
Figure 9. Switching Between Program Mode and Run Mode
RESET
+BKLT
/CS
LED1
LED3
LED5
GND
GND
A2
A0
D1
D3
D5
D7
RABBITNET
R44
C28
C27
R43
R46
C30C29
R45
Q5
R48
R47
DS7
RELAY NO1 COM1 NC1 NO2 COM2 NC2
K1
KEYPAD DISPLAY BOARD
D8
LCD1JB LCD1JC
+V
/RES
LED0
LED2
LED4
LED6
GND
A3
A1
D0
D2
D4
D6
LCD1JA
J16
BD0
BD1
BD2
BD3
BD4
BD5
BD6
BD7
J15
BA0
BA1
BA2
BA3
LCD
/CS
RELAY RATED
0.5 A @ 30 V
J17
U12
U11
R42
R41
C20
C19
R40
R39
SERIAL FLASH/
MODEM
J7
R2
R7
R3
R4
R5
R6
R9
R8 U6
R10
C6
C1
D1
J2
J1
J4
J6
GND IN3 IN2 IN1 IN0 +5V +5V QD2A QD2B QD1A QD1B GND J5 V MB MDB1 MDB2 MDB3 MDB4 VMB+ VMA+ MDA1 MDA2 MDA3 MDA4 VMA
J3
C2
JP1
C3
JP2
GND
GND
VBT
/RES
SM0
/IOWR
PG5
PG7
PE1
PE4
PE6
PF7
PF5
PB7
PB5
PB3
PB0
J8
NC
+3.3 V
VRAM
SMODE1
/IORD
PG4
PG6
PE0
PE3
PE5
PB6
PB4
PB2
/RES_OUT
PF4 PF6 PE7
RCM3300
PROTOTYPING
BOARD
S1
RESET
J9
S2 S3
ACT
PD7
PD3
PD5
PG3
PG1
PC7
PC5
PC3
PC1
PF0
PF2
PA0
PA2
PA4
PA6
STAT
LINK
PD6
PD2
PD4
PG2
PG0
PC6
PC4
PC2
PC0
PF1
PF3
PA1
PA3
PA5
PA7
GND
JA JB
POWER
GND
+DC
GND
DS1
R1
GND +DC
D2
C8
L1
R11
JP3
R12
C9
C10
C11
C12
JP4
J10
RP1 RP2
R14 C5
BT1
C13
U5
R16 R15
R17
00 01 02 03 04 05 06 07
OUT
OUT
C4
R13
U1
U2
L293D
H-DRIVER
L293D
H-DRIVER
U8
R25 R26 R27 R28
J14 C24
U10
R38
R37
R35
C26
JP5
R36
C23
C21
U9
C22
J13
R33
R34
C17
C18
UX5
UX1
SO20W
UX2
SO20W
DX2
C25
J12
R50
Q6
R49
D4 D5 D6 D7
GND
HO4
HO3
HO2
HO1
R29
R30
R31
R32
CORE
DS2 DS3 DS4 DS5 DS6 TxE RxE GND TxF RxF 485+ GND 485
Q1 Q2 Q3 Q4
C16
R24
R23
R22
R21
CORE MODULE
GND/EGND
U4
GND
GND
+3.3 V
+5 V
+3.3 V
+5 V
U3
UX4
DX1
RX16
RX17
RX13
RX14
RX18
RX15
PF0_CLKD
PF0_QD
J11
C7
U7
R18
R19
R20
C14
C15
CX1
CX2
R55
R56
R57
R58
R63
R64
R65
R66
R59
R62
R60 R61
R52 R53
R51
R54
SOT23-6 SOT23-6
R67
R68
R69
R70
U1
R1
R2
R15
C1
J1
U2
C2
R4
JP1 J2
R5 JP2 JP3 JP4 JP5
R3
Y1 C5
R7
R8
C7
C6
R11
U4
R9
U3
C3
R10
R6
C4
C8
C9
U5
C10
C11
C14
C15
C19
C18
R17
JP7
JP10
JP9
JP8
L1
J3
C22
C23
C27
C33
L2
C35
C12
C16
C20
C21
C24
C13
C17
C25
U6
C28
R18
C37
C29
Y2
R12 R13 R14
C31
C30
R16
C32
C26
C34
C36
R19
U7
R20
R21
C39
C38
R23
R24
R25 R26
1
C44
2
U8
C43
C49
C50
JP12
JP11
C41
C42
JP13
R27
Y3
R22
C40
JP14
C46
U9
C45 R29
R28
R30
Q1
R33 DS1
R34
R35
DS2
DS3
SPD LNK
ACT FDX
COL
BSY
CE
DS4
R32
RCM39XX
D1
U10
Q2
C47
C48
R31
DIAG
PROG
Colored edge
Programming Cable
To
PC USB port
RESET RCM3900 when changing mode:
Momentarily short out pins 2832 on RCM3900 header J62, OR
Press RESET button (if using Prototyping Board), OR
Cycle power off/on
after removing or attaching programming cable.
RabbitCore RCM3900 User’s Manual 37
A program “runs” in either mode, but can only be downloaded and debugged when the
RCM3900 is in the Program Mode.
Refer to the Rabbit 3000 Microprocessor Users Manual for more information on the pro-
gramming port.
4.3.2 Standalone Operation of the RCM3900
The RCM3900 must be programmed via the Prototyping Board or via a similar arrange-
ment on a customer-supplied board. Once the RCM3900 has been programmed success-
fully, remove the serial programming cable from the programming connector and reset the
RCM3900. The RCM3900 may be reset by cycling the power off/on or by pressing the
RESET button on the Prototyping Board. The RCM3900 module may now be removed
from the Prototyping Board for end-use installation.
CAUTION: Disconnect power to the Prototyping Board or other boards when removing
or installing your RCM3900 module to protect against inadvertent shorts across the
pins or damage to the RCM3900 if the pins are not plugged in correctly. Do not reapply
power until you have verified that the RCM3900 module is plugged in correctly.
RabbitCore RCM3900 User’s Manual 38
4.4 Memory
4.4.1 SRAM
RCM3900 boards have 512K of program-execution fast SRAM at U66. The program-
execution SRAM is not battery-backed. There are 512K of battery-backed data SRAM
installed at U9.
4.4.2 Flash EPROM
RCM3900 boards also have 512K of flash EPROM at U8.
NOTE: Rabbit recommends that any customer applications should not be constrained by
the sector size of the flash EPROM since it may be necessary to change the sector size
in the future.
Writing to arbitrary flash memory addresses at run time is discouraged. Instead, use a por-
tion of the “user block” area to store persistent data. The writeUserBlock() and rea-
dUserBlock() function calls are provided for this. Refer to the Rabbit 3000
Microprocessor Designers Handbook and the Dynamic C Function Reference Manual for
additional information.
A Flash Memory Bank Select jumper configuration option based on 0 surface-mounted
resistors exists at header JP12 on the RCM3900 RabbitCore modules. This option, used in
conjunction with some configuration macros, allows Dynamic C to compile two different
co-resident programs for the upper and lower halves of a 256K flash in such a way that both
programs start at logical address 0000. This option is not relevant to the RCM3900 Rab-
bitCore modules, which use 512K flash memories.
4.4.3 NAND Flash (RCM3900 only)
The RCM3900 model has a NAND flash to store data and Web pages. The NAND flash is
particularly suitable for mass-storage applications, but is generally unsuitable for direct
program execution. The NAND flash differs from parallel NOR flash (the type of flash
memory used to store program code on Rabbit-based boards and RabbitCore modules
currently in production) in two respects. First, the NAND flash requires error-correcting
code (ECC) for reliability. Although NAND flash manufacturers do guarantee that block 0
will be error-free, most manufacturers guarantee that a new NAND flash chip will be
shipped with a relatively small percentage of errors, and will not develop more than some
maximum number or percentage of errors over its rated lifetime of up to 100,000 writes.
Second, the standard NAND flash addressing method multiplexes commands, data, and
addresses on the same I/O pins, while requiring that certain control lines must be held stable
for the duration of the NAND flash access. The software function calls provided by Rabbit
for the NAND flash take care of the data-integrity and reliability attributes.
Sample programs in the SAMPLES\RCM3900\NANDFlash folder illustrate the use of the
NAND flash. These sample programs are described in Section 3.2.1, “Use of NAND Flash
(RCM3900 only).”
RabbitCore RCM3900 User’s Manual 39
4.4.4 microSD™ Cards
The RCM3900 supports a removable microSD™ Card up to 1GB to store data and Web
pages. The microSD™ Card is particularly suitable for mass-storage applications, but is
generally unsuitable for direct program execution.
Unlike other flash devices, the microSD™ Card has some intelligence, which facilitates
working with it. You do not have to worry about erased pages. All microSD™ Cards sup-
port 512-byte reads and writes, and handle any necessary pre-erasing internally.
The microSD™ Card socket on the RCM3900 has a plastic insert when shipped to protect
the socket. This insert must be removed before you will be able to insert a microSD™
Card.
Figure 10 shows how to insert or remove the microSD™ Card. The card is designed to fit
easily only one way — do not bend the card or force it into the slot. While you remove or
insert the card, take care to avoid touching the electrical contacts on the bottom of the card
to prevent electrostatic discharge damage to the card and to keep any moisture or other
contaminants off the contacts. You will sense a soft click once the card is completely
inserted. To remove it, gently press the card towards the middle of the RCM3900 — you
will sense a soft click and the card will be ready to be removed. Do not attempt to pull the
card from the socket before pressing it in — otherwise the ejection mechanism will get
damaged. The ejection mechanism is spring-loaded, and will partially eject the card when
used correctly.
Figure 10. Insertion/Removal of microSD Card
Rabbit recommends that you use the microSD™ Card holder at header J2 only for the
microSD™ Card since other devices are not supported. Be careful to remove and insert
the card as described, and be careful not to insert any foreign objects, which may short out
the contacts and lead to the destruction of your card.
U1
R1
R2
R15
C1
J1
U2
C2
R4
JP1 J2
R5 JP2 JP3 JP4 JP5
R3
Y1 C5
R7
R8
C7
C6
R11
U4
R9
U3
C3
R10
R6
C4
C8
C9
U5
C10
C11
C14
C15
C19
C18
R17
JP7
JP10
JP9
JP8
L1
J3
C22
C23
C27
C33
L2
C35
C12
C16
C20
C21
C24
C13
C17
C25
U6
C28
R18
C37
C29
Y2
R12 R13 R14
C31
C30
R16
C32
C26
C34
C36
R19
U7
R20
R21
C39
C38
R23
R24
R25 R26
1
C44
2
U8
C43
C49
C50
JP12
JP11
C41
C42
JP13
R27
Y3
R22
C40
JP14
C46
U9
C45 R29
R28
R30
Q1
R33 DS1
R34
R35
DS2
DS3
SPD LNK
ACT FDX
COL
BSY
CE
DS4
R32
RCM39XX
D1
U10
Q2
C47
C48
R31
RabbitCore RCM3900 User’s Manual 40
It is possible to hot-swap microSD™ Cards without removing power from the RCM3900
modules. The file system partition must be unmounted before the cards can be safely hot-
swapped. The chip selects associated with the card must be set to their inactive state, and
read/write operations addressed to the microSD™ Card port cannot be allowed to occur.
These operations can be initiated in software by sensing an external switch actuated by the
user, and the card can then be removed and replaced with a different one. Once the appli-
cation program detects a new card, the file system partition can be remounted. These steps
allow the microSD™ Card to be installed or removed without affecting either the pro-
gram, which continues to run on the RCM3900 module, or the data stored on the card. The
Dynamic C FAT file system will handle this overhead automatically by unmounting the
microSD™ Card.
NOTE: When using the optional Dynamic C FAT file system module, do not remove or
insert the microSD™ Card while the microSD™ Card is mounted.
You may add an LED to your design or use the BSY LED at DS4 to indicate when the
microSD™ Card is mounted. The LED can be set to turn off when the microSD™ Card is
unmounted, indicating that it is safe to remove it. The BSY LED at DS4 is controlled by
PD0; your own LED would use an available parallel port I/O pin. The following macros in
the Dynamic C LIB\Rabbit3000\SDflash\SDFLASH.LIB library will have to be
modified to identify the parallel port pin and to specify the on/off conditions for the LED.
#define SD_LED_PORT_DR PxDR // where x is the Parallel Port (A–E)
// 0 for no indicator LED
#define SD_LED_PORT_DRSHADOW PxDRShadow // where x is the Parallel Port
// NULL for no indicator LED
#define SD_LED_PORT_FR PxDFR // where x is the Parallel Port (A–E)
// 0 for no indicator LED
#define SD_LED_PORT_FRSHADOW PxFRShadow // where x is the Parallel Port
// NULL for no indicator LED
#define SD_LED_PORT_DDR PxDDR // where x is the Parallel Port (A–E)
// 0 for no indicator LED
#define SD_LED_PORT_DDRSHADOW PxDDRShadow // where x is the Parallel Port
// NULL for no indicator LED
#define SD_LED_PORT_DCR PxCR // where x is the Parallel Port (A–E)
// 0 for no indicator LED
#define SD_LED_PORT_DCRSHADOW PxCRShadow // where x is the Parallel Port
// NULL for no indicator LED
#define SD_LED_PIN n // Identify pin on parallel port (0–7)
// Use 0 for no indicator LED
#define SD_LED_PORT_OD 0 // LED is driven by transistor
// 1 to drive LED directly by open-drain output
#define SD_LED_PORT_ON 1 // 0 for no indicator LED or to drive LED
// directly by open-drain output, otherwise 1
Standard Windows SD Card readers may be used to read the microSD™ Card formatted
by the Dynamic C FAT file system with the RCM3900 as long as it has not been parti-
tioned. An SD Card adapter is included with the microSD™ Card in the in the RCM3900
Development Kit. The SD Card adapter has a sliding switch along the left side that may be
moved down to write-protect the microSD™ Card while it is being used with an SD Card
reader.
RabbitCore RCM3900 User’s Manual 41
Sample programs in the SAMPLES\RCM3900\SD_Flash folder illustrate the use of the
microSD™ Cards. These sample programs are described in Section 3.2.2, “Use of
microSD™ Cards.”
RabbitCore RCM3900 User’s Manual 42
4.5 Other Hardware
4.5.1 Clock Doubler
The RCM3900 takes advantage of the Rabbit 3000 microprocessors internal clock dou-
bler. A built-in clock doubler allows half-frequency crystals to be used to reduce radiated
emissions. The 44.2 MHz frequency specified for the RCM3900 is generated using a
22.12 MHz crystal.
The clock doubler may be disabled if 44.2 MHz clock speeds are not required. This will
reduce power consumption and further reduce radiated emissions. The clock doubler is
disabled with a simple configuration macro as shown below.
4.5.2 Spectrum Spreader
The Rabbit 3000 features a spectrum spreader, which helps to mitigate EMI problems. The
spectrum spreader is on by default, but it may also be turned off or set to a stronger setting.
The means for doing so is through a simple configuration macro as shown below.
NOTE: Refer to the Rabbit 3000 Microprocessor Users Manual for more information
on the spectrum-spreading setting and the maximum clock speed.
1. Select the “Defines” tab from the Dynamic C Options > Project Options menu.
2. Add the line CLOCK_DOUBLED=0 to always disable the clock doubler.
The clock doubler is enabled by default, and usually no entry is needed. If you need to
specify that the clock doubler is always enabled, add the line CLOCK_DOUBLED=1 to
always enable the clock doubler.
3. Click OK to save the macro. The clock doubler will now remain off whenever you are
in the project file where you defined the macro.
1. Select the “Defines” tab from the Dynamic C Options > Project Options menu.
2. Normal spreading is the default, and usually no entry is needed. If you need to specify
normal spreading, add the line
ENABLE_SPREADER=1
For strong spreading, add the line
ENABLE_SPREADER=2
To disable the spectrum spreader, add the line
ENABLE_SPREADER=0
NOTE: The strong spectrum-spreading setting is not recommended since it may limit
the maximum clock speed or the maximum baud rate. It is unlikely that the strong set-
ting will be used in a real application.
3. Click OK to save the macro. The spectrum spreader will now be set to the state specified
by the macro value whenever you are in the project file where you defined the macro.
RabbitCore RCM3900 User’s Manual 43
5. SOFTWARE REFERENCE
Dynamic C is an integrated development system for writing embedded software. It runs on
an IBM-compatible PC and is designed for use with Rabbit controllers and other control-
lers based on the Rabbit microprocessor. Chapter 5 describes the libraries and function
calls related to the RCM3900.
5.1 More About Dynamic C
Dynamic C has been in use worldwide since 1989. It is specially designed for program-
ming embedded systems, and features quick compile and interactive debugging. A com-
plete reference guide to Dynamic C is contained in the Dynamic C Users Manual.
You have a choice of doing your software development in the flash memory or in the static
SRAM included on the RCM3900. The flash memory and SRAM options are selected with
the Options > Program Options > Compiler menu.
The advantage of working in RAM is to save wear on the flash memory, which is limited
to about 100,000 write cycles. The disadvantage is that the code and data might not both
fit in RAM.
NOTE: An application should be run from the program execution SRAM after the serial
programming cable is disconnected. Your final code must always be stored in flash
memory for reliable operation. RCM3900 modules have a fast program execution SRAM
that is not battery-backed. Select Code and BIOS in Flash, Run in RAM from the
Dynamic C Options > Project Options > Compiler menu to store the code in flash
and copy it to the fast program execution SRAM at run-time to take advantage of the
faster clock speed. This option optimizes the performance of RCM3900 modules run-
ning at 44.2 MHz.
NOTE: Do not depend on the flash memory sector size or type in your program logic.
The RCM3900 and Dynamic C were designed to accommodate flash devices with
various sector sizes in response to the volatility of the flash-memory market.
Developing software with Dynamic C is simple. Users can write, compile, and test C and
assembly code without leaving the Dynamic C development environment. Debugging occurs
while the application runs on the target. Alternatively, users can compile a program to an
image file for later loading. Dynamic C runs on PCs under Windows 2000 and later—see
Rabbit’s Technical Note TN257, Running Dynamic C® With Windows Vista®, for
additional information if you are using a Dynamic C release prior to v. 9.60 under Windows
Vista. Programs can be downloaded at baud rates of up to 460,800 bps after the program
compiles.
RabbitCore RCM3900 User’s Manual 44
Dynamic C has a number of standard features.
Full-feature source and/or assembly-level debugger, no in-circuit emulator required.
Royalty-free TCP/IP stack with source code and most common protocols.
Hundreds of functions in source-code libraries and sample programs:
Exceptionally fast support for floating-point arithmetic and transcendental functions.
RS-232 and RS-485 serial communication.
Analog and digital I/O drivers.
I2C, SPI, GPS, file system.
LCD display and keypad drivers.
Powerful language extensions for cooperative or preemptive multitasking
Loader utility program to load binary images into Rabbit targets in the absence of
Dynamic C.
Provision for customers to create their own source code libraries and augment on-line
help by creating “function description” block comments using a special format for
library functions.
Standard debugging features:
Breakpoints—Set breakpoints that can disable interrupts.
Single-stepping—Step into or over functions at a source or machine code level, µC/OS-II aware.
Code disassembly—The disassembly window displays addresses, opcodes, mnemonics, and
machine cycle times. Switch between debugging at machine-code level and source-code level by
simply opening or closing the disassembly window.
Watch expressions—Watch expressions are compiled when defined, so complex expressions
including function calls may be placed into watch expressions. Watch expressions can be updated
with or without stopping program execution.
Register window—All processor registers and flags are displayed. The contents of general registers
may be modified in the window by the user.
Stack window—shows the contents of the top of the stack.
Hex memory dump—displays the contents of memory at any address.
STDIO window—printf outputs to this window and keyboard input on the host PC can be
detected for debugging purposes. printf output may also be sent to a serial port or file.
RabbitCore RCM3900 User’s Manual 45
5.1.1 Developing Programs Remotely with Dynamic C
Dynamic C is an integrated development environment that allows you to edit, compile,
and debug your programs. Dynamic C has the ability to allow programming over the
Internet or local Ethernet. This is accomplished in one of two ways.
1. Via the Rabbit RabbitLink, which allows a Rabbit-based target to have programs down-
loaded to it and debugged with the same ease as exists when the target is connected
directly to a PC.
2. Dynamic C provides sample programs to illustrate the use of a download manager. The
DLM_TCP.C
and
DLP_TCP.C
sample programs found in the Dynamic C
SAMPLES\
DOWN_LOAD
folder, are intended to be compiled to the program flash memory (which is
a parallel flash memory). Custom applications based on these sample programs may
use the NAND flash for data storage.
RabbitCore RCM3900 User’s Manual 46
5.2 Dynamic C Functions
5.2.1 Digital I/O
The RCM3900 was designed to interface with other systems, and so there are no drivers
written specifically for the I/O. The general Dynamic C read and write functions allow
you to customize the parallel I/O to meet your specific needs. For example, use
WrPortI(PEDDR, &PEDDRShadow, 0x00);
to set all the Port E bits as inputs, or use
WrPortI(PEDDR, &PEDDRShadow, 0xFF);
to set all the Port E bits as outputs.
When using the external I/O bus on the Rabbit 3000 chip, add the line
#define PORTA_AUX_IO // required to enable auxiliary I/O bus
to the beginning of any programs using the auxiliary I/O bus.
The sample programs in the Dynamic C
SAMPLES/RCM3900
folder provide further
examples.
5.2.2 SRAM Use
The RCM3900 has a battery-backed data SRAM and a program-execution SRAM.
Dynamic C provides the
protected
keyword to identify variables that are to be placed
into the battery-backed SRAM. The compiler generates code that creates a backup copy of
a protected variable before the variable is modified. If the system resets while the protected
variable is being modified, the variable's value can be restored when the system restarts.
The sample code below shows how a protected variable is defined and how its value can
be restored.
protected nf_device nandFlash;
int main() {
...
_sysIsSoftReset(); // restore any protected variables
The
bbram
keyword may be used instead if there is a need to store a variable in battery-
backed SRAM without affecting the performance of the application program. Data integ-
rity is not assured when a reset or power failure occurs during the update process.
Additional information on
bbram
and
protected
variables is available in the Dynamic C
Users Manual.
RabbitCore RCM3900 User’s Manual 47
5.2.3 Serial Communication Drivers
Library files included with Dynamic C provide a full range of serial communications sup-
port. The
LIB\Rabbit3000\RS232.LIB
library provides a set of circular-buffer-based
serial functions. The
LIB\Rabbit3000\PACKET.LIB
library provides packet-based
serial functions where packets can be delimited by the 9th bit, by transmission gaps, or
with user-defined special characters. Both libraries provide blocking functions, which do
not return until they are finished transmitting or receiving, and nonblocking functions,
which must be called repeatedly until they are finished, allowing other functions to be per-
formed between calls. For more information, see the Dynamic C Function Reference
Manual and Technical Note TN213, Rabbit Serial Port Software.
5.2.4 TCP/IP Drivers
The TCP/IP drivers are located in the
LIB\Rabbit3000\TCPIP
folder. Complete informa-
tion on these libraries and the TCP/IP functions is provided in the Dynamic C TCP/IP
Users Manual.
5.2.5 NAND Flash Drivers
The Dynamic C
LIB\Rabbit3000\NANDFlash\NFLASH.LIB
library is used to interface
to NAND flash memory devices on the RCM3900. The function calls were written specif-
ically to work with industry-standard flash devices with a 528-byte page program and
16896-byte block erase size. The NAND flash function calls are designed to be closely
cross-compatible with the newer serial flash function calls found in the
LIB\Rabbit3000\
SFLASH.LIB
library. These function calls use an
nf_device
structure as a handle for a
specific NAND flash device. This allows multiple NAND flash devices to be used by an
application.
More information on these function calls is available in the Dynamic C Function Refer-
ence Manual.
The NAND flash is ideally suited to store files with a directory structure. The Dynamic C
FAT file system module provides support for a file system for use in a Rabbit-based
system. The supporting documentation for the Dynamic C FAT File System and the sample
programs in the SAMPLES\FileSystem\FAT folder illustrate the use of the Dynamic C
FAT file system.
RabbitCore RCM3900 User’s Manual 48
5.2.6 microSD™ Card Drivers
The Dynamic C
LIB\
SDflash\SDFLASH.LIB library is used to interface to microSD™
Card memory devices on an SPI bus. More information on these function calls is available
in the Dynamic C Function Reference Manual.
Application developers are cautioned against modifying the BIOS code to insert application-
specific external I/O (IOE) instructions before the GOCR register and its shadow are initial-
ized by the standard BIOS code. Such IOE code will cause the microSD™ Card select to
toggle, possibly interfering with the microSD™ Card operation.
The microSD™ Card is ideally suited to store files with a directory structure. The Dynamic
C FAT file system included with Dynamic C provides support for a file system and for for-
matting the microSD™ Card for use in a Rabbit-based system. This allows files to be read
and written in a PC-compatible manner. The supporting documentation for the Dynamic C
FAT File System and the sample programs in the SAMPLES\FileSystem\FAT folder
illustrate the use of the Dynamic C FAT file system.
NOTE: Dynamic C has a utility for partitioning storage devices. Rabbit recommends that
you do not partition the microSD™ Card since doing so would make it not PC-compati-
ble.
RabbitCore RCM3900 User’s Manual 49
5.2.7 Prototyping Board Function Calls
The functions described in this section are for use with the Prototyping Board features.
The source code is in the Dynamic C SAMPLES\RCM3900\RCM39xx.LIB library if you
need to modify it for your own board design.
Other generic functions applicable to all devices based on Rabbit microprocessors are
described in the Dynamic C Function Reference Manual.
5.2.7.1 Board Initialization
brdInit
void brdInit (void);
DESCRIPTION
Call this function at the beginning of your program. This function initializes Parallel
Ports A through G for use with the Prototyping Board.
This function call is intended for demonstration purposes only, and can be modified for
your applications.
Summary of Initialization
1. I/O port pins are configured for Prototyping Board operation.
2. Unused configurable I/O are set as tied inputs or outputs.
3. The external I/O bus is enabled.
4. The LCD/keypad module is disabled.
5. RS-485 is not enabled.
6. RS-232 is not enabled.
7. LEDs are off.
8. Ethernet select is disabled.
9. Motor control is disabled.
10. The relay is set to normally closed positions.
RETURN VALUE
None.
RabbitCore RCM3900 User’s Manual 50
5.2.7.2 Digital I/O
digIn
int digIn(int channel);
DESCRIPTION
Reads the input state of a digital input on headers J5 and J6 on the Prototyping Board.
Do not use this function call if you configure these pins for alternate use after
brdI-
nit()
is called.
A runtime error will occur if
brdInit()
has not been called first.
PARAMETER
channel
the channel number corresponding to the digital input channel:
0—IN0
1—IN1
2—IN2
3—IN3
4—QD1B
5—QD1A
6—QD2B
7—QD2A
RETURN VALUE
The logic state (0 or 1) of the input. A run-time error will occur if the
channel
parameter is out of range.
SEE ALSO
brdInit
RabbitCore RCM3900 User’s Manual 51
digOut
void digOut(int channel, int value);
DESCRIPTION
Writes a value to an output channel on Prototyping Board header J10. Do not use this
function if you have installed the stepper motor chips at U2 and U3.
PARAMETERS
channel output channel 0–7 (OUT00–OUT07).
value value (0 or 1) to output.
RETURN VALUE
None.
SEE ALSO
brdInit
RabbitCore RCM3900 User’s Manual 52
5.2.7.3 Switches, LEDs, and Relay
switchIn
int switchIn(int swin);
DESCRIPTION
Reads the state of a switch input.
A runtime error will occur if
brdInit()
has not been called first or if the
swin
parameter is invalid.
PARAMETERS
swin
switch input to read:
2—S2
3—S3
RETURN VALUE
State of the switch input:
1 = open
0 = closed
SEE ALSO
brdInit
RabbitCore RCM3900 User’s Manual 53
ledOut
void ledOut(int led, int value);
DESCRIPTION
Controls LEDs on the Prototyping Board and on the RCM3900.
A runtime error will occur if
brdInit()
has not been called first.
PARAMETERS
led the LED to control:
0 = red BSY LED on RCM3900
3 = DS3 on Prototyping Board
4 = DS4 on Prototyping Board
5 = DS5 on Prototyping Board
6 = DS6 on Prototyping Board
value
the value used to control the LED:
0 = off
1 = on
RETURN VALUE
None.
SEE ALSO
brdInit
RabbitCore RCM3900 User’s Manual 54
relayOut
void relayOut(int relay, int value);
DESCRIPTION
Sets the position for the relay common contact. The default position is for normally
closed contacts.
A runtime error will occur if
brdInit()
has not been called first.
PARAMETERS
relay the one relay (1)
value the value used to connect the relay common contact:
0 = normally closed positions (NC1 and NC2)
1 = normally open positions (NO1 and NO2)
RETURN VALUE
None.
SEE ALSO
brdInit
RabbitCore RCM3900 User’s Manual 55
5.2.7.4 Serial Communication
ser485Tx
void ser485Tx(void);
DESCRIPTION
Enables the RS-485 transmitter. Transmitted data are echoed back into the receive data
buffer. The echoed data may be used as an indicator for disabling the transmitter by using
one of the following methods:
Byte mode—disable the transmitter after the same byte that is transmitted is detected in the
receive data buffer.
Block data mode—disable the transmitter after the same number of bytes transmitted are
detected in the receive data buffer.
Remember to call the
serXopen()
function before running this function.
RETURN VALUE
None.
SEE ALSO
ser485Rx
ser485Rx
void ser485Rx(void);
DESCRIPTION
Disables the RS-485 transmitter. This puts the device into the listen mode, which allows
it to receive data from the RS-485 interface.
Remember to call the
serXopen()
function before running this function.
RETURN VALUE
None.
SEE ALSO
ser485Tx
RabbitCore RCM3900 User’s Manual 56
5.3 Upgrading Dynamic C
Dynamic C patches that focus on bug fixes are available from time to time. Check the Web
site www.rabbit.com/support/ for the latest patches, workarounds, and bug fixes.
5.3.1 Extras
Dynamic C installations are designed for use with the board they are included with, and
are included at no charge as part of our low-cost kits.
Starting with Dynamic C version 9.60, which is included with the RCM3900 Development
Kit, 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 the Secure Sockets Layer (SSL)
and a specific Advanced Encryption Standard (AES) library.
In addition 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.
WWWW
RabbitCore RCM3900 User’s Manual 57
6. USING THE TCP/IP FEATURES
6.1 TCP/IP Connections
Programming and development can be done with the RCM3900 modules without connect-
ing the Ethernet port to a network. However, if you will be running the sample programs
that use the Ethernet capability or will be doing Ethernet-enabled development, you should
connect the RCM3900 module’s Ethernet port at this time.
Before proceeding you will need to have the following items.
If you don’t have Ethernet access, you will need at least a 10Base-T Ethernet card
(available from your favorite computer supplier) installed in a PC.
One Cat. 5 straight through or crossover Ethernet cable.
A Cat. 5 straight-through and a Cat. 5 crossover Ethernet cable are included in the
RCM3900 Development Kit. Figure 11 shows how to identify the two cables based on the
wires in the transparent RJ-45 connectors.
Figure 11. How to Identify Straight-Through and Crossover Ethernet Cables
Ethernet cables and a 10Base-T Ethernet hub are available in a TCP/IP tool kit. More
information is available at www.rabbit.com.
Crossover
Cable
Straight-
Through
Cable
Same
color order
in connectors
Different
color order
in connectors
RabbitCore RCM3900 User’s Manual 58
Now you should be able to make your connections.
1. Connect the AC adapter and the programming cable as shown in Chapter 2, “Getting
Started.”
2. Ethernet Connections
There are four options for connecting the RCM3900 module to a network for develop-
ment and runtime purposes. The first two options permit total freedom of action in
selecting network addresses and use of the “network,” as no action can interfere with
other users. We recommend one of these options for initial development.
No LAN The simplest alternative for desktop development. Connect the RCM3900
module’s Ethernet port directly to the PC’s network interface card using either a Cat. 5
crossover cable or a Cat. 5 straight-through cable.
Micro-LAN — Another simple alternative for desktop development. Use a small
Ethernet 10Base-T hub and connect both the PC’s network interface card and the
RCM3900 module’s Ethernet port to it using standard network cables.
The following options require more care in address selection and testing actions, as
conflicts with other users, servers and systems can occur:
LAN — Connect the RCM3900 module’s Ethernet port to an existing LAN, preferably
one to which the development PC is already connected. You will need to obtain IP
addressing information from your network administrator.
WAN — The RCM3900 is capable of direct connection to the Internet and other Wide
Area Networks, but exceptional care should be used with IP address settings and all
network-related programming and development. We recommend that development and
debugging be done on a local network before connecting a RabbitCore system to the
Internet.
TIP: Checking and debugging the initial setup on a micro-LAN is recommended before
connecting the system to a LAN or WAN.
The PC running Dynamic C does not need to be the PC with the Ethernet card.
3. Apply Power
Plug in the AC adapter. The RCM3900 module and Prototyping Board are now ready to
be used.
RabbitCore RCM3900 User’s Manual 59
6.2 TCP/IP Primer on IP Addresses
Obtaining IP addresses to interact over an existing, operating, network can involve a number
of complications, and must usually be done with cooperation from your ISP and/or network
systems administrator. For this reason, it is suggested that the user begin instead by using a
direct connection between a PC and the RCM3900.
In order to set up this direct connection, you will have to use a PC without networking, or
disconnect a PC from the corporate network, or install a second Ethernet adapter and set
up a separate private network attached to the second Ethernet adapter. Disconnecting your
PC from the corporate network may be easy or nearly impossible, depending on how it is
set up. If your PC boots from the network or is dependent on the network for some or all
of its disks, then it probably should not be disconnected. If a second Ethernet adapter is
used, be aware that Windows TCP/IP will send messages to one adapter or the other,
depending on the IP address and the binding order in Microsoft products. Thus you should
have different ranges of IP addresses on your private network from those used on the cor-
porate network. If both networks service the same IP address, then Windows may send a
packet intended for your private network to the corporate network. A similar situation will
take place if you use a dial-up line to send a packet to the Internet. Windows may try to
send it via the local Ethernet network if it is also valid for that network.
The following IP addresses are set aside for local networks and are not allowed on the
Internet: 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, and 192.168.0.0 to
192.168.255.255.
The RCM3900 uses a 10/100-compatible Ethernet connection. The RJ-45 connectors are
similar to U.S. style telephone connectors, except they are larger and have 8 contacts.
An alternative to the direct connection is a connection using a hub. The hub relays packets
received on any port to all of the ports on the hub. Hubs are low in cost and are readily
available. The RCM3900 uses 10/100 Mbps Ethernet, so the hub or Ethernet adapter
should be a 10/100 Mbps unit.
In a corporate setting where the Internet is brought in via a high-speed line, there are typi-
cally machines between the outside Internet and the internal network. These machines
include a combination of proxy servers and firewalls that filter and multiplex Internet traf-
fic. In the configuration below, the RCM3900 could be given a fixed address so any of the
computers on the local network would be able to contact it. It may be possible to configure
the firewall or proxy server to allow hosts on the Internet to directly contact the controller,
but it would probably be easier to place the controller directly on the external network out-
side of the firewall. This avoids some configuration complications by sacrificing some
security.
RabbitCore RCM3900 User’s Manual 60
If your system administrator can give you an Ethernet cable along with the network IP
address, the netmask and the gateway address, then you may be able to run the sample
programs without having to setup a direct connection between your computer and the
RCM3900. You will also need the IP address of the nameserver, the name or IP address of
your mail server, and your domain name for some of the sample programs.
Hub(s)
Firewall
Proxy
Server
T1 in
Adapter
Ethernet Ethernet
Network
RCM3900
System
Typical Corporate Network
RabbitCore RCM3900 User’s Manual 61
6.2.1 IP Addresses Explained
IP (Internet Protocol) addresses are expressed as 4 decimal numbers separated by periods,
for example:
216.103.126.155
10.1.1.6
Each decimal number must be between 0 and 255. The total IP address is a 32-bit number
consisting of the 4 bytes expressed as shown above. A local network uses a group of adja-
cent IP addresses. There are always 2N IP addresses in a local network. The netmask (also
called subnet mask) determines how many IP addresses belong to the local network. The
netmask is also a 32-bit address expressed in the same form as the IP address. An example
netmask is:
255.255.255.0
This netmask has 8 zero bits in the least significant portion, and this means that 28
addresses are a part of the local network. Applied to the IP address above
(216.103.126.155), this netmask would indicate that the following IP addresses belong to
the local network:
216.103.126.0
216.103.126.1
216.103.126.2
etc.
216.103.126.254
216.103.126.255
The lowest and highest address are reserved for special purposes. The lowest address
(216.102.126.0) is used to identify the local network. The highest address
(216.102.126.255) is used as a broadcast address. Usually one other address is used for the
address of the gateway out of the network. This leaves 256 - 3 = 253 available IP
addresses for the example given.
RabbitCore RCM3900 User’s Manual 62
6.2.2 How IP Addresses are Used
The actual hardware connection via an Ethernet uses Ethernet adapter addresses (also
called MAC addresses). These are 48-bit addresses and are unique for every Ethernet
adapter manufactured. In order to send a packet to another computer, given the IP address
of the other computer, it is first determined if the packet needs to be sent directly to the
other computer or to the gateway. In either case, there is an Ethernet address on the local
network to which the packet must be sent. A table is maintained to allow the protocol
driver to determine the MAC address corresponding to a particular IP address. If the table
is empty, the MAC address is determined by sending an Ethernet broadcast packet to all
devices on the local network asking the device with the desired IP address to answer with
its MAC address. In this way, the table entry can be filled in. If no device answers, then
the device is nonexistent or inoperative, and the packet cannot be sent.
Some IP address ranges are reserved for use on internal networks, and can be allocated
freely as long as no two internal hosts have the same IP address. These internal IP
addresses are not routed to the Internet, and any internal hosts using one of these reserved
IP addresses cannot communicate on the external Internet without being connected to a
host that has a valid Internet IP address. The host would either translate the data, or it
would act as a proxy.
Each RCM3900 RabbitCore module has its own unique MAC address, which consists of
the prefix 0090C2 followed by a code that is unique to each RCM3900 module. For exam-
ple, a MAC address might be 0090C2C002C0.
TIP: You can always obtain the MAC address on your board by running the sample pro-
gram DISPLAY_MAC.C from the SAMPLES\TCPIP folder.
RabbitCore RCM3900 User’s Manual 63
6.2.3 Dynamically Assigned Internet Addresses
In many instances, devices on a network do not have fixed IP addresses. This is the case
when, for example, you are assigned an IP address dynamically by your dial-up Internet
service provider (ISP) or when you have a device that provides your IP addresses using
the Dynamic Host Configuration Protocol (DHCP). The RCM3900 modules can use such
IP addresses to send and receive packets on the Internet, but you must take into account
that this IP address may only be valid for the duration of the call or for a period of time,
and could be a private IP address that is not directly accessible to others on the Internet.
These addresses can be used to perform some Internet tasks such as sending e-mail or
browsing the Web, but it is more difficult to participate in conversations that originate
elsewhere on the Internet. If you want to find out this dynamically assigned IP address,
under Windows 98 you can run the winipcfg program while you are connected and look
at the interface used to connect to the Internet.
Many networks use IP addresses that are assigned using DHCP. When your computer
comes up, and periodically after that, it requests its networking information from a DHCP
server. The DHCP server may try to give you the same address each time, but a fixed IP
address is usually not guaranteed.
If you are not concerned about accessing the RCM3900 from the Internet, you can place
the RCM3900 on the internal network using an IP address assigned either statically or
through DHCP.
RabbitCore RCM3900 User’s Manual 64
6.3 Placing Your Device on the Network
In many corporate settings, users are isolated from the Internet by a firewall and/or a
proxy server. These devices attempt to secure the company from unauthorized network
traffic, and usually work by disallowing traffic that did not originate from inside the net-
work. If you want users on the Internet to communicate with your RCM3900, you have
several options. You can either place the RCM3900 directly on the Internet with a real
Internet address or place it behind the firewall. If you place the RCM3900 behind the fire-
wall, you need to configure the firewall to translate and forward packets from the Internet
to the RCM3900.
RabbitCore RCM3900 User’s Manual 65
6.4 Running TCP/IP Sample Programs
We have provided a number of sample programs demonstrating various uses of TCP/IP for
networking embedded systems. These programs require you to connect your PC and the
RCM3900 board together on the same network. This network can be a local private net-
work (preferred for initial experimentation and debugging), or a connection via the Internet.
RCM3900
User’s PC
Cat. 5
Ethernet
cable
Direct Connection
(network of 2 computers)
RCM3900
Hub
Ethernet
cables
To additional
network
elements
Direct Connection Using a Hub
System System
RabbitCore RCM3900 User’s Manual 66
6.4.1 How to Set IP Addresses in the Sample Programs
With the introduction of Dynamic C 7.30 we have taken steps to make it easier to run
many of our sample programs. You will see a TCPCONFIG macro. This macro tells
Dynamic C to select your configuration from a list of default configurations. You will
have three choices when you encounter a sample program with the TCPCONFIG macro.
1. You can replace the TCPCONFIG macro with individual MY_IP_ADDRESS, MY_NET-
MASK, MY_GATEWAY, and MY_NAMESERVER macros in each program.
2. You can leave TCPCONFIG at the usual default of 1, which will set the IP configurations
to 10.10.6.100, the netmask to 255.255.255.0, and the nameserver and gateway
to 10.10.6.1. If you would like to change the default values, for example, to use an IP
address of 10.1.1.2 for the RCM3900 board, and 10.1.1.1 for your PC, you can edit
the values in the section that directly follows the “General Configuration” comment in
the TCP_CONFIG.LIB library. You will find this library in the LIB\TCPIP directory.
3. You can create a CUSTOM_CONFIG.LIB library and use a TCPCONFIG value greater
than 100. Instructions for doing this are at the beginning of the TCP_CONFIG.LIB
library in the LIB\TCPIP directory.
There are some other “standard” configurations for TCPCONFIG that let you select differ-
ent features such as DHCP. Their values are documented at the top of the TCP_CON-
FIG.LIB library in the LIB\TCPIP directory. More information is available in the
Dynamic C TCP/IP Users Manual.
RabbitCore RCM3900 User’s Manual 67
6.4.2 How to Set Up your Computer for Direct Connect
Follow these instructions to set up your PC or notebook. Check with your administrator if
you are unable to change the settings as described here since you may need administrator
privileges. The instructions are specifically for Windows 2000, but the interface is similar
for other versions of Windows.
TIP: If you are using a PC that is already on a network, you will disconnect the PC from
that network to run these sample programs. Write down the existing settings before
changing them to facilitate restoring them when you are finished with the sample pro-
grams and reconnect your PC to the network.
1. Go to the control panel (Start > Settings > Control Panel), and then double-click the
Network icon.
2. Select the network interface card used for the Ethernet interface you intend to use (e.g.,
TCP/IP Xircom Credit Card Network Adapter) and click on the “Properties” button.
Depending on which version of Windows your PC is running, you may have to select
the “Local Area Connection” first, and then click on the “Properties” button to bring up
the Ethernet interface dialog. Then “Configure” your interface card for a “10Base-T
Half-Duplex” or an “Auto-Negotiation” connection on the “Advanced” tab.
NOTE: Your network interface card will likely have a different name.
3. Now select the IP Address tab, and check Specify an IP Address, or select TCP/IP and
click on “Properties” to assign an IP address to your computer (this will disable “obtain
an IP address automatically”):
IP Address : 10.10.6.101
Netmask : 255.255.255.0
Default gateway : 10.10.6.1
4. Click <OK> or <Close> to exit the various dialog boxes.
RCM3900
User’s PC
Cat. 5
Ethernet
cable
IP 10.10.6.101
Netmask
255.255.255.0
Direct Connection PC to RCM3900 Board
System
RabbitCore RCM3900 User’s Manual 68
6.5 Run the PINGME.C Sample Program
Connect a Cat. 5 Ethernet cable from your computers Ethernet port to the RCM3900
board’s RJ-45 Ethernet connector. Open this sample program from the SAMPLES\TCPIP\
ICMP folder, compile the program, and start it running under Dynamic C. When the program
starts running, the green LNK/ACT light on the RCM3900 module should be on to indicate
an Ethernet connection is made. (Note: If the LNK/ACT light does not light and you are
using a hub, check that the power is not off on the hub.)
The next step is to ping the board from your PC. This can be done by bringing up the MS-
DOS window and running the pingme program:
ping 10.10.6.100
or by Start > Run
and typing the entry
ping 10.10.6.100
Notice that the green LNK/ACT light flashes on the RCM3900 module while the ping is
taking place, and indicates the transfer of data. The ping routine will ping the board four
times and write a summary message on the screen describing the operation.
6.6 Running Additional Sample Programs With Direct Connect
The sample programs discussed here are in the Dynamic C SAMPLES\RCM3900\TCPIP\
folder.
The program BROWSELED.C demonstrates how to make the RCM3900 board be a Web
server. Two “LEDs” are created on the Web page, along with two buttons to toggle them.
Users can change the status of the lights from the Web browser. The LEDs on the Proto-
typing Board match the ones on the Web page. As long as you have not modified the
TCPCONFIG 1 macro in the sample program, enter the following server address in your
Web browser to bring up the Web page served by the sample program.
http://10.10.6.100.
Otherwise use the TCP/IP settings you entered in the TCP_CONFIG.LIB library.
The optional LCD/keypad module (see Appendix C) must be plugged in to the RCM3900
Prototyping Board when using this sample program. The sample program MBOXDEMO.C
implements a Web server that allows e-mail messages to be entered and then shown on the
LCD/keypad module. The keypad allows the user to scroll within messages, flip to other
e-mails, mark messages as read, and delete e-mails. When a new e-mail arrives, an LED
(on the Prototyping Board and LCD/keypad module) turns on, then turns back off once the
message has been marked as read. A log of all e-mail actions is kept, and can be displayed
in the Web browser. All current e-mails can also be read with the Web browser.
The sample program PINGLED.C demonstrates ICMP by pinging a remote host. It will
flash LEDs DS1 and DS2 on the Prototyping Board when a ping is sent and received.
RabbitCore RCM3900 User’s Manual 69
The sample program SMTP.C allows you to send an e-mail when a switch on the Prototyp-
ing Board is pressed. Follow the instructions included with the sample program. LED DS1
on the Prototyping Board will light up when sending e-mail. Note that pin PB7 is con-
nected to both switch S2 and to the external I/O bus on the Prototyping Board, and so
switch S2 should not be used with Ethernet operations.
6.6.1 RabbitWeb Sample Programs
The sample programs can be found in the SAMPLES\RCM3900\TCPIP\RABBITWEB
folder.
BLINKLEDS.C—This program demonstrates a basic example to change the rate at
which the DS1 and DS2 LEDs on the Prototyping Board blink.
DOORMONITOR.C—The optional LCD/keypad module (see Appendix C) must be plugged
in to the RCM3900 Prototyping Board when using this sample program. This program
demonstrates adding and monitoring passwords entered via the LCD/keypad module.
SPRINKLER.C—This program demonstrates how to schedule times for the digital out-
puts in a 24-hour period using the Prototyping Board.
The Web page uses the following setup.
Station 1 is connected to the relay on Prototyping Board header J17.
Station 2 is connected to OUT00 on Prototyping Board header J10.
Station 3 is connected to OUT01 on Prototyping Board header J10.
Zones 1, 2 and 3 are watering areas where stations are turned on or off at different times.
The Pages/sprinkler.zhtml page associated with this sample program demonstrates
the corresponding scripting features.
The real-time clock must be set before you compile and run this sample program — see
Section 3.2.4 for information on sample programs that show how to set the real-time
clock.
Once you compile and run this sample program, open the Web page, enter the times for
the various zones and stations, then press the Submit button to update the settings.
You may connect Rabbit’s Demonstration Board to the Prototyping Board's relay and
two outputs to view the on and off intervals via the LEDs on the Demonstration Board.
The Demonstration Board is not included with the Development Kit, but may be pur-
chased separately
RabbitCore RCM3900 User’s Manual 70
6.7 Where Do I Go From Here?
NOTE: If you purchased your RCM3900 through a distributor or through a Rabbit part-
ner, 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/.
If the sample programs ran fine, you are now ready to go on.
Additional sample programs are described in the Dynamic C TCP/IP Users Manual.
Please refer to the Dynamic C TCP/IP Users Manual to develop your own applications.
An Introduction to TCP/IP provides background information on TCP/IP, and is available
on the CD and on our Web site.
RabbitCore RCM3900 User’s Manual 71
APPENDIX A. RCM3900 SPECIFICATIONS
Appendix A provides the specifications for the RCM3900, and describes the conformal
coating.
RabbitCore RCM3900 User’s Manual 72
A.1 Electrical and Mechanical Characteristics
Figure A-1 shows the mechanical dimensions for the RCM3900.
Figure A-1. RCM3900 Dimensions
NOTE: All measurements are in inches followed by millimeters enclosed in parentheses.
All dimensions have a manufacturing tolerance of ±0.01" (0.2 mm).
U1
R1
R2
R15
C1
J1
U2
C2
R4
JP1 J2
R5 JP2 JP3 JP4 JP5
R3
Y1 C5
R7
R8
C7
C6
R11
U4
R9
U3
C3
R10
R6
C4
C8
C9
U5
C10
C11
C14
C15
C19
C18
R17
JP7
JP10
JP9
JP8
L1
J3
C22
C23
C27
C33
L2
C35
C12
C16
C20
C21
C24
C13
C17
C25
U6
C28
R18
C37
C29
Y2
R12 R13 R14
C31
C30
R16
C32
C26
C34
C36
R19
U7
R20
R21
C39
C38
R23
R24
R25 R26
1
C44
2
U8
C43
C49
C50
JP12
JP11
C41
C42
JP13
R27
Y3
R22
C40
JP14
C46
U9
C45 R29
R28
R30
Q1
R33 DS1
R34
R35
DS2
DS3
SPD LNK
ACT FDX
COL
BSY
CE
DS4
R32
RCM39XX
D1
U10
Q2
C47
C48
R31
0.55
(14)
0.100
dia
(2.5)
0.087
(2.2)
0.245
(6.2)
0.86
(22)
J61J62
2.725
(69.2)
1.850
(47.0)
0.690
(17.5)
0.47
(11.9)
1.850
(47.0)
1.320
(33.5)
1.375
(34.9)
0.980
(24.9)
0.178
(4.5)
Please refer to the RCM3900
footprint diagram later in
this appendix for precise
header locations.
0.063
(1.6)
The height of connector J2
is 0.095" (2.4 mm).
0.12
(3.0)
0.17
(4.3)
0.97
(24.7)
RabbitCore RCM3900 User’s Manual 73
It is recommended that you allow for an “exclusion zone” of 0.04" (1 mm) around the
RCM3900 in all directions when the RCM3900 is incorporated into an assembly that
includes other printed circuit boards. An “exclusion zone” of 0.16" (4 mm) is recom-
mended below the RCM3900 when the RCM3900 is plugged into another assembly using
the shortest connectors for header J1. Figure A-2 shows this “exclusion zone.”
Figure A-2. RCM3900 “Exclusion Zone”
0.08
(2)
0.08
(2)
J61J62
Exclusion
Zone
2.725
(69.2)
1.850
(47.0)
0.6
(16)
0.6
(16)
2.81
(71.2)
1.93
(49.0)
RabbitCore RCM3900 User’s Manual 74
Table A-1 lists the electrical, mechanical, and environmental specifications for the RCM3900.
Table A-1. RabbitCore RCM3900 Specifications
Parameter RCM3900 RCM3910
Microprocessor Low-EMI Rabbit® 3000 at 44.2 MHz
EMI Reduction Spectrum spreader for reduced EMI (radiated emissions)
Ethernet Port 10/100Base-T, RJ-45, 3 LEDs
SRAM 512K program (fast SRAM) + 512K data
Flash Memory
(program) 512K
Memory
(data storage)
32MB (fixed NAND flash)
+ 128MB–1GB microSD™
Card
128MB–1GB microSD™ Card
LED Indicators
LINK/ACT (link/activity)
FDX/COL (full-duplex/collisions)
SPEED (on for 100Base-T Ethernet connection)
CE/BSY (not used/user-programmable)
Backup Battery Connection for user-supplied backup battery
(to support RTC and data SRAM)
General-Purpose
I/O
52 parallel digital I/0 lines:
• 44 configurable I/O
• 4 fixed inputs
• 4 fixed outputs
Additional Inputs Startup mode (2), reset in
Additional
Outputs Status, reset out
External I/O Bus Can be configured for 8 data lines and
5 address lines (shared with parallel I/O lines), plus I/O read/write
Serial Ports
Five 3.3 V, CMOS-compatible ports (shared with I/O)
all 5 configurable as asynchronous (with IrDA)
3 configurable as clocked serial (SPI)
2 configurable as SDLC/HDLC
1 asynchronous serial port dedicated for programming
Serial Rate Maximum asynchronous baud rate = CLK/8
Slave Interface
A slave port allows the RCM3900/RCM3910 to be used as an
intelligent peripheral device slaved to a master processor, which
may either be another Rabbit 3000 or any other type of processor
Real-Time Clock Yes
Timers Ten 8-bit timers (6 cascadable, 3 reserved for internal peripherals),
one 10-bit timer with 2 match registers
Watchdog/Superv
isor Yes
RabbitCore RCM3900 User’s Manual 75
Pulse-Width
Modulators
4 PWM registers with 10-bit free-running counter
and priority interrupts
Input Capture 2-channel input capture can be used to time input signals from
various port pins
Quadrature
Decoder
2-channel quadrature decoder accepts inputs from external
incremental encoder modules
Power 3.15–3.45 V DC
325 mA @ 44.2 MHz, 3.3 V
Operating
Temperature -20°C to +85°C
Humidity 5% to 95%, noncondensing
Connectors
Two 2 × 17, 2 mm pitch
One 2 × 5 for programming with 1.27 mm pitch
One microSD™ Card socket
Board Size 1.850" × 2.725" × 0.86"
(47 mm × 69 mm × 22 mm)
Table A-1. RabbitCore RCM3900 Specifications (continued)
Parameter RCM3900 RCM3910
RabbitCore RCM3900 User’s Manual 76
A.1.1 Headers
The RCM3900 uses headers at J61 and J62 for physical connection to other boards. J61
and J62 are 2 × 17 SMT headers with a 2 mm pin spacing. J1, the programming port, is a
2 × 5 header with a 1.27 mm pin spacing.
Figure A-3 shows the layout of another board for the RCM3900 to be plugged into. These
values are relative to the mounting hole.
Figure A-3. User Board Footprint for RCM3900
J1
1.125
(28.6)
1.341
(34.1)
RCM3900 Series
Footprint
0.079
(2.0)
0.100
dia
(2.5)
0.020 sq typ
(0.5)
0.079
(2.0)
0.314
(8.0)
1.199
(30.4)
1.136
(28.9)
0.328
(8.3)
0.010
(0.25)
J61
J62
0.953
(24.2)
1.043
(26.5)
1.205
(30.6)
1.121
(28.5)
1.375
(34.9)
0.475
(12.1)
1.405
(35.7)
RabbitCore RCM3900 User’s Manual 77
A.2 Bus Loading
You must pay careful attention to bus loading when designing an interface to the
RCM3900. This section provides bus loading information for external devices.
Table A-2 lists the capacitance for the various RCM3900 I/O ports.
Table A-3 lists the external capacitive bus loading for the various RCM3900 output ports.
Be sure to add the loads for the devices you are using in your custom system and verify
that they do not exceed the values in Table A-3.
Table A-2. Capacitance of Rabbit 3000 I/O Ports
I/O Ports
Input
Capacitance
(pF)
Output
Capacitance
(pF)
Parallel Ports A to G 12 14
Table A-3. External Capacitive Bus Loading -40°C to +85°C
Output Port Clock Speed
(MHz)
Maximum External
Capacitive Loading (pF)
All I/O lines with clock
doubler enabled 22.1 100
+ F A? +4 FAR
RabbitCore RCM3900 User’s Manual 78
Figure A-4 shows a typical timing diagram for the Rabbit 3000 microprocessor external
I/O read and write cycles.
Figure A-4. I/O Read and Write Cycles—No Extra Wait States
NOTE: /IOCSx can be programmed to be active low (default) or active high.
Tadr
Tadr
External I/O Read (one programmed wait state)
CLK
A[15:0]
External I/O Write (one programmed wait state)
CLK
A[15:0]
/IORD
valid
T1 Tw
T1 Tw T2
valid
T2
/BUFEN
/IOCSx
/IOWR
/BUFEN
D[7:0] valid
Tsetup
Thold
/CSx
/IOCSx
TCSx
TIOCSx
TIORD
TBUFEN
TCSx
TIOCSx
TIORD
TBUFEN
valid
D[7:0]
/CSx
TCSx
TIOCSx
TIOWR
TCSx
TIOCSx
TIOWR
TBUFEN TBUFEN
TDHZV TDVHZ
RabbitCore RCM3900 User’s Manual 79
Table A-4 lists the delays in gross memory access time.
The measurements are taken at the 50% points under the following conditions.
T = -40°C to 85°C, V = VDD ±10%
Internal clock to nonloaded CLK pin delay 1 ns @ 85°C/3.0 V
The clock to address output delays are similar, and apply to the following delays.
Tadr, the clock to address delay
TCSx, the clock to memory chip select delay
TIOCSx, the clock to I/O chip select delay
TIORD, the clock to I/O read strobe delay
TIOWR, the clock to I/O write strobe delay
TBUFEN, the clock to I/O buffer enable delay
The data setup time delays are similar for both Tsetup and Thold.
When the spectrum spreader is enabled with the clock doubler, every other clock cycle is
shortened (sometimes lengthened) by a maximum amount given in the table above. The
shortening takes place by shortening the high part of the clock. If the doubler is not
enabled, then every clock is shortened during the low part of the clock period. The maxi-
mum shortening for a pair of clocks combined is shown in the table.
Technical Note TN227, Interfacing External I/O with Rabbit 2000/3000 Designs, con-
tains suggestions for interfacing I/O devices to the Rabbit 3000 microprocessors.
Table A-4. Data and Clock Delays VIN ±10%, Temp, -40°C–+85°C (maximum)
VIN
Clock to Address Output Delay
(ns) Data Setup
Time Delay
(ns)
Spectrum Spreader Delay
(ns)
30 pF 60 pF 90 pF Normal
no dbl/dbl
Strong
no dbl/dbl
3.3 V 6 8 11 1 3/4.5 4.5/9
RabbitCore RCM3900 User’s Manual 80
A.3 Rabbit 3000 DC Characteristics
Stresses beyond those listed in Table A-5 may cause permanent damage. The ratings are
stress ratings only, and functional operation of the Rabbit 3000 chip at these or any other
conditions beyond those indicated in this section is not implied. Exposure to the absolute
maximum rating conditions for extended periods may affect the reliability of the Rabbit
3000 chip.
Table A-6 outlines the DC characteristics for the Rabbit 3000 at 3.3 V over the recom-
mended operating temperature range from TA = –55°C to +85°C, VDD = 3.0 V to 3.6 V.
Table A-5. Rabbit 3000 Absolute Maximum Ratings
Symbol Parameter Maximum Rating
TAOperating Temperature -55° to +85°C
TSStorage Temperature -65° to +150°C
Maximum Input Voltage:
Oscillator Buffer Input
5-V-tolerant I/O
VDD + 0.5 V
5.5 V
VDD Maximum Operating Voltage 3.6 V
Table A-6. 3.3 Volt DC Characteristics
Symbol Parameter Test Conditions Min Typ Max Units
VDD Supply Voltage 3.0 3.3 3.6 V
VIH High-Level Input Voltage 2.0 V
VIL Low-Level Input Voltage 0.8 V
VOH High-Level Output Voltage IOH = 6.8 mA,
VDD = VDD (min)
0.7 x
VDD V
VOL Low-Level Output Voltage IOL = 6.8 mA,
VDD = VDD (min) 0.4 V
IIH High-Level Input Current
(absolute worst case, all buffers)
VIN = VDD,
VDD = VDD (max) 10 µA
IIL Low-Level Input Current
(absolute worst case, all buffers)
VIN = VSS,
VDD = VDD (max) -10 µA
IOZ
High-Impedance State
Output Current
(absolute worst case, all buffers)
VIN = VDD or VSS,
VDD = VDD (max), no pull-up -10 10 µA
RabbitCore RCM3900 User’s Manual 81
A.4 I/O Buffer Sourcing and Sinking Limit
Unless otherwise specified, the Rabbit I/O buffers are capable of sourcing and sinking
6.8 mA of current per pin at full AC switching speed. Full AC switching assumes a
22.1 MHz CPU clock and capacitive loading on address and data lines of less than 100 pF
per pin. The absolute maximum operating voltage on all I/O is 5.5 V.
Table A-7 shows the AC and DC output drive limits of the parallel I/O buffers when the
Rabbit 3000 is used in the RCM3900.
Under certain conditions, you can exceed the limits outlined in Table A-7. See the Rabbit
3000 Microprocessor Users Manual for additional information.
Table A-7. I/O Buffer Sourcing and Sinking Capability
Pin Name
Output Drive (Full AC Switching)
Sourcing/Sinking Limits
(mA)
Sourcing Sinking
All data, address, and I/O
lines with clock doubler
enabled
6.8 6.8
RabbitCore RCM3900 User’s Manual 82
A.5 Conformal Coating
The areas around the 32 kHz real-time clock crystal oscillator have had the Dow Corning
silicone-based 1-2620 conformal coating applied. The conformally coated area is shown
in Figure A-5. The conformal coating protects these high-impedance circuits from the
effects of moisture and contaminants over time.
Figure A-5. RCM3900 Areas Receiving Conformal Coating
Any components in the conformally coated area may be replaced using standard soldering
procedures for surface-mounted components. A new conformal coating should then be
applied to offer continuing protection against the effects of moisture and contaminants.
NOTE: For more information on conformal coatings, refer to Rabbit’s Technical Note
303, Conformal Coatings in the online document suite.
Conformally coated
areas
U1
R1
R2
R15
C1
J1
U2
C2
R4
JP1 J2
R5 JP2 JP3 JP4 JP5
R3
Y1 C5
R7
R8
C7
C6
R11
U4
R9
U3
C3
R10
R6
C4
C8
C9
U5
C10
C11
C14
C15
C19
C18
R17
JP7
JP10
JP9
JP8
L1
J3
C22
C23
C27
C33
L2
C35
C12
C16
C20
C21
C24
C13
C17
C25
U6
C28
R18
C37
C29
Y2
R12 R13 R14
C31
C30
R16
C32
C26
C34
C36
R19
U7
R20
R21
C39
C38
R23
R24
R25 R26
1
C44
2
U8
C43
C49
C50
JP12
JP11
C41
C42
JP13
R27
Y3
R22
C40
JP14
C46
U9
C45 R29
R28
R30
Q1
R33 DS1
R34
R35
DS2
DS3
SPD LNK
ACT FDX
COL
BSY
CE
DS4
R32
RCM39XX
D1
U10
Q2
C47
C48
R31
//I||\\\
RabbitCore RCM3900 User’s Manual 83
A.6 Jumper Configurations
Figure A-6 shows the header locations used to configure the various RCM3900 options
via jumpers.
Figure A-6. Location of RCM3900 Configurable Positions
Table A-8 lists the configuration options.
Table A-8. RCM3900 Jumper Configurations
Header Description Pins Connected Factory
Default
JP1 Serial Flash Chip Enable Indicator 1–2 n.c.
JP2 ACT or PD1 Output
on J61 pin 34
1–2 ACT ×
2–3 PD1
JP3 LINK or PD0 Output
on J61 pin 33
1–2 LINK ×
2–3 PD0
JP4 ENET or PE0 Output
on J62 pin 19
1–2 ENET
2–3 PE0 ×
JP5 NAND Flash Chip Enable
1–2 Reserved for future use
2–3 PD1 controls NAND Flash RCM3900
only
JP13
JP14
JP2
JP3
JP4
JP5
JP11
JP12
JP7
JP8
JP9
JP10
JP1
RCM3900
Top Side
RabbitCore RCM3900 User’s Manual 84
NOTE: The jumper connections are made using 0 surface-mounted resistors.
JP7 PD6 or TPI– Input
on J61 pin 31
1–2 TPI–
2–3 PD6 ×
JP8 PD7 or TPI+ Input
on J61 pin 32
1–2 TPI+
2–3 PD7 ×
JP9 PD2 or TPO– Output
on J61 pin 29
1–2 TPO–
n.c.
2–3 PD2
JP10 PD3 or TPO+ Output
on J61 pin 30
1–2 TPO+
2–3 PD3 ×
JP11 Flash Memory Size
1–2 256K
2–3 512K ×
JP12 Flash Memory Bank Select
1–2 Normal Mode ×
2–3 Bank Mode
JP13 Data SRAM Size
1–2 256K
2–3 512K ×
JP14 LED DS1 Display
1–2 FDX/COL displayed by LED DS1 ×
2–3 Optional ACT displayed by LED
DS1
Table A-8. RCM3900 Jumper Configurations
Header Description Pins Connected Factory
Default
RabbitCore RCM3900 User’s Manual 85
APPENDIX B. PROTOTYPING BOARD
Appendix B describes the features and accessories of the Prototyping Board.
ge r5< _="" m390="" du‘e="" eclurs="" sev="">
RabbitCore RCM3900 User’s Manual 86
B.1 Introduction
The Prototyping Board included in the Development Kit makes it easy to connect an
RCM3900 module to a power supply and a PC workstation for development. It also pro-
vides some basic I/O peripherals (RS-232, RS-485, a relay, LEDs, and switches), as well
as a prototyping area for more advanced hardware development.
For the most basic level of evaluation and development, the Prototyping Board can be
used without modification.
As you progress to more sophisticated experimentation and hardware development, modi-
fications and additions can be made to the board without modifying or damaging the
RCM3900 module itself.
The Prototyping Board is shown below in Figure B-1, with its main features identified.
Figure B-1. Prototyping Board
+BKLT
/CS
LED1
LED3
LED5
GND
GND
A2
A0
D1
D3
D5
D7
RABBITNET
R44
C28
C27
R43
R46
C30C29
R45
Q5
R48
R47
DS7
RELAY NO1 COM1 NC1 NO2 COM2 NC2
K1
KEYPAD DISPLAY BOARD
D8
LCD1JB LCD1JC
+V
/RES
LED0
LED2
LED4
LED6
GND
A3
A1
D0
D2
D4
D6
LCD1JA
J16
BD0
BD1
BD2
BD3
BD4
BD5
BD6
BD7
J15
BA0
BA1
BA2
BA3
LCD
/CS
RELAY RATED
0.5 A @ 30 V
J17
U12
U11
R42
R41
C20
C19
R40
R39
SERIAL FLASH/
MODEM
J7
R2
R7
R3
R4
R5
R6
R9
R8 U6
R10
C6
C1
D1
J2
J1
J4
J6
GND IN3 IN2 IN1 IN0 +5V +5V QD2A QD2B QD1A QD1B GND J5 VMB MDB1 MDB2 MDB3 MDB4 VMB+ VMA+ MDA1 MDA2 MDA3 MDA4 VMA
J3
C2
JP1
C3
JP2
GND
GND
VBT
/RES
SM0
/IOWR
PG5
PG7
PE1
PE4
PE6
PF7
PF5
PB7
PB5
PB3
PB0
J8
NC
+3.3 V
VRAM
SMODE1
/IORD
PG4
PG6
PE0
PE3
PE5
PB6
PB4
PB2
/RES_OUT
PF4 PF6 PE7
RCM3300
PROTOTYPING
BOARD
S1
RESET
J9
S2 S3
ACT
PD7
PD3
PD5
PG3
PG1
PC7
PC5
PC3
PC1
PF0
PF2
PA0
PA2
PA4
PA6
STAT
LINK
PD6
PD2
PD4
PG2
PG0
PC6
PC4
PC2
PC0
PF1
PF3
PA1
PA3
PA5
PA7
GND
JA JB
POWER
GND
+DC
GND
DS1
R1
GND +DC
D2
C8
L1
R11
JP3
R12
C9
C10
C11
C12
JP4
J10
RP1 RP2
R14 C5
BT1
C13
U5
R16 R15
R17
00 01 02 03 04 05 06 07
OUT
OUT
C4
R13
U1
U2
L293D
H-DRIVER
L293D
H-DRIVER
U8
R25 R26 R27 R28
J14 C24
U10
R38
R37
R35
C26
JP5
R36
C23
C21
U9
C22
J13
R33
R34
C17
C18
UX5
UX1
SO20W
UX2
SO20W
DX2
C25
J12
R50
Q6
R49
D4 D5 D6 D7
GND
HO4
HO3
HO2
HO1
R29
R30
R31
R32
CORE
DS2 DS3 DS4 DS5 DS6 TxE RxE GND TxF RxF 485+ GND 485
Q1 Q2 Q3 Q4
C16
R24
R23
R22
R21
CORE MODULE
GND/EGND
U4
GND
GND
+3.3 V
+5 V
+3.3 V
+5 V
U3
UX4
DX1
RX16
RX17
RX13
RX14
RX18
RX15
PF0_CLKD
PF0_QD
J11
C7
U7
R18
R19
R20
C14
C15
CX1
CX2
R55
R56
R57
R58
R63
R64
R65
R66
R59
R62
R60 R61
R52 R53
R51
R54
SOT23-6 SOT23-6
R67
R68
R69
R70
Voltage
Regulators
Power
Input
Power
LED
Reset
Switch
User
LEDs
Module
Extension Header
+5 V, 3.3 V, and
GND Buses
RCM3900
Module
Connectors
RS-232
Signals
User
Switches
SMT Prototyping
Area
LCD/Keypad
Module
Connections
RabbitNet
Port
Through-Hole
Prototyping Area
{
Core
LED
{
{
RS-485 Relay User
LED
{
Relay
Terminals
{
H-Bridge
Motor Driver
Terminals
{
Quadrature
Decoder
Terminals
{
Digital
Inputs
Module
Extension Header Serial Flash
Socket
RabbitCore RCM3900 User’s Manual 87
B.1.1 Prototyping Board Features
Power Connection—A power-supply jack and a 3-pin header are provided for con-
nection to the power supply. Note that the 3-pin header is symmetrical, with both outer
pins connected to ground and the center pin connected to the raw V+ input. The cable
of the AC adapter provided with Development Kit ends in a 3-pin plug that connects to
the 3-pin header (J2)—the center pin of J2 is always connected to the positive terminal,
and either edge pin is negative.
Users providing their own power supply should ensure that it delivers 8–30 V DC at 1 A.
Regulated Power Supply—The raw DC voltage provided at the POWER IN jack is
routed to a 5 V switching voltage regulator, then to a separate 3.3 V linear regulator.
The regulators provide stable power to the RCM3900 module and the Prototyping
Board. The voltage regulators will get warm while in use.
Power LED—The power LED lights whenever power is connected to the Prototyping
Board.
Core LED—The core LED lights whenever an RCM3900 module is plugged in cor-
rectly on the Prototyping Board and the RCM3900 module is not being reset.
Relay LED—The relay LED lights whenever the Prototyping Board relay is energized.
Reset Switch—A momentary-contact, normally open switch is connected directly to the
RCM3900’s /RESET_IN pin. Pressing the switch forces a hardware reset of the system.
I/O Switches and LEDs—Two momentary-contact, normally open switches are con-
nected to the PG0 and PG1 pins of the RCM3900 module and may be read as inputs by
sample applications.
Four user LEDs (DS3–DS6) are connected to alternate I/O bus pins PA0–PA3 pins of
the RCM3900 module via U8, and may be driven as output indicators. PE7 and PG5
control the registers in U8 as shown in the sample applications.
Prototyping Area—A generous prototyping area has been provided for the installation
of through-hole components. +3.3 V, +5 V, and Ground buses run along one edge of
this area. Several areas for surface-mount devices are also available. Each SMT pad is
connected to a hole designed to accept a 30 AWG solid wire.
LCD/Keypad Module—Rabbit’s LCD/keypad module may be plugged in directly to
headers LCD1JA, LCD1JB, and LCD1JC. The signals on headers LCD1JB and
LCD1JC will be available only if the LCD/keypad module is plugged in to header
LCD1JA. Appendix C provides complete information for mounting and using the
LCD/keypad module.
RabbitCore RCM3900 User’s Manual 88
Module Extension Headers—The complete pin set of the RCM3900 module is dupli-
cated at headers J8 and J9. Developers can solder wires directly into the appropriate
holes, or, for more flexible development, 2 × 17 header strips with a 0.1" pitch can be
soldered into place. See Figure B-4 for the header pinouts.
Digital I/O—Four digital inputs are available on screw-terminal header J6. See
Figure B-4 for the header pinouts.
RS-232—Two 3-wire serial ports or one 5-wire RS-232 serial port are available on the
Prototyping Board at screw-terminal header J14.
RS-485—One RS-485 serial port is available on the Prototyping Board at screw-termi-
nal header J14.
Quadrature Decoder—Four quadrature decoder inputs (PF0–PF3) from the Rabbit
3000 chip are available on screw-terminal header J5. See Figure B-4 for the header pin-
outs.
H-Bridge Motor Driver—Two pairs of H-bridge motor drivers are supported using
screw-terminal headers J3 and J4 on the Prototyping Board for stepper-motor control.
See Figure B-4 for the header pinouts.
RabbitNet Port—One RS-422 RabbitNet port (shared with the serial flash interface) is
available to allow RabbitNet peripheral cards to be used with the Prototyping Board.
The Prototyping Board cannot be used with RabbitNet peripheral cards when the
RCM3900/RCM3910 is installed.
Serial Flash Interface—One serial flash interface (shared with the RabbitNet port) is
available to allow Rabbit’s SF1000 series serial flash to be used on the Prototyping
Board. The Prototyping Board cannot be used with the SF1000 series of serial flash
memories when the RCM3900/RCM3910 is installed.
mfl :EEE :EEE 9?? Egg wax-11mm “min mg; m Mm. m u F” We m“? 0"
RabbitCore RCM3900 User’s Manual 89
B.2 Mechanical Dimensions and Layout
Figure B-2 shows the mechanical dimensions and layout for the Prototyping Board.
Figure B-2. Prototyping Board Dimensions
NOTE: All measurements are in inches followed by millimeters enclosed in parentheses.
+BKLT
/CS
LED1
LED3
LED5
GND
GND
A2
A0
D1
D3
D5
D7
RABBITNET
R44
C28
C27
R43
R46
C30C29
R45
Q5
R48
R47
DS7
RELAY NO1 COM1 NC1 NO2 COM2 NC2
K1
KEYPAD DISPLAY BOARD
D8
LCD1JB LCD1JC
+V
/RES
LED0
LED2
LED4
LED6
GND
A3
A1
D0
D2
D4
D6
LCD1JA
J16
BD0
BD1
BD2
BD3
BD4
BD5
BD6
BD7
J15
BA0
BA1
BA2
BA3
LCD
/CS
RELAY RATED
0.5 A @ 30 V
J17
U12
U11
R42
R41
C20
C19
R40
R39
SERIAL FLASH/
MODEM
J7
R2
R7
R3
R4
R5
R6
R9
R8 U6
R10
C6
C1
D1
J2
J1
J4
J6
GND IN3 IN2 IN1 IN0 +5V +5V QD2A QD2B QD1A QD1B GND J5 VMB MDB1 MDB2 MDB3 MDB4 VMB+ VMA+ MDA1 MDA2 MDA3 MDA4 VMA
J3
C2
JP1
C3
JP2
GND
GND
VBT
/RES
SM0
/IOWR
PG5
PG7
PE1
PE4
PE6
PF7
PF5
PB7
PB5
PB3
PB0
J8
NC
+3.3 V
VRAM
SMODE1
/IORD
PG4
PG6
PE0
PE3
PE5
PB6
PB4
PB2
/RES_OUT
PF4 PF6 PE7
RCM3300
PROTOTYPING
BOARD
S1
RESET
J9
S2 S3
ACT
PD7
PD3
PD5
PG3
PG1
PC7
PC5
PC3
PC1
PF0
PF2
PA0
PA2
PA4
PA6
STAT
LINK
PD6
PD2
PD4
PG2
PG0
PC6
PC4
PC2
PC0
PF1
PF3
PA1
PA3
PA5
PA7
GND
JA JB
POWER
GND
+DC
GND
DS1
R1
GND +DC
D2
C8
L1
R11
JP3
R12
C9
C10
C11
C12
JP4
J10
RP1 RP2
R14 C5
BT1
C13
U5
R16 R15
R17
00 01 02 03 04 05 06 07
OUT
OUT
C4
R13
U1
U2
L293D
H-DRIVER
L293D
H-DRIVER
U8
R25 R26 R27 R28
J14 C24
U10
R38
R37
R35
C26
JP5
R36
C23
C21
U9
C22
J13
R33
R34
C17
C18
UX5
UX1
SO20W
UX2
SO20W
DX2
C25
J12
R50
Q6
R49
D4 D5 D6 D7
GND
HO4
HO3
HO2
HO1
R29
R30
R31
R32
CORE
DS2 DS3 DS4 DS5 DS6 TxE RxE GND TxF RxF 485+ GND 485
Q1 Q2 Q3 Q4
C16
R24
R23
R22
R21
CORE MODULE
GND/EGND
U4
GND
GND
+3.3 V
+5 V
+3.3 V
+5 V
U3
UX4
DX1
RX16
RX17
RX13
RX14
RX18
RX15
PF0_CLKD
PF0_QD
J11
C7
U7
R18
R19
R20
C14
C15
CX1
CX2
R55
R56
R57
R58
R63
R64
R65
R66
R59
R62
R60 R61
R52 R53
R51
R54
SOT23-6 SOT23-6
R67
R68
R69
R70
Battery
6.75
(171)
5.25
(133)
RabbitCore RCM3900 User’s Manual 90
Table B-1 lists the electrical, mechanical, and environmental specifications for the Proto-
typing Board.
Table B-1. Prototyping Board Specifications
Parameter Specification
Board Size 5.25" × 6.75" × 1.00" (133 mm × 171 mm × 25 mm)
Operating Temperature –20°C to +70°C
Humidity 5% to 95%, noncondensing
Input Voltage 8 V to 30 V DC
Maximum Current Draw
(including user-added circuits)
800 mA max. for +3.3 V supply,
1 A total +3.3 V and +5 V combined
Backup Battery CR2032, 3 V lithium coin-type
Digital Inputs
4 inputs pulled up, ± 36 V DC,
switching threshold 0.9–2.3 V typical
Digital Outputs
4 sinking outputs,+30 V DC, 500 mA maximum per channel
8 CMOS-level outputs if stepper motor not installed
Relay SPDT relay, 500 mA @ 30 V
Serial Ports two 3-wire RS-232 or one RS-232 with RTS/CTS
one RS-485
Other Serial Interfaces RabbitNet RS-422 port or serial flash interface*
* This interface is not available when the RCM3900/RCM3910 is installed.
Other Interfaces
stepper motor control
quadrature decoder
LCD/keypad module
LEDs
Seven LEDs
one power on indicator
one RCM3900 module indicator
four user-configurable LEDs
one relay indicator
Prototyping Area Throughhole, 0.1" spacing, additional space for SMT
components
Connectors
two 2 × 17, 2 mm pitch sockets for RCM3900 module
one 2 × 5, 2 mm pitch socket for serial flash*
six screw-terminal headers for serial ports, digital inputs,
stepper motor control, quadrature decoder, and relay
contacts
one RJ-45 RabbitNet jack*
Standoffs/Spacers 7, accept 4-40 x 1/2 screws
RabbitCore RCM3900 User’s Manual 91
B.3 Power Supply
The RCM3900 requires a regulated 3.15 V to 3.45 V DC power source to operate.
Depending on the amount of current required by the application, different regulators can
be used to supply this voltage.
The Prototyping Board has an onboard +5 V switching power regulator from which a
+3.3 V linear regulator draws its supply. Thus both +5 V and +3.3 V are available on the
Prototyping Board.
The Prototyping Board itself is protected against reverse polarity by a diode at D1 as
shown in Figure B-3.
Figure B-3. Prototyping Board Power Supply
LINEAR POWER
REGULATOR
POWER
IN
J4
10 µF
LM1117
U4
+3.3 V
3
1
2
1
2
3
DL4003
D1
47 µF 330 µF
+5 V
L1
C1
330 µH
D2
1N5819
SWITCHING POWER REGULATOR
DCIN U1
LM2575
10 µF
a akax‘sx‘ ex‘oask eaesta J7 11 P\_|_1
RabbitCore RCM3900 User’s Manual 92
B.4 Using the Prototyping Board
The Prototyping Board is actually both a demonstration board and a prototyping board. As
a demonstration board, it can be used with the sample programs to demonstrate the func-
tionality of the
RCM3900
right out of the box without any modifications.
The Prototyping Board pinouts are shown in Figure B-4.
Figure B-4. Prototyping Board Pinout
DS7
RELAY
LED
J16
J15
J17
J11
J7
J2
J1
J4 J6
J5
J3
J8
J9
Power
GND
+DC
GND
DS1
J10
J14
J13
J12
Core
LED
VMB+
MDB4
MDB3
MDB2
MDB1
VMB
GND
QD1B
QD1A
QD2B
QD2A
+5 v
+5 V
IN0
IN1
IN2
IN3
GND
TxE
RxE
GND
TxF
RxF
485+
GND
485
OUT00
OUT01
OUT02
OUT03
OUT04
OUT05
OUT06
OUT07
GND
VCC
PC0_TxD
PD2_CE
PD4_DCD
PC1_RxD
PF0_CLK_RES
PD3_RNET_/RTS
PD6_/CTRL
PD5_/CTS
LCD_/CS
BA0
BA1
BA2
BA3
BD0
BD1
BD2
BD3
BD4
BD5
BD6
BD7
DS2 DS3 DS4 DS5 DS6
User
LEDs
RELAY
CONTACTS
Stepper-Motor
Control
Quadrature
Decoder
Digital
Inputs
RS-232 RS-485
PB0
PC5
PC4
GND
HOUT4
HOUT3
HOUT2
HOUT1
Digital
Outputs
(sinking)
VMA
MDA4
MDA3
MDA2
MDA1
VMA+
NC2
COM2
NO2
NC1
COM1
NO1
n.c.
+3.3 V
VRAM
SMODE1
/IORD
PG4
PG6
PE0
PE3
PE5
PE7
PF6
PF4
PB6
PB4
PB2
/RES_OUT
GND
GND
VBT
/RES
SMODE0
/IOWR
PG5
PG7
PE1
PE4
PE6
PF7
PF5
PB7
PB5
PB3
PB0
ACT
PD7
PD3
PD5
PG3
PG1
PC7
PC5
PC3
PC1
PF0
PF2
PA0
PA2
PA4
PA6
STATUS
LINK
PD6
PD2
PD4
PG2
PG0
PC6
PC4
PC2
PC0
PF1
PF3
PA1
PA3
PA5
PA7
GND
RabbitCore RCM3900 User’s Manual 93
The Prototyping Board comes with the basic components necessary to demonstrate the
operation of the RCM3900. Four user LEDs (DS3–DS6) are connected to alternate I/O
bus pins PA0–PA3 pins of the RCM3900 module via U8, and may be driven as output
indicators when controlled by PE7 and PG5 as shown in the sample applications. Two
switches (S2 and S3) are connected to PG0 and PG1 to demonstrate the interface to the
Rabbit 3000 microprocessor. Reset switch S1 is the hardware reset for the RCM3900.
The
Prototyping Board provides the user with RCM3900 connection points brought out con-
veniently to labeled points at J8 and J9 on the Prototyping Board. Although locations J8 and
J9 are unstuffed, 2 × 17 headers are included in the bag of parts.
RS-232 and RS-485 signals are available on screw-terminal header J14, quadrature
decoder inputs are available on screw-terminal header J5, and digital inputs are available
on screw-terminal header J6. A 1 × 5 header strip from the bag of parts may be installed at
J12 for four sinking digital outputs. The clocked Serial Port B signals from the RCM3900
are used for the microSD™ Card, and cannot be accessed via header J13 on the Prototyp-
ing Board.
If you don’t plan to use the LCD/keypad module, additional signals may be brought out on 1 × 5
and 1 × 8 headers from the bag of parts that you install at J15 and J16. If you don’t plan to
use the stepper-motor control option, additional CMOS outputs are available via a 1 × 8
header that you install at J10.
There is a through-hole prototyping space available on the Prototyping Board.
The holes in
the prototyping area are spaced at 0.1" (2.5 mm).
+3.3 V, +5 V, and GND traces run along
one edges of the
prototyping area
.
Small to medium circuits can be prototyped using point-
to-point wiring with 20 to 30 AWG wire between the prototyping area, the
+3.3 V, +5 V, and
GND traces,
and the surrounding area where surface-mount components may be installed.
Small holes are provided around the surface-mounted components that may be installed
around the prototyping area.
B.4.1 Adding Other Components
There are two sets of pads for 6-pin, 16-pin, and 28-pin devices that can be used for sur-
face-mount prototyping devices. There are also pads that can be used for SMT resistors
and capacitors in an 0805 SMT package. Each component has every one of its pin pads
connected to a hole in which a 30 AWG wire can be soldered (standard wire wrap wire can
be soldered in for point-to-point wiring on the Prototyping Board). Because the traces are
very thin, carefully determine which set of holes is connected to which surface-mount pad.
RabbitCore RCM3900 User’s Manual 94
B.4.2 Digital I/O
B.4.2.1 Digital Inputs
The Prototyping Board has four digital inputs, IN0–IN3, each of which is protected over a
range of –36 V to +36 V. The inputs are pulled up to +3.3 V as shown in Figure B-5.
Figure B-5. Prototyping Board Digital Inputs
The four quadrature decoder inputs on screw-terminal header J5 may be used as inputs
IN4–IN7. To use the PF0 signal from the Rabbit microprocessor, which goes to QD1B,
remember to reconfigure the jumper on header JP3 to jumper pins 1–2.
The actual switching threshold is between 0.9 V and 2.3 V. Anything below this value is a
logic 0, and anything above is a logic 1.
The digital inputs are each fully protected over a range of -36 V to +36 V, and can handle
short spikes of ±40 V.
JP6
22 kW
27 kW
+3.3 V
GND
®
VC mm
RabbitCore RCM3900 User’s Manual 95
B.4.3 CMOS Digital Outputs
If the stepper-motor option is not used, eight CMOS-level digital outputs are available at
J10, and can each handle up to 25 mA.
B.4.4 Sinking Digital Outputs
Four sinking digital outputs shared with LEDs DS3–DS6 are available at J12, and can each
handle up to 500 mA. Figure B-6 shows a wiring diagram for a typical sinking output.
Figure B-6. Prototyping Board Sinking Digital Outputs
B.4.5 Relay Outputs
Figure B-7 shows the contact connections for the relay on the Prototyping Board. A diode
across the coil provides a return path for inductive spikes, and snubbers across the relay
contacts protect the relay contacts from inductive spikes.
Figure B-7. Prototyping Board Relay Output Contact Connections
The relay is driven by pin PA4 of the RCM3900 module via U8, and is controlled by PE7
and PG5 as shown in the sample applications.
Vcc
330 W
1 kW
ADD DIODE
WHEN LOAD
IS INDUCTIVE
7
8
9
1
10
COM1
NO1
NC1
4
3
2
COM2
NO2
NC2
+3.3 V
47 W100 nF
47 W100 nF
J17
123
®
456
47 W100 nF
47 W100 nF
RabbitCore RCM3900 User’s Manual 96
B.4.6 Serial Communication
The Prototyping Board allows you to access up to three of the serial ports from the
RCM3900/RCM3910. Table B-2 summarizes the configuration options.
Ordinarily, Serial Port D must be configured either to allow J7 to be used as a RabbitNet
port or to allow J11 to be used as a serial interface for the SF1000 series serial flash. When
other RabbitCore modules supplied with this Prototyping Board in their Development Kit
are plugged into the Prototyping Board, PD2 is configured in software to enable the RS-422
transceiver for the RabbitNet SPI interface. PD2 is not brought out from the RCM3900/
RCM3910. Serial Port D may be used as a serial port via the Prototyping Board when the
RCM3900/RCM3910 is installed with PC0 and PC1 to a serial transceiver of your own in
the prototyping area.
Table B-2. Prototyping Board Serial Port Configurations
Serial Port Signal Header Configured via Default Use Alternate Use
CJ14JP5*
* RS-485 termination and bias resistors are configured via header JP5.
RS-485
DJ7
JP3 RabbitNet/SF1000
interface
This interface is not available when the RCM3900/RCM3910 is installed.
Rabbit 3000
quadrature decoder
J11
EJ14 RS-232
FJ14 RS-232
RabbitCore RCM3900 User’s Manual 97
B.4.6.1 RS-232
RS-232 serial communication on the Prototyping Board is supported by an RS-232 trans-
ceiver installed at U9. This transceiver provides the voltage output, slew rate, and input
voltage immunity required to meet the RS-232 serial communication protocol. Basically,
the chip translates the Rabbit 3000’s signals to RS-232 signal levels. Note that the polarity
is reversed in an RS-232 circuit so that a +5 V output becomes approximately -10 V and 0
V is output as +10 V. The RS-232 transceiver also provides the proper line loading for
reliable communication.
RS-232 can be used effectively at the RCM3900 module’s maximum baud rate for distances
of up to 15 m.
RS-232 flow control on an RS-232 port is initiated in software using the
serXflowcontrolOn() function call from the
LIB\
RS232.LIB, where X is the serial
port (E or F). The locations of the flow control lines are specified using a set of five macros.
SERX_RTS_PORT—Data register for the parallel port that the RTS line is on (e.g., PGDR).
SERX_RTS_SHADOW—Shadow register for the RTS line's parallel port (e.g., PGDRShadow).
SERX_RTS_BIT—The bit number for the RTS line.
SERX_CTS_PORT—Data register for the parallel port that the CTS line is on (e.g., PCDRShadow).
SERX_CTS_BIT—The bit number for the CTS line.
Standard 3-wire RS-232 communication using Serial Ports E and F is illustrated in the fol-
lowing sample code.
#define EINBUFSIZE 15 // set size of circular buffers in bytes
#define EOUTBUFSIZE 15
#define FINBUFSIZE 15
#define FOUTBUFSIZE 15
#define MYBAUD 115200 // set baud rate
#endif
main(){
serEopen(_MYBAUD); // open Serial Ports E and F
serFopen(_MYBAUD);
serEwrFlush(); // flush their input and transmit buffers
serErdFlush();
serFwrFlush();
serFrdFlush();
serEclose(_MYBAUD); // close Serial Ports C and D
serFclose(_MYBAUD);
}
[\mmmjfimw:
RabbitCore RCM3900 User’s Manual 98
B.4.6.2 RS-485
The Prototyping Board has one RS-485 serial channel, which is connected to the Rabbit
3000 Serial Port C through an RS-485 transceiver. The half-duplex communication uses
an output from PD7 on the Rabbit 3000 to control the transmit enable on the communica-
tion line. Using this scheme a strict master/slave relationship must exist between devices
to insure that no two devices attempt to drive the bus simultaneously.
Serial Port C is configured in software for RS-485 as follows.
#define ser485open serCopen
#define ser485close serCclose
#define ser485wrFlush serCwrFlush
#define ser485rdFlush serCrdFlush
#define ser485putc serCputc
#define ser485getc serCgetc
#define CINBUFSIZE 15
#define COUTBUFSIZE 15
#ifndef _485BAUD
#define _485BAUD 115200
#endif
The configuration shown above is based on circular buffers. RS-485 configuration may
also be done using functions from the
LIB\
PACKET.LIB library.
The Prototyping Boards with RCM3900 modules installed can be used in an RS-485 multi-
drop network spanning up to 1200 m (4000 ft), and there can be as many as 32 attached
devices. Connect the 485+ to 485+ and 485– to 485– using single twisted-pair wires as
shown in Figure B-8. Note that a common ground is recommended.
Figure B-8. Multidrop Network
RS-485
RS485+
GND
RS-485
RS485+
GND
RS-485
RS485+
GND
"‘[$m\a&a§ ogu§u§.e&u§u§ e§uu§ RESET
RabbitCore RCM3900 User’s Manual 99
The Prototyping Board comes with a 220 termination resistor and two 681 bias resis-
tors installed and enabled with jumpers across pins 1–2 and 5–6 on header JP5, as shown
in Figure B-9.
Figure B-9. RS-485 Termination and Bias Resistors
For best performance, the termination resistors in a multidrop network should be enabled
only on the end nodes of the network, but not on the intervening nodes. Jumpers on boards
whose termination resistors are not enabled may be stored across pins 1–3 and 4–6 of
header JP5.
B.4.7 RabbitNet Port
The RJ-45 jack labeled RabbitNet is a clocked SPI RS-422 serial I/O expansion port for
use with RabbitNet peripheral boards. The RabbitNet port is unavailable when an
RCM3900/RCM3910 is in place on the Prototyping Board.
RESET
+BKLT
/CS
LED1
LED3
LED5
GND
GND
A2
A0
D1
D3
D5
D7
RABBITNET
R44
C28
C27
R43
R46
C30C29
R45
Q5
R48
R47
DS7
RELAY NO1 COM1 NC1 NO2 COM2 NC2
K1
KEYPAD DISPLAY BOARD
D8
LCD1JB LCD1JC
+V
/RES
LED0
LED2
LED4
LED6
GND
A3
A1
D0
D2
D4
D6
LCD1JA
J16
BD0
BD1
BD2
BD3
BD4
BD5
BD6
BD7
J15
BA0
BA1
BA2
BA3
LCD
/CS
RELAY RATED
0.5 A @ 30 V
J17
U12
U11
R42
R41
C20
C19
R40
R39
SERIAL FLASH/
MODEM
J7
R2
R7
R3
R4
R5
R6
R9
R8 U6
R10
C6
C1
D1
J2
J1
J4
J6
GND IN3 IN2 IN1 IN0 +5V +5V QD2A QD 2B QD1A QD1B GND J5 VMB MDB1 MDB2 MDB3 MDB4 VMB+ VMA+ MDA1 MDA2 MDA3 MDA4 VMA
J3
C2
JP1
C3
JP2
GND
GND
VBT
/RES
SM0
/IOWR
PG5
PG7
PE1
PE4
PE6
PF7
PF5
PB7
PB5
PB3
PB0
J8
NC
+3.3 V
VRAM
SMODE1
/IORD
PG4
PG6
PE0
PE3
PE5
PB6
PB4
PB2
/RES_OUT
PF4 PF6 PE7
RCM3300
PROTOTYPING
BOARD
S1
RESET
J9
S2 S3
ACT
PD7
PD3
PD5
PG3
PG1
PC7
PC5
PC3
PC1
PF0
PF2
PA0
PA2
PA4
PA6
STAT
LINK
PD6
PD2
PD4
PG2
PG0
PC6
PC4
PC2
PC0
PF1
PF3
PA1
PA3
PA5
PA7
GND
JA JB
POWER
GND
+DC
GND
DS1
R1
GND +DC
D2
C8
L1
R11
JP3
R12
C9
C10
C11
C12
JP4
J10
RP1 RP2
R14 C5
BT1
C13
U5
R16 R15
R17
00 01 02 03 04 05 06 07
OUT
OUT
C4
R13
U1
U2
L293D
H-DRIVER
L293D
H-DRIVER
U8
R25 R26 R27 R28
J14 C24
U10
R38
R37
R35
C26
JP5
R36
C23
C21
U9
C22
J13
R33
R34
C17
C18
UX5
UX1
SO20W
UX2
SO20W
DX2
C25
J12
R50
Q6
R49
D4 D5 D6 D7
GND
HO4
HO3
HO2
HO1
R29
R30
R31
R32
CORE
DS2 DS3 DS4 DS5 DS6 TxE RxE GND TxF RxF 485+ GND 485
Q1 Q2 Q3 Q4
C16
R24
R23
R22
R21
CORE MODULE
GND/EGND
U4
GND
GND
+3.3 V
+5 V
+3.3 V
+5 V
U3
UX4
DX1
RX16
RX17
RX13
RX14
RX18
RX15
PF0_CLKD
PF0_QD
J11
C7
U7
R18
R19
R20
C14
C15
CX1
CX2
R55
R56
R57
R58
R63
R64
R65
R66
R59
R62
R60 R61
R52 R53
R51
R54
SOT23-6 SOT23-6
R67
R68
R69
R70
U1
R1
R2
R15
C1
J1
U2
C2
R4
JP1 J2
R5 JP2 JP3 JP4 JP5
R3
Y1 C5
R7
R8
C7
C6
R11
U4
R9
U3
C3
R10
R6
C4
C8
C9
U5
C10
C11
C14
C15
C19
C18
R17
JP7
JP10
JP9
JP8
L1
J3
C22
C23
C27
C33
L2
C35
C12
C16
C20
C21
C24
C13
C17
C25
U6
C28
R18
C37
C29
Y2
R12 R13 R14
C31
C30
R16
C32
C26
C34
C36
R19
U7
R20
R21
C39
C38
R23
R24
R25 R26
1
C44
2
U8
C43
C49
C50
JP12
JP11
C41
C42
JP13
R27
Y3
R22
C40
JP14
C46
U9
C45 R29
R28
R30
Q1
R33 DS1
R34
R35
DS2
DS3
SPD LNK
ACT FDX
COL
BSY
CE
DS4
R32
RCM39XX
D1
U10
Q2
C47
C48
R31
DIAG
PROG
Colored edge
Programming Cable
To
PC USB port
RESET RCM3900 when changing mode:
Momentarily short out pins 2832 on RCM3900 header J62,
OR
Press RESET button (if using Prototyping Board),
OR
Cycle power off/on
after removing or attaching programming cable.
RabbitCore RCM3900 User’s Manual 100
B.4.8 Other Prototyping Board Modules
An optional LCD/keypad module is available that can be mounted on the Prototyping
Board. The signals on headers LCD1JB and LCD1JC will be available only if the LCD/
keypad module is installed. Refer to Appendix C, “LCD/Keypad Module,” for complete
information.
B.4.9 Quadrature Decoder
Four quadrature decoder inputs are available on screw-terminal header J5. To use the PF0
input from the Rabbit microprocessor, which goes to the QD1B input, remember to recon-
figure the jumper on header JP3 to jumper pins 1–2.
Additional information on the use of the quadrature decoders on Parallel Port F is pro-
vided in the Rabbit 3000 Microprocessor Users Manual.
B.4.10 Stepper-Motor Control
The Prototyping Board can be used to demonstrate the use of the RCM3900 to control a
stepper motor. Stepper motor control typically directs moves in two orthogonal directions,
and so two sets of stepper-motor control circuits are provided for via screw-terminal head-
ers J3 and J4.
In order to use the stepper-motor control, install two Texas Instruments L293DN chips at
locations U2 and U3 (shown in Figure B-10). These chips are readily available from your
favorite electronics parts source, and may be purchased through our Web store as part
number 660-0205.
Figure B-10. Install Four-Channel Push-Pull Driver Chips
+BKLT
/CS
LED1
LED3
LED5
GND
GND
A2
A0
D1
D3
D5
D7
RABBITNET
R44
C28
C27
R43
R46
C30C29
R45
Q5
R48
R47
DS7
RELAY NO1 COM1 NC1 NO2 COM2 NC2
K1
KEYPAD DISPLAY BOARD
D8
LCD1JB LCD1JC
+V
/RES
LED0
LED2
LED4
LED6
GND
A3
A1
D0
D2
D4
D6
LCD1JA
J16
BD0
BD1
BD2
BD3
BD4
BD5
BD6
BD7
J15
BA0
BA1
BA2
BA3
LCD
/CS
RELAY RATED
0.5 A @ 30 V
J17
U12
U11
R42
R41
C20
C19
R40
R39
SERIAL FLASH/
MODEM
J7
R2
R7
R3
R4
R5
R6
R9
R8 U6
R10
C6
C1
D1
J2
J1
J4
J6
GND IN3 IN2 IN1 IN0 +5V +5V QD2A QD2B QD1A QD1B GND J5 VMB MDB1 MDB2 MDB3 MDB4 VMB+ VMA+ MDA1 MDA2 MDA3 MDA4 VMA
J3
C2
JP1
C3
JP2
GND
GND
VBT
/RES
SM0
/IOWR
PG5
PG7
PE1
PE4
PE6
PF7
PF5
PB7
PB5
PB3
PB0
J8
NC
+3.3 V
VRAM
SMODE1
/IORD
PG4
PG6
PE0
PE3
PE5
PB6
PB4
PB2
/RES_OUT
PF4 PF6 PE7
RCM3300
PROTOTYPING
BOARD
S1
RESET
J9
S2 S3
ACT
PD7
PD3
PD5
PG3
PG1
PC7
PC5
PC3
PC1
PF0
PF2
PA0
PA2
PA4
PA6
STAT
LINK
PD6
PD2
PD4
PG2
PG0
PC6
PC4
PC2
PC0
PF1
PF3
PA1
PA3
PA5
PA7
GND
JA JB
POWER
GND
+DC
GND
DS1
R1
GND +DC
D2
C8
L1
R11
JP3
R12
C9
C10
C11
C12
JP4
J10
RP1 RP2
R14 C5
BT1
C13
U5
R16 R15
R17
00 01 02 03 04 05 06 07
OUT
OUT
C4
R13
U1
U2
L293D
H-DRIVER
L293D
H-DRIVER
U8
R25 R26 R27 R28
J14 C24
U10
R38
R37
R35
C26
JP5
R36
C23
C21
U9
C22
J13
R33
R34
C17
C18
UX5
UX1
SO20W
UX2
SO20W
DX2
C25
J12
R50
Q6
R49
D4 D5 D6 D7
GND
HO4
HO3
HO2
HO1
R29
R30
R31
R32
CORE
DS2 DS3 DS4 DS5 DS6 TxE RxE GND TxF RxF 485+ GND 485
Q1 Q2 Q3 Q4
C16
R24
R23
R22
R21
CORE MODULE
GND/EGND
U4
GND
GND
+3.3 V
+5 V
+3.3 V
+5 V
U3
UX4
DX1
RX16
RX17
RX13
RX14
RX18
RX15
PF0_CLKD
PF0_QD
J11
C7
U7
R18
R19
R20
C14
C15
CX1
CX2
R55
R56
R57
R58
R63
R64
R65
R66
R59
R62
R60 R61
R52 R53
R51
R54
SOT23-6 SOT23-6
R67
R68
R69
R70
U1
R1
R2
R15
C1
J1
U2
C2
R4
JP1 J2
R5 JP2 JP3 JP4 JP5
R3
Y1 C5
R7
R8
C7
C6
R11
U4
R9
U3
C3
R10
R6
C4
C8
C9
U5
C10
C11
C14
C15
C19
C18
R17
JP7
JP10
JP9
JP8
L1
J3
C22
C23
C27
C33
L2
C35
C12
C16
C20
C21
C24
C13
C17
C25
U6
C28
R18
C37
C29
Y2
R12 R13 R14
C31
C30
R16
C32
C26
C34
C36
R19
U7
R20
R21
C39
C38
R23
R24
R25 R26
1
C44
2
U8
C43
C49
C50
JP12
JP11
C41
C42
JP13
R27
Y3
R22
C40
JP14
C46
U9
C45R29
R28
R30
Q1
R33 DS1
R34
R35
DS2
DS3
SPD LNK
ACT FDX
COL
BSY
CE
DS4
R32
RCM39XX
D1
U10
Q2
C47
C48
R31
U2 U3 r 121,, .,>>>i,, >>>|AT , , , 51,, r T384, >>|t, >>|t, 2i,
RabbitCore RCM3900 User’s Manual 101
Figure B-11 shows the stepper-motor driver circuit.
Figure B-11. Stepper-Motor Driver Circuit
The stepper motor(s) can be powered either from the onboard power supply or from an
external power based on the jumper settings on headers JP1 and JP2.
Table B-3. Stepper Motor Power-Supply Options
Header Pins Connected Factory
Default
JP1
1–2
9–10 Onboard power supply to U2 ×
3–4
7–8 External power supply to U2
JP2
1–2
9–10 Onboard power supply to U3 ×
3–4
7–8 External power supply to U3
J3
2
3
4
U2
5
1
6
3
6
11
14
2
1
7
10
9
15
ENABLE1
ENABLE2
MOTOR +
{
MOTOR 
{
27 kW
27 kW
L293DN
VMA+
MDA1
MDA2
MDA3
MDA4
VMA-
OUT1
OUT2
OUT3
OUT4
IN1
IN2
IN3
IN4
27 kW
27 kW
J4
2
3
4
U3
5
1
6
3
6
11
14
2
1
7
10
9
15
ENABLE1
ENABLE2
MOTOR +
{
MOTOR 
{
27 kW
27 kW
L293DN
VMB-
MDB1
MDB2
MDB3
MDB4
VMB+
®
OUT1
OUT2
OUT3
OUT4
IN1
IN2
IN3
IN4
27 kW
27 kW
®PF4
PF5
PF6
PF7
RabbitCore RCM3900 User’s Manual 102
B.5 Prototyping Board Jumper Configurations
Figure B-12 shows the header locations used to configure the various Prototyping Board
options via jumpers.
Figure B-12. Location of Prototyping Board Configurable Positions
JP3
JP4
JP5
JP1 JP2
Battery
RabbitCore RCM3900 User’s Manual 103
Table B-4 lists the configuration options using jumpers.
Table B-4. Prototyping Board Jumper Configurations
Header Description Pins Connected Factory
Default
JP1 Stepper Motor Power-Supply
Options (U2)
1–2
9–10 Onboard power supply ×
3–4
7–8 External power supply
JP2 Stepper Motor Power-Supply
Options (U3)
1–2
9–10 Onboard power supply ×
3–4
7–8 External power supply
JP3 PF0 Option
1–2 Quadrature decoder inputs enabled
2–3 RabbitNet/Serial Flash interface
enabled ×
JP4 RCM3900 Power Supply 2–3 RCM3900 powered via Prototyping
Board ×
JP5 RS-485 Bias and Termination
Resistors
1–2
5–6
Bias and termination resistors
connected ×
1–3
4–6
Bias and termination resistors not
connected (parking position for
jumpers)
RabbitCore RCM3900 User’s Manual 104
B.6 Use of Rabbit 3000 Parallel Ports
Table B-5 lists the Rabbit 3000 parallel ports and their use for the Prototyping Board.
Table B-5. Prototyping Board Use of Rabbit 3000 Parallel Ports
Port I/O Use Initial State
PA0–PA3 Data Bus LCD/keypad module, motor driver, LEDs Active high
PA4 Data Bus LCD/keypad module, motor driver,
relay and relay LED Active high
PA5–PA7 Data Bus LCD/keypad module, motor control Active high
PB0 Input CLKB, microSD™ Card High
PB1 Input CLKA, Programming Port High
(when not driven by CLKA)
PB2–PB5 Address Bus LCD/keypad module High
PB6–PB7 Address Bus High
PC0 Output TXD
Serial Port D
High (disabled)
PC1 Input RXD High (disabled)
PC2 Output TXC RS-485
Serial Port C
High (RS-485 disabled)
PC3 Input RXC RS-485 High (RS-485 disabled)
PC4 Output TXB, microSD™ Card
Serial Port B*High (disabled)
PC5 Input RXB, microSD™ Card High (disabled)
PC6 Output TXA, Programming Port
Serial Port A
High
PC7 Input RXA, Programming Port High
PD0Output RCM3900 BSY LED off
(shared with NAND flash busy) High
PD1Output NAND flash chip enable High (disabled)
PD2Input microSD™ Card card detect on
RCM3900/RCM3910
High when microSD™
Card is installed
PD3 Output High (SPI CS disabled)
PD4–PD6 Input High (disabled)
PD7 Output RS-485 Tx enable Low (RS-485 Tx disabled)
PE0–PE1 Input IN0–IN1, J6 High
PE2Output Ethernet AEN,
NAND flash function enable High (disabled)
PE3 Output Motor driver A clock pulse Low (disabled)
PE4–PE5 Input IN2–IN3, J6 High
RabbitCore RCM3900 User’s Manual 105
PE6 Output LCD/keypad module High (disabled)
PE7 Output Motor driver B clock pulse High (disabled)
PF0 Input Quadrature decoder High
PF1–PF3 Input Quadrature decoder High
PF4–PF7 Output Motor 1–4 control Low (disabled)
PG0 Input Switch S2 High
PG1 Input Switch S3 High
PG2 Input TXF RS-232
Serial Port F
High (RS-232 disabled)
PG3 Input RXF RS-232 High (RS-232 disabled)
PG4 Output Motor driver A enable High (disabled)
PG5 Output Motor driver B enable High (disabled)
PG6 Input TXE RS-232
Serial Port E
High (RS-232 disabled)
PG7 Input RXE RS-232 High (RS-232 disabled)
* Serial Port B is not available on the Prototyping Board when the RCM3900/RCM3910 is
plugged in.
PD0, PD1, and PE2 are not normally available on the Prototyping Board because they are not
brought out on RCM3900 header J61.
PD2 is not brought out to the Prototyping Board when the RCM3900/RCM3910 RabbitCore
modules are installed.
Table B-5. Prototyping Board Use of Rabbit 3000 Parallel Ports (continued)
Port I/O Use Initial State
o ©©©©©©© o
RabbitCore RCM3900 User’s Manual 106
APPENDIX C. LCD/KEYPAD MODULE
An optional LCD/keypad is available for the Prototyping Board. Appendix C describes the
LCD/keypad and provides the software function calls to make full use of the LCD/keypad.
C.1 Specifications
Two optional LCD/keypad modules—with or without a panel-mounted NEMA 4 water-
resistant bezel—are available for use with the Prototyping Board. They are shown in
Figure C-1.
Figure C-1. LCD/Keypad Modules Versions
Only the version without the bezel can mount directly on the Prototyping Board; if you
have the version with a bezel, you will have to remove the bezel to be able to mount the
LCD/keypad module on the Prototyping Board. Either version of the LCD/keypad module
can be installed at a remote location up to 60 cm (24") away. Contact your Rabbit sales
representative or your authorized distributor for further assistance in purchasing an LCD/
keypad module.
Mounting hardware and a 60 cm (24") extension cable are also available for the LCD/
keypad module through your sales representative or authorized distributor.
LCD/Keypad Modules
J1 J2
RabbitCore RCM3900 User’s Manual 107
Table C-1 lists the electrical, mechanical, and environmental specifications for the LCD/
keypad module.
Table C-1. LCD/Keypad Specifications
Parameter Specification
Board Size 2.60" × 3.00" × 0.75"
(66 mm × 76 mm × 19 mm)
Bezel Size 4.50" × 3.60" × 0.30"
(114 mm × 91 mm × 7.6 mm)
Temperature Operating Range: 0°C to +50°C
Storage Range: –40°C to +85°C
Humidity 5% to 95%, noncondensing
Power Consumption 1.5 W maximum*
* The backlight adds approximately 650 mW to the power consumption.
Connections Connects to high-rise header sockets on the Prototyping Board
LCD Panel Size 122 × 32 graphic display
Keypad 7-key keypad
LEDs Seven user-programmable LEDs
The LCD/keypad module has 0.1"
IDC headers at J1, J2, and J3 for
physical connection to other boards or
ribbon cables. Figure C-2 shows the
LCD/keypad module footprint. These
values are relative to one of the
mounting holes.
NOTE: All measurements are in
inches followed by millimeters
enclosed in parentheses. All dimen-
sions have a manufacturing toler-
ance of ±0.01" (0.25 mm).
Figure C-2. User Board Footprint for
LCD/Keypad Module
J2
J1
0.200
(5.1)
0.100
(2.5)
0.500
(12.7)
1.450
(36.8)
J3
2.200
(55.9)
1.600
(40.6)
0.768
(19.5) 0.607
(15.4)
Contrast Adjustment Cl 0- o- o- 0- GI o-
RabbitCore RCM3900 User’s Manual 108
C.2 Contrast Adjustments for All Boards
Starting in 2005, LCD/keypad modules were factory-configured to optimize their contrast
based on the voltage of the system they would be used in. Be sure to select a KDU3V LCD/
keypad module for use with the Prototyping Board for the RCM3900 — these modules
operate at 3.3 V. You may adjust the contrast using the potentiometer at R2 as shown in
Figure C-3. LCD/keypad modules configured for 5 V may be used with the 3.3 V Proto-
typing Board, but the backlight will be dim.
Figure C-3. LCD/Keypad Module Contrast Adjustments
You can set the contrast on the LCD display of pre-2005 LCD/keypad modules by adjust-
ing
the potentiometer at R2 or by setting the voltage for 3.3 V by
connecting the jumper
across pins 3–4 on header J5 as shown in Figure C-3. Only one of these two options is
available on these LCD/keypad modules.
NOTE: Older LCD/keypad modules that do not have a header at J5 or a contrast adjust-
ment potentiometer at R2 are limited to operate only at 5 V, and will not work with the
Prototyping Board for the RCM3900. The older LCD/keypad modules are no longer
being sold.
C2
R2
R1
C3
D2 C1 D1
C5
U2
JP1 R3 U1
C4
C10
CR1
R6
C13 C12
R7
R8
R25
R26
R11 R13 R14 R10 R9 R12 R15
R18
Q8
R16
Q5
R21
Q2
U5
J2
DISPLAY
BOARD
J4
KP1
R17
Q4
R22
Q6
R23
Q7
R20
Q3
R19
U7 C14
R24
C15
C16
U6
U4
C7
C9
U3
LCD1 C11
R4
R5
C6
J1
Q1
J5
C17 RN1
J5
LP3500
2.8 V
OTHER
3.3 V
1
2
3
4
n.c. = 5 V
LCD/Keypad Module Jumper Configurations
Header Description Pins
Connected
Factory
Default
J5
2.8 V
3.3 V
5 V
12
34
n.c.
×
J5
1
2
3
4
Part No. 101-0541
Contrast
Adjustment
O ©©©©©©© O flflflfl H
RabbitCore RCM3900 User’s Manual 109
C.3 Keypad Labeling
The keypad may be labeled according to your needs. A template is provided in Figure C-4
to allow you to design your own keypad label insert.
Figure C-4. Keypad Template
To replace the keypad legend, remove the old legend and insert your new legend prepared
according to the template in Figure C-4. The keypad legend is located under the blue key-
pad matte, and is accessible from the left only as shown in Figure C-5.
Figure C-5. Removing and Inserting Keypad Label
The sample program KEYBASIC.C in the 122x32_1x7 folder in SAMPLES\LCD_KEYPAD
shows how to reconfigure the keypad for different applications.
1.10
(28)
2.35
(60)
Keypad label is located
under the blue keypad matte.
RabbitCore RCM3900 User’s Manual 110
C.4 Header Pinouts
Figure C-6 shows the pinouts for the LCD/keypad module.
Figure C-6. LCD/Keypad Module Pinouts
C.4.1 I/O Address Assignments
The LCD and keypad on the LCD/keypad module are addressed by the /CS strobe as
explained in Table C-2.
Table C-2. LCD/Keypad Module Address Assignment
Address Function
0xE000 Device select base address (/CS)
0xExx0–0xExx7 LCD control
0xExx8 LED enable
0xExx9 Not used
0xExxA 7-key keypad
0xExxB (bits 0–6) 7-LED driver
0xExxB (bit 7) LCD backlight on/off
0xExxC–ExxF Not used
DB6B
DB4B
DB2B
DB0B
A1B
A3B
GND
LED7
LED5
LED3
LED1
/RES
VCC
DB7B
DB5B
DB3B
DB1B
A0B
A2B
GND
GND
LED6
LED4
LED2
PE7
+5BKLT
J1
GND
GND
LED6
LED4
LED2
PE7
+5BKLT
GND
LED7
LED5
LED3
LED1
/RES
VCC
J3
GND
DB7B
DB5B
DB3B
DB1B
A0B
A2B
GND
DB6B
DB4B
DB2B
DB0B
A1B
A3B
J2
RabbitCore RCM3900 User’s Manual 111
C.5 Mounting LCD/Keypad Module on the Prototyping Board
Install the LCD/keypad module on header sockets LCD1JA, LCD1JB, and LCD1JC of the
Prototyping Board as shown in Figure C-7. Be careful to align the pins over the headers,
and do not bend them as you press down to mate the LCD/keypad module with the Proto-
typing Board.
Figure C-7. Install LCD/Keypad Module on Prototyping Board
+BKLT
/CS
LED1
LED3
LED5
GND
GND
A2
A0
D1
D3
D5
D7
RX10
RX11
RX12
RABBITNET
R44
C28
C27
R43
R46
C30C29
R45
Q5
R48
R47
DS7
RELAY NO1 COM1 NC1 NO2 COM2 NC2
K1
KEYPAD DISPLAY BOARD
D8
LCD1JB LCD1JC
+V
/RES
LED0
LED2
LED4
LED6
GND
A3
A1
D0
D2
D4
D6
LCD1JA
J16
BD0
BD1
BD2
BD3
BD4
BD5
BD6
BD7
J15
BA0
BA1
BA2
BA3
LCD
/CS
RELAY RATED
0.5 A @ 30 V
J17
U12
U11
R42
R41
C20
C19
R40
R39
R18
R19
R20
SERIAL
FLASH/
MODEM
C14
C15
J11
J7
R2
R7
R3
R4
R5
R6
R9
R8 U6
R10
C6 U7 C7
RP3
RP4
C1
D1
J2
J1
J4
J6
GND IN3 IN2 IN1 IN0 +5V +5V QD2A QD2B QD1A QD1B GN D J5 VMB MDB1 MDB2 MDB3 MDB4 VMB+ VMA+ MDA1 MDA2 MDA3 MDA4 VMA
J3
C2
JP1
C3
JP2
GND
GND
VBT
/RES
SM0
/IOWR
PG5
PG7
PE1
PE4
PE6
PF7
PF5
PB7
PB5
PB3
PB0
J8
NC
+3.3 V
VRAM
SMODE1
/IORD
PG4
PG6
PE0
PE3
PE5
PB6
PB4
PB2
/RES_OUT
PF4 PF6 PE7
RCM3300
PROTOTYPING
BOARD
S1
RESET
J9
S2 S3
ACT
PD7
PD3
PD5
PG3
PG1
PC7
PC5
PC3
PC1
PF0
PF2
PA0
PA2
PA4
PA6
STAT
LINK
PD6
PD2
PD4
PG2
PG0
PC6
PC4
PC2
PC0
PF1
PF3
PA1
PA3
PA5
PA7
GND
JA JB
POWER
GND
+DC
GND
DS1
R1
GND +DC
D2
C8
L1
R11
RX7
RX8
RX9
RX4
RX5
RX6
RP1
RP2
JP3
RX1
RX2
RX3
RP5
R12
C9
C10
C11
C12
JP4
J10
RP6 RP7
R14 C5
BT1
C13
U5
R16 R15
D3
R17
A0 A1 A2 A3 A4 A5 A6 A7
OUT OUT
C4
R13
U1
U2
L293D
H-DRIVER
L293D
H-DRIVER
U8
R25 R26 R27 R28
J14 C24
U10
R38
R37
R35
C26
JP5
R36
C23
C21
U9
C22
J13
R33
R34
C17
C18
UX5
UX4
UX3
UX1
UX2 DX2
RX16
RX17
RX18
RX13
RX14
RX15
DX1
C25
J12
R50
Q6
R49
D4 D5 D6 D7
GND
HO4
HO3
HO2
HO1
R29
R30
R31
R32
CORE
DS2 DS3 DS4 DS5 DS6 TxE RxE GND TxF RxF 485+ GND 485
Q1 Q2 Q3 Q4
C16
R24
R23
R22
R21
CORE MODULE
GND/EGND
U4
GND
GND
+3.3 V
+5 V
+3.3 V
+5 V
U3
LCD1JA
U1
R1
R2
R15
C1
J1
U2
C2
R4
JP1 J2
R5 JP2 JP3 JP4 JP5
R3
Y1 C5
R7
R8
C7
C6
R11
U4
R9
U3
C3
R10
R6
C4
C8
C9
U5
C10
C11
C14
C15
C19
C18
R17
JP7
JP10
JP9
JP8
L1
J3
C22
C23
C27
C33
L2
C35
C12
C16
C20
C21
C24
C13
C17
C25
U6
C28
R18
C37
C29
Y2
R12 R13 R14
C31
C30
R16
C32
C26
C34
C36
R19
U7
R20
R21
C39
C38
R23
R24
R25 R26
1
C44
2
U8
C43
C49
C50
JP12
JP11
C41
C42
JP13
R27
Y3
R22
C40
JP14
C46
U9
C45 R29
R28
R30
Q1
R33 DS1
R34
R35
DS2
DS3
SPD LNK
ACT FDX
COL
BSY
CE
DS4
R32
RCM39XX
D1
U10
Q2
C47
C48
R31
LCD1JB LCD1JC
RabbitCore RCM3900 User’s Manual 112
C.6 Bezel-Mount Installation
This section describes and illustrates how to bezel-mount the LCD/keypad module
designed for remote installation. Follow these steps for bezel-mount installation.
1. Cut mounting holes in the mounting panel in accordance with the recommended dimen-
sions in Figure C-8, then use the bezel faceplate to mount the LCD/keypad module onto
the panel.
Figure C-8. Recommended Cutout Dimensions
2. Carefully “drop in” the LCD/keypad module with the bezel and gasket attached.
3.400
(86.4)
3.100
(78.8)
2.870
(72.9)
0.230
(5.8)
0.125 D, 4x
(3)
CUTOUT
0.130
(3.3)
RabbitCore RCM3900 User’s Manual 113
3. Fasten the unit with the four 4-40 screws and washers included with the LCD/keypad
module. If your panel is thick, use a 4-40 screw that is approximately 3/16" (5 mm) lon-
ger than the thickness of the panel.
Figure C-9. LCD/Keypad Module Mounted in Panel (rear view)
Carefully tighten the screws until the gasket is compressed and the plastic bezel face-
plate is touching the panel.
Do not tighten each screw fully before moving on to the next screw. Apply only one or
two turns to each screw in sequence until all are tightened manually as far as they can
be so that the gasket is compressed and the plastic bezel faceplate is touching the panel.
Bezel/Gasket
DISPLAY BOARD
U1 U2
C1
C2 C3
C4
U3
R17
J1
Q1
D1
R1
R2 R3 R4
R9
R10
R11
Q2 Q3 Q4
R12
R5 R6
Q5 Q6
R13
R7
R14
R8
R15 R18
Q7 Q8 C5
R16
C6
J3
U4
RN1
J2
C8
C7
KP1
Panel
RabbitCore RCM3900 User’s Manual 114
C.6.1 Connect the LCD/Keypad Module to Your Prototyping Board
The LCD/keypad module can be located as far as 2 ft. (60 cm) away from the Prototyping
Board, and is connected via a ribbon cable as shown in Figure C-10.
Figure C-10. Connecting LCD/Keypad Module to Prototyping Board
Note the locations and connections relative to pin 1 on both the Prototyping Board and the
LCD/keypad module.
Rabbit offers 2 ft. (60 cm) extension cables. Contact your authorized distributor or a Rab-
bit sales representative for more information.
+BKLT
/CS
LED1
LED3
LED5
GND
GND
A2
A0
D1
D3
D5
D7
RX10
RX11
RX12
RABBITNET
R44
C28
C27
R43
R46
C30C29
R45
Q5
R48
R47
DS7
RELAY NO1 COM1 NC1 NO2 COM2 NC2
K1
KEYPAD DISPLAY BOARD
D8
LCD1JB LCD1JC
+V
/RES
LED0
LED2
LED4
LED6
GND
A3
A1
D0
D2
D4
D6
LCD1JA
J16
BD0
BD1
BD2
BD3
BD4
BD5
BD6
BD7
J15
BA0
BA1
BA2
BA3
LCD
/CS
RELAY RATED
0.5 A @ 30 V
J17
U12
U11
R42
R41
C20
C19
R40
R39
R18
R19
R20
SERIAL
FLASH/
MODEM
C14
C15
J11
J7
R2
R7
R3
R4
R5
R6
R9
R8 U6
R10
C6 U7 C7
RP3
RP4
C1
D1
J2
J1
J4
J6
GND IN3 IN2 IN1 IN0 +5V +5V QD2A QD2B QD1A QD1B GND J5 VMB MDB1 MDB2 MDB3 MDB4 VMB+ VMA+ MDA1 MDA2 MDA3 MDA4 VMA
J3
C2
JP1
C3
JP2
GND
GND
VBT
/RES
SM0
/IOWR
PG5
PG7
PE1
PE4
PE6
PF7
PF5
PB7
PB5
PB3
PB0
J8
NC
+3.3 V
VRAM
SMODE1
/IORD
PG4
PG6
PE0
PE3
PE5
PB6
PB4
PB2
/RES_OUT
PF4 PF6 PE7
RCM3300
PROTOTYPING
BOARD
S1
RESET
J9
S2 S3
ACT
PD7
PD3
PD5
PG3
PG1
PC7
PC5
PC3
PC1
PF0
PF2
PA0
PA2
PA4
PA6
STAT
LINK
PD6
PD2
PD4
PG2
PG0
PC6
PC4
PC2
PC0
PF1
PF3
PA1
PA3
PA5
PA7
GND
JA JB
POWER
GND
+DC
GND
DS1
R1
GND +DC
D2
C8
L1
R11
RX7
RX8
RX9
RX4
RX5
RX6
RP1
RP2
JP3
RX1
RX2
RX3
RP5
R12
C9
C10
C11
C12
JP4
J10
RP6 RP7
R14 C5
BT1
C13
U5
R16 R15
D3
R17
A0 A1 A2 A3 A4 A5 A6 A7
OUT OUT
C4
R13
U1
U2
L293D
H-DRIVER
L293D
H-DRIVER
U8
R25 R26 R27 R28
J14 C24
U10
R38
R37
R35
C26
JP5
R36
C23
C21
U9
C22
J13
R33
R34
C17
C18
UX5
UX4
UX3
UX1
UX2 DX2
RX16
RX17
RX18
RX13
RX14
RX15
DX1
C25
J12
R50
Q6
R49
D4 D5 D6 D7
GND
HO4
HO3
HO2
HO1
R29
R30
R31
R32
CORE
DS2 DS3 DS4 DS5 DS6 TxE RxE GND TxF RxF 485+ GND 485
Q1 Q2 Q3 Q4
C16
R24
R23
R22
R21
CORE MODULE
GND/EGND
U4
GND
GND
+3.3 V
+5 V
+3.3 V
+5 V
U3
C2
R2
R1
C3
D2 C1 D1
C5
U2
JP1 R3 U1
C4
C10
CR1
R6
C13 C12
R7
R8
R25
R26
R11 R13 R14 R10 R9 R12 R15
R18
Q8
R16
Q5
R21
Q2
U5
J2
DISPLAY
BOARD
J4
KP1
R17
Q4
R22
Q6
R23
Q7
R20
Q3
R19
U7 C14
R24
C15
C16
U6
U4
C7
C9
U3
LCD1 C11
R4
R5
C6
J1
Q1
J5
C17 RN1
J5
LP3500
2.8 V
OTHER
3.3 V
1
2
3
4
n.c. = 5 V
LCD1JA
U1
R1
R2
R15
C1
J1
U2
C2
R4
JP1 J2
R5 JP2 JP3 JP4 JP5
R3
Y1 C5
R7
R8
C7
C6
R11
U4
R9
U3
C3
R10
R6
C4
C8
C9
U5
C10
C11
C14
C15
C19
C18
R17
JP7
JP10
JP9
JP8
L1
J3
C22
C23
C27
C33
L2
C35
C12
C16
C20
C21
C24
C13
C17
C25
U6
C28
R18
C37
C29
Y2
R12 R13 R14
C31
C30
R16
C32
C26
C34
C36
R19
U7
R20
R21
C39
C38
R23
R24
R25 R26
1
C44
2
U8
C43
C49
C50
JP12
JP11
C41
C42
JP13
R27
Y3
R22
C40
JP14
C46
U9
C45 R29
R28
R30
Q1
R33 DS1
R34
R35
DS2
DS3
SPD LNK
ACT FDX
COL
BSY
CE
DS4
R32
RCM39XX
D1
U10
Q2
C47
C48
R31
Pin 1
Pin 1
RabbitCore RCM3900 User’s Manual 115
C.7 Sample Programs
Sample programs illustrating the use of the LCD/keypad module with the Prototyping
Board are provided in the SAMPLES\RCM3900\LCD_KEYPAD folder.
These sample programs use the auxiliary I/O bus on the Rabbit 3000 chip, and so the
#define PORTA_AUX_IO line is already included in the sample programs.
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. To run a sample
program, open it with the File menu (if it is not still open), then compile and run it by
pressing F9. The RCM3900 must be connected to a PC using the serial programming
cable as described in Chapter 2, “Getting Started.”
Complete information on Dynamic C is provided in the Dynamic C Users Manual.
KEYPADTOLED.C—This program demonstrates the use of the external I/O bus. The
program will light up an LED on the LCD/keypad module and will display a message
on the LCD when a key press is detected. The DS3, DS4, DS5, and DS6 LEDs on the
Prototyping Board and the red BSY LED (DS4) on the RCM3900 module will also
light up.
LCDKEYFUN.C—This program demonstrates how to draw primitive features from the
graphic library (lines, circles, polygons), and also demonstrates the keypad with the key
release option.
SWITCHTOLCD.C—This program demonstrates the use of the external I/O bus. The
program will light up an LED on the LCD/keypad module and will display a message on
the LCD when a switch press is detected. The DS1 and DS2 LEDs on the Prototyping
Board will also light up.
Additional sample programs are available in the SAMPLES\LCD_KEYPAD\122x32_1x7
folder.
RabbitCore RCM3900 User’s Manual 116
C.8 LCD/Keypad Module Function Calls
When mounted on the Prototyping Board, the LCD/keypad module uses the external I/O
bus on the Rabbit 3000 chip. Remember to add the line
#define PORTA_AUX_IO
to the beginning of any programs using the auxiliary I/O bus.
C.8.1 LCD/Keypad Module Initialization
The function used to initialize the LCD/keypad module can be found in the Dynamic C
LIB\DISPLAYS\LCD122KEY7.LIB library.
dispInit
void dispInit();
DESCRIPTION
Initializes the LCD/keypad module. The keypad is set up using
keypadDef()
or
keyConfig()
after this function call.
RETURN VALUE
None.
RabbitCore RCM3900 User’s Manual 117
C.8.2 LEDs
When power is applied to the LCD/keypad module for the first time, the red LED (DS1)
will come on, indicating that power is being applied to the LCD/keypad module. The red
LED is turned off when the
brdInit
function executes.
One function is available to control the LEDs, and can be found in the Dynamic C LIB\
DISPLAYS\LCD122KEY7.LIB library.
displedOut
void displedOut(int led, int value);
DESCRIPTION
LED on/off control. This function will only work when the LCD/keypad module is in-
stalled on the Prototyping Board.
PARAMETERS
led is the LED to control.
0 = LED DS1
1 = LED DS2
2 = LED DS3
3 = LED DS4
4 = LED DS5
5 = LED DS6
6 = LED DS7
value is the value used to control whether the LED is on or off (0 or 1).
0 = off
1 = on
RETURN VALUE
None.
RabbitCore RCM3900 User’s Manual 118
C.8.3 LCD Display
The functions used to control the LCD display are contained in the
LIB
\DISPLAYS\
GRAPHIC\
GRAPHIC.LIB
library . When x and y coordinates on the display screen are spec-
ified, x can range from 0 to 121, and y can range from 0 to 31. These numbers represent
pixels from the top left corner of the display.
glInit
void glInit(void);
DESCRIPTION
Initializes the display devices, clears the screen.
RETURN VALUE
None.
SEE ALSO
glDispOnOFF, glBacklight, glSetContrast, glPlotDot, glBlock, glPlotDot,
glPlotPolygon, glPlotCircle, glHScroll, glVScroll, glXFontInit, glPrintf,
glPutChar, glSetBrushType, glBuffLock, glBuffUnlock, glPlotLine
glBackLight
void glBackLight(int onOff);
DESCRIPTION
Turns the display backlight on or off.
PARAMETER
onOff turns the backlight on or off
1—turn the backlight on
0—turn the backlight off
RETURN VALUE
None.
SEE ALSO
glInit, glDispOnoff, glSetContrast
RabbitCore RCM3900 User’s Manual 119
glDispOnOff
void glDispOnOff(int onOff);
DESCRIPTION
Sets the LCD screen on or off. Data will not be cleared from the screen.
PARAMETER
onOff turns the LCD screen on or off
1—turn the LCD screen on
0—turn the LCD screen off
RETURN VALUE
None.
SEE ALSO
glInit, glSetContrast, glBackLight
glSetContrast
void glSetContrast(unsigned level);
DESCRIPTION
Sets display contrast.
NOTE: This function is not used with the LCD/keypad module since the support circuits
are not available on the LCD/keypad module.
RabbitCore RCM3900 User’s Manual 120
glFillScreen
void glFillScreen(int pattern);
DESCRIPTION
Fills the LCD display screen with a pattern.
PARAMETER
The screen will be set to all black if
pattern
is 0xFF, all white if
pattern
is 0x00,
and vertical stripes for any other pattern.
RETURN VALUE
None.
SEE ALSO
glBlock, glBlankScreen, glPlotPolygon, glPlotCircle
glBlankScreen
void glBlankScreen(void);
DESCRIPTION
Blanks the LCD display screen (sets LCD display screen to white).
RETURN VALUE
None.
SEE ALSO
glFillScreen, glBlock, glPlotPolygon, glPlotCircle
RabbitCore RCM3900 User’s Manual 121
glFillRegion
void glFillRegion(int left, int top, int width, int height,
char pattern);
DESCRIPTION
Fills a rectangular block in the LCD buffer with the pattern specified. Any portion of
the block that is outside the LCD display area will be clipped.
PARAMETERS
left the x coordinate of the top left corner of the block.
top the y coordinate of the top left corner of the block.
width the width of the block.
height
the height of the block.
pattern
the bit pattern to display (all black if
pattern
is 0xFF, all white
if
pattern
is 0x00, and vertical stripes for any other pattern).
RETURN VALUE
None.
SEE ALSO
glFillScreen, glBlankScreen, glBlock, glBlankRegion
RabbitCore RCM3900 User’s Manual 122
glFastFillRegion
void glFastFillRegion(int left, int top, int width, int height,
char pattern);
DESCRIPTION
Fills a rectangular block in the LCD buffer with the pattern specified. The block left and
width parameters must be byte-aligned. Any portion of the block that is outside the
LCD display area will be clipped.
PARAMETERS
left the x coordinate of the top left corner of the block.
top the y coordinate of the top left corner of the block.
width the width of the block.
height the height of the block.
pattern the bit pattern to display (all black if
pattern
is 0xFF, all white
if
pattern
is 0x00, and vertical stripes for any other pattern).
RETURN VALUE
None.
SEE ALSO
glFillScreen, glBlankScreen, glBlock, glBlankRegion
RabbitCore RCM3900 User’s Manual 123
glBlankRegion
void glBlankRegion(int left, int top, int width, int height);
DESCRIPTION
Clears a region on the LCD display. The block left and width parameters must be byte-
aligned. Any portion of the block that is outside the LCD display area will be clipped.
PARAMETERS
left the x coordinate of the top left corner of the block (x must be
evenly divisible by 8).
top the y coordinate of the top left corner of the block.
width the width of the block (must be evenly divisible by 8).
height the height of the block.
RETURN VALUE
None.
SEE ALSO
glFillScreen, glBlankScreen, glBlock
RabbitCore RCM3900 User’s Manual 124
glBlock
void glBlock(int left, int top, int width, int height);
DESCRIPTION
Draws a rectangular block in the page buffer and on the LCD if the buffer is unlocked.
Any portion of the block that is outside the LCD display area will be clipped.
PARAMETERS
left the x coordinate of the top left corner of the block.
top the y coordinate of the top left corner of the block.
width the width of the block.
height the height of the block.
RETURN VALUE
None.
SEE ALSO
glFillScreen, glBlankScreen, glPlotPolygon, glPlotCircle
glPlotVPolygon
void glPlotVPolygon(int n, int *pFirstCoord);
DESCRIPTION
Plots the outline of a polygon in the LCD page buffer, and on the LCD if the buffer is un-
locked. Any portion of the polygon that is outside the LCD display area will be clipped.
If fewer than 3 vertices are specified, the function will return without doing anything.
P