Digi Rcm4000 Users Manual RCM4000UM

RCM4000 to the manual be873252-217d-46d0-9c8f-1434a1fffe7d

2015-02-04

: Digi Digi-Rcm4000-Users-Manual-513520 digi-rcm4000-users-manual-513520 digi pdf

Open the PDF directly: View PDF PDF.
Page Count: 124

DownloadDigi Digi-Rcm4000-Users-Manual- RCM4000UM  Digi-rcm4000-users-manual
Open PDF In BrowserView PDF
RabbitCore RCM4000
C-Programmable Analog Core Module
with Ethernet

User’s Manual
019–0157

• 060501–A

RabbitCore RCM4000 User’s Manual
Part Number 019-0157 • 060501–A • Printed in U.S.A.
©2006 Rabbit Semiconductor • All rights reserved.
Rabbit Semiconductor reserves the right to make changes and
improvements to its products without providing notice.

Trademarks
Rabbit and Dynamic C are registered trademarks of Rabbit Semiconductor.
Rabbit 4000 and RabbitCore are trademarks of Rabbit Semiconductor.

Rabbit Semiconductor
2900 Spafford Street
Davis, California 95616-6809
USA
Telephone: (530) 757-8400
Fax: (530) 757-8402
www.rabbitsemiconductor.com

RabbitCore RCM4000

TABLE OF CONTENTS

Chapter 1. Introduction

1

1.1 RCM4000 Features ...............................................................................................................................2
1.2 Advantages of the RCM4000 ...............................................................................................................3
1.3 Development and Evaluation Tools......................................................................................................4
1.3.1 RCM4000 Development Kit .........................................................................................................4
1.3.2 Software ........................................................................................................................................5
1.3.3 Online Documentation ..................................................................................................................5

Chapter 2. Getting Started

7

2.1 Install Dynamic C .................................................................................................................................7
2.2 Hardware Connections..........................................................................................................................8
2.2.1 Prepare the Prototyping Board for Development..........................................................................8
2.2.2 Attach Module to Prototyping Board............................................................................................9
2.2.3 Connect Programming Cable ......................................................................................................10
2.2.4 Connect Power ............................................................................................................................11
2.3 Run a Sample Program .......................................................................................................................12
2.3.1 Run a Sample Program ...............................................................................................................12
2.3.2 Troubleshooting ..........................................................................................................................12
2.4 Where Do I Go From Here? ...............................................................................................................13
2.4.1 Technical Support .......................................................................................................................13

Chapter 3. Running Sample Programs

15

3.1 Introduction.........................................................................................................................................15
3.2 Sample Programs ................................................................................................................................16
3.2.1 Use of NAND Flash (RCM4000 only) .......................................................................................18
3.2.2 Serial Communication.................................................................................................................20
3.2.3 A/D Converter Inputs (RCM4000 only) .....................................................................................22
3.2.4 Real-Time Clock .........................................................................................................................22

Chapter 4. Hardware Reference

23

4.1 RCM4000 Digital Inputs and Outputs ................................................................................................24
4.1.1 Memory I/O Interface .................................................................................................................29
4.1.2 Other Inputs and Outputs ............................................................................................................29
4.2 Serial Communication ........................................................................................................................30
4.2.1 Serial Ports ..................................................................................................................................30
4.2.2 Ethernet Port ...............................................................................................................................31
4.2.3 Programming Port .......................................................................................................................32
4.3 Programming Cable ............................................................................................................................33
4.3.1 Changing Between Program Mode and Run Mode ....................................................................33
4.3.2 Standalone Operation of the RCM4000......................................................................................34
4.4 A/D Converter (RCM4000 only) ........................................................................................................35
4.4.1 A/D Converter Power Supply .....................................................................................................37
User’s Manual

4.5 Other Hardware .................................................................................................................................. 38
4.5.1 Clock Doubler ............................................................................................................................ 38
4.5.2 Spectrum Spreader...................................................................................................................... 38
4.6 Memory .............................................................................................................................................. 39
4.6.1 SRAM......................................................................................................................................... 39
4.6.2 Flash EPROM............................................................................................................................. 39
4.6.3 NAND Flash............................................................................................................................... 39

Chapter 5. Software Reference

41

5.1 More About Dynamic C ..................................................................................................................... 41
5.2 Dynamic C Function Calls ................................................................................................................ 43
5.2.1 Digital I/O................................................................................................................................... 43
5.2.2 Serial Communication Drivers ................................................................................................... 43
5.2.3 SRAM Use.................................................................................................................................. 43
5.2.4 Prototyping Board Functions...................................................................................................... 45
5.2.4.1 Board Initialization ............................................................................................................ 45
5.2.4.2 Alerts.................................................................................................................................. 46
5.2.5 Analog Inputs (RCM4000 only)................................................................................................. 47
5.3 Upgrading Dynamic C ....................................................................................................................... 61
5.3.1 Add-On Modules ........................................................................................................................ 61

Chapter 6. Using the TCP/IP Features

63

6.1 TCP/IP Connections ........................................................................................................................... 63
6.2 TCP/IP Primer on IP Addresses ......................................................................................................... 65
6.2.1 IP Addresses Explained.............................................................................................................. 67
6.2.2 How IP Addresses are Used ....................................................................................................... 68
6.2.3 Dynamically Assigned Internet Addresses................................................................................. 69
6.3 Placing Your Device on the Network ................................................................................................ 70
6.4 Running TCP/IP Sample Programs.................................................................................................... 71
6.4.1 How to Set IP Addresses in the Sample Programs..................................................................... 72
6.4.2 How to Set Up your Computer for Direct Connect.................................................................... 73
6.5 Run the PINGME.C Sample Program................................................................................................ 74
6.6 Running Additional Sample Programs With Direct Connect ............................................................ 74
6.7 Where Do I Go From Here? ............................................................................................................... 75

Appendix A. RCM4000 Specifications

77

A.1 Electrical and Mechanical Characteristics ........................................................................................ 78
A.1.1 A/D Converter ........................................................................................................................... 82
A.1.2 Headers ...................................................................................................................................... 83
A.2 Rabbit 4000 DC Characteristics ........................................................................................................ 84
A.3 I/O Buffer Sourcing and Sinking Limit............................................................................................. 85
A.4 Bus Loading ...................................................................................................................................... 85
A.5 Conformal Coating ............................................................................................................................ 88
A.6 Jumper Configurations ...................................................................................................................... 89

Appendix B. Prototyping Board

91

B.1 Introduction ....................................................................................................................................... 92
B.1.1 Prototyping Board Features ....................................................................................................... 93
B.2 Mechanical Dimensions and Layout ................................................................................................. 95
B.3 Power Supply..................................................................................................................................... 96
B.4 Using the Prototyping Board ............................................................................................................. 97
B.4.1 Adding Other Components ........................................................................................................ 99
B.4.2 Measuring Current Draw ........................................................................................................... 99
B.4.3 Analog Features (RCM4000 only) .......................................................................................... 100
B.4.3.1 A/D Converter Inputs...................................................................................................... 100
B.4.3.2 Thermistor Input ............................................................................................................. 102
B.4.3.3 A/D Converter Calibration.............................................................................................. 102
RabbitCore RCM4100

B.4.4 Serial Communication ..............................................................................................................103
B.4.4.1 RS-232 ............................................................................................................................. 104
B.5 Prototyping Board Jumper Configurations ......................................................................................105

Appendix C. Power Supply

109

C.1 Power Supplies.................................................................................................................................109
C.1.1 Battery-Backup Circuits ...........................................................................................................109
C.1.2 Reset Generator ........................................................................................................................110

Notice to Users

111

Index

113

Schematics

117

User’s Manual

RabbitCore RCM4100

1. INTRODUCTION
The RCM4000 series of RabbitCore modules is one of the next
generation of core modules that take advantage of new Rabbit®
4000 features such as hardware DMA, clock speeds of up to
60 MHz, I/O lines shared with up to five serial ports and four
levels of alternate pin functions that include variable-phase
PWM, auxiliary I/O, quadrature decoder, and input capture.
Coupled with more than 500 new opcode instructions that help
to reduce code size and improve processing speed, this equates
to a core module that is fast, efficient, and the ideal solution for
a wide range of embedded applications. The RCM4000 also features an integrated 10Base-T Ethernet port.
The Development Kit has the essentials that you need to design
your own microprocessor-based system, and includes a complete Dynamic C software development system. This Development Kit also contains a Prototyping Board that will allow you
to evaluate the RCM4000 and to prototype circuits that interface
to the RCM4000 module. You will also be able to write and test
software for the RCM4000 modules.
Throughout this manual, the term RCM4000 refers to the complete series of RCM4000
RabbitCore modules unless other production models are referred to specifically.
The RCM4000 has a Rabbit 4000 microprocessor operating at up to 58.98 MHz, static
RAM, flash memory, NAND flash mass-storage option, an 8-channel A/D converter, two
clocks (main oscillator and timekeeping), and the circuitry necessary for reset and management of battery backup of the Rabbit 4000’s internal real-time clock and the static
RAM. One 50-pin header brings out the Rabbit 4000 I/O bus lines, parallel ports, A/D
converter channels, and serial ports.
The RCM4000 receives its +3.3 V power from the customer-supplied motherboard on
which it is mounted. The RCM4000 can interface with all kinds of CMOS-compatible
digital devices through the motherboard.
User’s Manual

1

1.1 RCM4000 Features
• Small size: 1.84" × 2.42" × 0.77" (47 mm × 61 mm × 20 mm)
• Microprocessor: Rabbit 4000 running at 58.98 MHz
• Up to 29 general-purpose I/O lines configurable with up to four alternate functions
• 3.3 V I/O lines with low-power modes down to 2 kHz
• Five CMOS-compatible serial ports — four ports are configurable as a clocked serial
ports (SPI), and one port is configurable as an SDLC/HDLC serial port.
• Combinations of up to eight single-ended or four differential 12-bit analog inputs
(RCM4000 only)
• Alternate I/O bus can be configured for 8 data lines and 6 address lines (shared with
parallel I/O lines), I/O read/write
• 512K flash memory, 512K SRAM, with a fixed mass-storage flash-memory option that
may be used with the standardized directory structure supported by the Dynamic C FAT
File System module
• Real-time clock
• Watchdog supervisor
There are two RCM4000 production models. Table 1 summarizes their main features.
Table 1. RCM4000 Features
Feature

RCM4000

RCM4010

Rabbit® 4000 at 58.98 MHz

Microprocessor
SRAM

512K

Flash Memory (program)

512K

Flash Memory
(mass data storage)
A/D Converter

Serial Ports

32 Mbytes (NAND flash)

—

12 bits

—

5 shared high-speed, CMOS-compatible ports:
5 are configurable as asynchronous serial ports;
4 are configurable as clocked serial ports (SPI);
1 is configurable as an SDLC/HDLC serial port;
1 asynchronous serial port is used during programming
1 asynchronous serial port is dedicated for A/D converter (RCM4000)

The RCM4000 is programmed over a standard PC serial port through a programming cable
supplied with the Development Kit, and can also be programed through a USB port with an
RS-232/USB converter or over an Ethernet with the RabbitLink (both available from Rabbit
Semiconductor).
Appendix A provides detailed specifications for the RCM4000.
2

RabbitCore RCM4000

1.2 Advantages of the RCM4000
• Fast time to market using a fully engineered, “ready-to-run/ready-to-program” microprocessor core.
• Competitive pricing when compared with the alternative of purchasing and assembling
individual components.
• Easy C-language program development and debugging
• Rabbit Field Utility to download compiled Dynamic C .bin files, and cloning board
options for rapid production loading of programs.
• Generous memory size allows large programs with tens of thousands of lines of code,
and substantial data storage.

User’s Manual

3

1.3 Development and Evaluation Tools
1.3.1 RCM4000 Development Kit
The RCM4000 Development Kit contains the hardware essentials you will need to use
your RCM4000 module. The items in the Development Kit and their use are as follows.
• RCM4010 module.
• Prototyping Board.
• AC adapter, 12 V DC, 1 A. (Included only with Development Kits sold for the North
American market. A header plug leading to bare leads is provided to allow overseas
users to connect their own power supply with a DC output of 8–24 V at 8 W.)
• 10-pin header to DE9 programming cable with integrated level-matching circuitry.
• 10-pin header to DB9 serial cable.
• Dynamic C® CD-ROM, with complete product documentation on disk.
• Getting Started instructions.
• A bag of accessory parts for use on the Prototyping Board.
• Rabbit 4000 Processor Easy Reference poster.
• Registration card.

Programming
Cable

DIAG

AC Adapter

(North American
kits only)

PROG

PWR

R1

J1

Getting Started
Instructions

JP
JP 17
13

GN
D

J4

TX
C

RX
D

TX
D

R2

JP
1
C3

+3 C
.3 4
V

D2
JP
2

RX
87

U2

CX
39
UX
45
RX
85

RX75
CX25

DS2

JP25

S2

CX27

RX73

CX23 RX77
R23

1

R27
R28

41

LN
1IN
R11
AG
R12 ND

R22

VR
EF
LN
7IN
LN
5IN AG
ND
LN
3IN

C18
C52

R23
J3

C21

CX
41

D1
C17

C20
C19

JP
11
JP
15
JP
19
JP
21
JP
22
JP
20

C5

C

C10
C8
RX
61

L1

PE2

PE3
PE4
R19
PE5
PE6
R9
PD0
PE7
LN0
PD1
PD2
LN1
LN2
U9
PD4
PD3
LN4
LN3
PD6
PD5
LN6
LN5
PD7
CVT
LN7
C17
VREF
AGND

CV
T
LN
6IN
LN
4IN
LN
2IN
LN
0IN

C20

PE1

RX67

11

C4

JP6

PE0

JP3

U5

U6

C56

JP
24
JP
23

C14
C12

RX59

UX30

UX10

PC4
PC6

PC7

C6 7
C7C9
R4C

U3
R37
R21

R38

UX
41

UX
42

R20

JP5

C9
C10
C11
C12
C13
C14
C15
C16

AG
ND

R2
40

R13

RX
65

RX
47
UX
33
RX
89
UX
31
UX3

R3

RX57

RX55

R5
R6
R7
R8
R9
R10
R11
R12

RX83

RX11

R8
R6 R18
R4 R16
R3 R14
R5 R13
R41
C13
R7 R15
C53
R17

R10

J1
TP2

C3
U4

RX49

RX
63 RP
1

Rabbit Semiconductor, Rabbit, Z-World, and Dynamic C are
registered trademarks of their respective holders.

RX43

RX97

UX
37

Insert the CD from the Development Kit in
your PC’s CD-ROM drive. If the installation
does not auto-start, run the setup.exe
program in the root directory of the
Dynamic C CD. Install any Dynamic C
modules after you install Dynamic C.

JP4

• Rabbit 4000 Processor Easy Reference poster.
• Registration card.

U2

R20

R1

Installing Dynamic C®

80

PA2

PA6
PB0
PB2
PB4

PB6
PC2

PC3
PC5

C1

R29

C8
U1

S1
RESET

RX81

PA0

PC0

PC1

R26

C15
Q1

1

/RST_IN

UX4

+5 V
GND

+3.3 V

PA4

PA5
PA7
PB1
PB3
PB5
PB7

R25

header plug leading to bare leads is provided to allow overseas users to connect their own power supply
with a DC output of 8–30 V.)

Board.

/IOWR
VBAT
EXT
PA1

PA3

JP16
JP6
JP5
JP12
JP4
JP3
JP14
JP8
C16 JP7
JP18
JP9
JP10

C18

U3

• 10-pin header to DB9 programming cable with integrated level-matching circuitry.
• 10-pin header to DB9 serial cable.
tation on disk.

/IORD

RCM1

The RCM4000 Development Kit contains the following items:

• Getting Started instructions.
• A bag of accessory parts for use on the Prototyping

GND

/RST_OUT

• RCM4000 module.
• Prototyping Board.
• AC adapter, 12 V DC, 1 A. (Included only with Development Kits sold for the North American market. A

• Dynamic C® CD-ROM, with complete product documen-

GND

Development Kit Contents

1
BT1
UX49

UX47

J2

UX
29

DS1

Getting Started

Serial
Cable

GND

RabbitCore RCM4000

L1C6

RX
C

U1

C1
C2

C5

CX
17

A Digi International® Company.

Accessory Parts for
Prototyping Board

DS3

R21

R22

S3

UX12

UX14

CX
29

®

RX79
UX16

R24

GND

1

GND
GND

Prototyping Board

Figure 1. RCM4000 Development Kit
4

RabbitCore RCM4000

1.3.2 Software
The RCM4000 is programmed using version 10.03 or later of Dynamic C. A compatible
version is included on the Development Kit CD-ROM.

Rabbit Semiconductor also offers add-on Dynamic C modules containing the popular
µC/OS-II real-time operating system, as well as PPP, Advanced Encryption Standard
(AES), and other select libraries. In addition to the Web-based technical support included
at no extra charge, a one-year telephone-based technical support module is also available
for purchase. Visit our Web site at www.rabbit.com or contact your Rabbit Semiconductor
sales representative or authorized distributor for further information.
1.3.3 Online Documentation
The online documentation is installed along with Dynamic C, and an icon for the documentation menu is placed on the workstation’s desktop. Double-click this icon to reach the
menu. If the icon is missing, use your browser to find and load default.htm in the docs
folder, found in the Dynamic C installation folder.
The latest versions of all documents are always available for free, unregistered download
from our Web sites as well.

User’s Manual

5

6

RabbitCore RCM4000

2. GETTING STARTED
This chapter describes the RCM4000 hardware in more detail, and
explains how to set up and use the accompanying Prototyping Board.
NOTE: This chapter (and this manual) assume that you have the RCM4000 Development
Kit. If you purchased an RCM4000 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 RCM4000 (and for all other Rabbit Semiconductor
hardware), you must install and use Dynamic C.
If you have not yet installed Dynamic C version 10.03 (or a later version), do so now by
inserting the Dynamic C CD from the RCM4000 Development Kit in your PC’s CD-ROM
drive. If autorun is enabled, the CD installation will begin automatically.
If autorun is disabled or the installation does not start, use the Windows Start | Run menu
or Windows Disk Explorer to launch setup.exe from the root folder of the CD-ROM.
The installation program will guide you through the installation process. Most steps of the
process are self-explanatory.
Dynamic C uses a COM (serial) port to communicate with the target development system.
The installation allows you to choose the COM port that will be used. The default selection is COM1. You may select any available port for Dynamic C’s use. If you are not certain which port is available, select COM1. This selection can be changed later within
Dynamic C.
NOTE: The installation utility does not check the selected COM port in any way. Specifying 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 new 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 have purchased any of the optional Dynamic C modules, install them after installing
Dynamic C. The modules may be installed in any order. You must install the modules in
the same directory where Dynamic C was installed.

User’s Manual

7

2.2 Hardware Connections
There are three steps to connecting the Prototyping Board for use with Dynamic C and the
sample programs:
1. Prepare the Prototyping Board for Development.
2. Attach the RCM4000 module to the Prototyping Board.
3. Connect the programming cable between the RCM4000 and the PC.
4. Connect the power supply to the Prototyping Board.
2.2.1 Prepare the Prototyping Board for Development
Snap in four of the plastic standoffs supplied in the bag of accessory parts from the Development Kit in the holes at the corners as shown.

+3.3 C4
V

PA3

PB5

CX17

RX85
RX75

LN5I AGN
D
N

LN3I
N

LN1I
N

LN4I
N

LN2I
N

LN0I
N

AGND

UX12

DS2

JP25

CX27

RX73

CX25

DS3

R21

R23

UX14

RX79

CX23 RX77
R22

R24

S3

GND

UX16

R12

AG
ND

VRE
F

LN7I
N

CVT

CVT

S2

1

R27
R28

J3

R11

RX65

RX67

PD0
LN0
PD2
LN2
PD4
LN4
PD6
LN6

C9
C11
C13

VREF

PE0
PE2
PE4
PE6

CX29

JP17
JP13

JP21
JP22
JP20

JP11
JP15
JP19
C8
C7

C10

RX61

RX59

UX42

UX41

RX57

PD1
LN1
PD3
LN3
PD5
LN5
PD7
LN7

AGN
D

UX3

RX55

RX63

RX89
UX31

UX33

RX49

UX37

RX97

C14
C12

JP24
JP23

RX47

RX43

UX10

PC6

PC7
PE1

PE3
R19
PE5
R9
PE7

RX87

PC0
PC2
PC4

LN6I
N

R10

R8
R
R6 18
R
R4 16
R
R3 14
R
R5 13
R
R7 15
R17

R20

UX30

RX11

PB6

PB7

PC3
PC5

R29

PB2
PB4

PC1

R26

Q1

RX83

PA6
PB0

CX39

C17

PA5
PA7
PB1
PB3

R25
C15

RX81

PA4

UX45

JP16
JP6
JP5
JP12
JP4
JP3
JP14
JP8
C16 JP7
JP18
JP9
JP10

GND
+3.3 V

PA2

CX41

U2
C19

C20

C18
U3

GN
D

D2

/RST_IN
PA0

PA1

TXC
RXC

R2

C3 JP
1

D1

GND

JP2

GND
/IORD

/IOWR
VBAT
EXT

S1
RESET

UX4

+5 V

J4

DS1
GND

J2

/RST_OUT
RCM1

BT1
UX49

UX47

UX29

J1

C5
L1
C6

1

C2

RXD
TXD

PWR

R1

U1

C1

1

GND
GND

Figure 2. Insert Standoffs

8

RabbitCore RCM4000

2.2.2 Attach Module to Prototyping Board
Turn the RCM4000 module so that the mounting holes line up with the corresponding
holes on the Prototyping Board. Insert a standoff between the upper mounting hole and the
Prototyping Board as shown, then insert the module’s header J3 on the bottom side into
socket RCM1 on the Prototyping Board.

C8

R1

C7
R2

L3

R7
R6
R4

L2

R8

C10
L9

L8

U1
R9
R10

PA4

PA5

PA6

PC0

PC1

PC2

PC3

PC4

PC5

PC6

PC7

PE0
PE2
PE4

PD1
LN1

PD2
LN2
PD4
LN4

UX29

J4

GND
RX85

PD6
LN6

RX75

CVT

RX73

CX25

DS2

AGND

AGND

JP25

LN0IN

LN2IN

J3

RX79

DS3

R21

R22

UX16

R24

1

S2

UX14

CX27
CX23 RX77

R23

R11 R12

VREF

RX65
RX63

PD0
LN0

LN1IN

VREF

UX12

PE6

LN3IN

PD3
LN3
PD5
LN5
PD7
LN7

UX10

RX67

LN4IN

JP13

PE1

UX30

RX11

AGND

R17
R7
C11

PB6

PB7

AGND

R15
R5

C9

C7

C10

C8

RX61

C12

C14

JP24
UX41

RX57

PB4

PB5

UX42

RX89
UX31
UX3

RX55

RX59

UX37

RX49

UX33

RX97

JP23

RX43

PB2

PB3

PE3
R19
PE5
R9
PE7

C13

R13
R3

JP17

JP22
JP20

R14
R4

JP21

R16
R6

JP19

R26
JP15

JP11
R10

R18

R20

RX47

Line up mounting
holes with holes
on Prototyping Board.

R29

R8

Q1

PB1

RX83

CVT

R25
C15

PB0

LN7IN

RCM1

PA7

RX87

PA3

RX81

CX41

PA2

CX39

PA1

GND

UX45

PA0

LN5IN

JP2

JP16
JP6
JP5
JP12
JP4
JP3
JP14
JP8
C16 JP7
JP18
JP9
JP10

+5 V

+3.3 V

LN6IN

C19

U3

/RST_IN

VBAT
EXT

TXC RXC

JP1
C3

C4
+3.3 V

D2
U2

C18

C17

C23

C20

R43

/IOWR

S1
RESET

CX17

D1

GND

R28

RCM1
C22

/IORD

UX4

RXD TXD

GND

JP4

D1
R27

C38

J2
GND

/RST_OUT

R26

R33 R32

R30

C6

RP2

Y2

R31

C36

U8

U9

C55
R48

U17

C32
C46 C45C44 R29

BT1
UX49

UX47

CX29

DS1
U3
L1

C30
C31

C53

C66

C51 C52
C54
R47

C28 C29

Y3

C5

C56

1

C2

R27
R28

R1

Q1

U1

C1

R2

JP2

C20

JP3

C26
C27

C50

C49

U18
C71

JP1

C24
C25

C48

C72

R46

R51

T1

R24

C34
C35

U5

R25

U7

C42
C43

C33

U6

LINK

DS2

R37

R3

C13

C18

Y1

R36

C47

RCM4000/
RCM4010

R5

C16

J2

C41 R35

DS1

ACT

Insert standoff
between upper
mounting hole and
Prototyping Board.

PWR

L7

C9

R20

L6
C15

J1

C11

C14

L4

J1

R34

C12
L5

1

S3

GND

GND
GND

Figure 3. Install the Module on the Prototyping Board

NOTE: It is important that you line up the pins on header J3 of the module exactly with
socket RCM1 on the Prototyping Board. The header pins may become bent or damaged
if the pin alignment is offset, 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 gently into the Prototyping Board socket—press down in the area
above the header pins—and “snap” the standoff into the mounting holes.

User’s Manual

9

2.2.3 Connect Programming Cable
The programming cable connects the module to the PC running Dynamic C to download
programs and to monitor the module during debugging.
Connect the 10-pin connector of the programming cable labeled PROG to header J1 on
the RCM4000 as shown in Figure 4. Be sure to orient the marked (usually red) edge of the
cable towards pin 1 of the connector. (Do not use the DIAG connector, which is used for a
normal serial connection.)

AC Adapter
3-pin
power connector
J1
PWR

J1

R2
PC2

PC3

PC4

PC5

PC6

PC7

PE0

PD1
LN1

PD2
LN2
PD4
LN4
PD6
LN6

UX29

J4

GND
UX12

RX85

PD0
LN0

RX75

CX25

DS2

AGND

LN1IN

RX73

JP25

LN0IN

LN2IN

J3

RX79

DS3

R21

R22

UX16

R24

1

S2

UX14

CX27
CX23 RX77

R23

R11 R12

LN3IN

LN5IN

AGND

AGND

CVT

LN4IN

RX63

UX10

RX67

PE6

VREF

VREF

UX30

RX11

LN7IN

PD3
LN3
PD5
LN5
PD7
LN7

RX83

CVT

R17
R7

PE4

AGND

R15
R5

PE2

JP13

JP22
JP20

JP21

R13
R3

JP19

JP17

R14
R4

C9

C7

C8

C10

C11

RX61

C22

PE1

RX87

PC1

CX41

PC0

RX81

CX39

PB6

PB7

GND

UX45

PB4

PB5

RX65

C23

RX59

+5 V

+3.3 V

LN6IN

U2

R26
JP15

R16
R6

JP11

R18
R8

C12

C14

JP23

JP24

UX41

RX57

UX37

UX42

PB2

PB3

PE3
R19
PE5
R9
PE7

C13

C17

C20
C19
UX33

U3

RX47

PB1

R10

RX89
UX31

PB0

R9

D1
R27

UX3

R43

PA6

PA7

R3

R26

U8

Y2

R28

RP2

U9

C55
R48

U17

C38

JP4

PA4

PA5

R2

C30
C31

C53

C66

C54
R47

R33 R32

R30

JP2

C28 C29

C51 C52

Y3

C46 C45C44 R29
C36
RX97
RX49
RX55
R31

R10

PA3

U1

C50

J1

PROG

C32

R20

PA2

L9

L8

C20

C26
C27

C72

C48

C24
R29
C25

PA1

JP3

Q1

R25

R24

Q1

RX43

C56

JP1

/RST_IN
PA0

R8

C10

Y1

U6
C34
C35

C49

U18
C71

C15

C42
C43

C33 U5

U7

C47

R51

T1

J2

LINK

DS2

R37

R46

R25

C41 R35

DS1
R36

R5

C16

C13

/IORD

VBAT
EXT

R1

L2

JP16
JP6
JP5
JP12
JP4
JP3
JP14
JP8
C16 JP7
JP18
JP9
JP10
C18

C18
U3

PROG R4

R7
R6

L3

C15

C7

L7

C9

R20

L6

L4

/IOWR

J1

C8

C14

C11

L5

RCM1

TXC RXC

JP1
C3

C4
+3.3 V

D2

JP2
R34

C12

J2
GND

/RST_OUT

CX17

GND
C6

S1
RESET

RXD TXD

GND

DIAG

L1

UX4

CX29

DS1
D1

1

BT1
UX49

UX47

R27
R28

R1

U1

C2

C5

Blue
shrink wrap

RESET

C1

ACT

To
PC COM port

Programming
Cable
Colored
edge

1

S3

GND

GND

GND

Figure 4. Connect Programming Cable and Power Supply

NOTE: Be sure to use the programming cable (part number 101-0542) supplied with this
Development Kit—the programming cable has blue shrink wrap around the RS-232
converter section located in the middle of the cable. Programming cables with red or
clear shrink wrap from other Z-World or Rabbit Semiconductor kits are not designed to
work with RCM4000 modules.

Connect the other end of the programming cable to a COM port on your PC.
NOTE: Some PCs now come equipped only with a USB port. It may be possible to use
an RS-232/USB converter (Part No. 540-0070) with the programming cable supplied
with the RCM4000 Development Kit. Note that not all RS-232/USB converters work
with Dynamic C.
10

RabbitCore RCM4000

2.2.4 Connect Power
Once all the other connections have been made, you can connect power to the Prototyping
Board. Connect the AC adapter to 3-pin header J1 on the Prototyping Board as shown in
Figure 4 above. The connector may be attached either way as long as it is not offset to one
side—the center pin of J1 is always connected to the positive terminal, and either edge pin
is ground.
Plug in the AC adapter. The PWR LED on the Prototyping Board next to the power connector at J1 should light up. The RCM4000 and the Prototyping Board are now ready to be
used.
NOTE: A RESET button is provided on the Prototyping Board next to the battery holder
to allow a hardware reset without disconnecting power.
Other Power-Supplies

Development Kits sold outside North America include a header connector that may be
used to connect your power supply to 3-pin header J1 on the Prototyping Board. The
power supply should deliver 8 V–30 V DC at 8 W.

User’s Manual

11

2.3 Run a Sample Program
If you already have Dynamic C installed, you are now ready to test your programming
connections by running a sample program. Start Dynamic C by double-clicking on the
Dynamic C icon or by double-clicking on dcrab_XXXX.exe in the Dynamic C root
directory, where XXXX are version-specific characters.
If you are using a USB port to connect your computer to the RCM4000, choose Options >
Project Options and select “Use USB to Serial Converter” under the Communications
tab. You may have to determine which COM port was assigned to the RS-232/USB
converter.
2.3.1 Run a Sample Program
Find the file PONG.C, which is in the Dynamic C SAMPLES folder. To run the program,
open it with the File menu, compile it using the Compile menu, and then run it by selecting
Run in the Run menu. The STDIO window will open on your PC and will display a small
square bouncing around in a box.
2.3.2 Troubleshooting
If Dynamic C appears to compile the BIOS successfully, but you then receive a communication 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 in the Dynamic C Options > Project Options >
Communications menu. Select a slower Max download baud rate.
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.
If you receive the message No Rabbit Processor Detected, the programming
cable may be connected to the wrong COM port, a connection may be faulty, or the target
system may not be powered up. First, check to see that the power LED on the Prototyping
Board is lit and that the jumper across pins 5–6 of header JP10 on the Prototyping Board is
installed. If the LED is lit, check both ends of the programming cable to ensure that it is
firmly plugged into the PC and the programming port on the Prototyping Board. Ensure
that the module is firmly and correctly installed in its connectors on the Prototyping Board.
If there are no faults with the hardware, select a different COM port within Dynamic C.
From the Options menu, select Project Options, then select Communications. Select
another COM port from the list, then click OK. Press  to force Dynamic C to
recompile the BIOS. If Dynamic C still reports it is unable to locate the target system, repeat
the above steps until you locate the active COM port.You should receive a message Bios
compiled successfully once this step is completed successfully.
12

RabbitCore RCM4000

2.4 Where Do I Go From Here?
If the sample program ran fine, you are now ready to go on to the sample programs in
Chapter 3 and to develop your own applications. The sample programs can be easily modified for your own use. The user's manual also provides complete hardware reference information and software function calls for the RCM4000 and the Prototyping Board.

For advanced development topics, refer to the Dynamic C User’s Manual, also in the
online documentation set.
2.4.1 Technical Support
NOTE: If you purchased your RCM4000 through a distributor or through a Rabbit Semiconductor or Z-World 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 Semiconductor/Z-World Technical Bulletin Board at
www.rabbit.com/support/bb/.
• Use the Technical Support e-mail form at www.rabbit.com/support/.

User’s Manual

13

14

RabbitCore RCM4000

3. RUNNING SAMPLE PROGRAMS
To develop and debug programs for the RCM4000 (and for all
other Z-World and Rabbit Semiconductor hardware), you must
install and use Dynamic C. This chapter provides a tour of its
major features with respect to the RCM4000.
3.1 Introduction
To help familiarize you with the RCM4000 modules, Dynamic C includes several sample
programs. Loading, executing and studying these programs will give you a solid hands-on
overview of the RCM4000’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 ANSI C.
If you do not, see the introductory pages of the Dynamic C User’s Manual for a suggested reading list.

In order to run the sample programs discussed in this chapter and elsewhere in this manual,
1. Your module must be plugged in to the Prototyping Board as described in Chapter 2,
“Getting Started.”
2. Dynamic C must be installed and running on your PC.
3. The programming cable must connect the programming header on the module to your
PC.
4. Power must be applied to the module through the Prototyping Board.
Refer to Chapter 2, “Getting Started,” if you need further information on these steps.
To run a sample program, open it with the File menu (if it is not still open), then compile
and run it by pressing F9.
Each sample program has comments that describe the purpose and function of the program. Follow the instructions at the beginning of the sample program.
More complete information on Dynamic C is provided in the Dynamic C User’s Manual.

User’s Manual

15

3.2 Sample Programs
Of the many sample programs included with Dynamic C, several are specific to the
RCM4000 modules. These programs will be found in the SAMPLES\RCM4000 folder.
• CONTROLLED.C—Demonstrates use of the digital outputs by having you turn LEDs
DS2 and DS3 on the Prototyping Board on or off from the STDIO window on your PC.
Parallel Port B bit 2 = LED DS2
Parallel Port B bit 3 = LED DS3
Once you compile and run CONTROLLED.C, the following display will appear in the
Dynamic C STDIO window.

Press “2” or “3” on your keyboard to select LED DS2 or DS3 on the Prototyping
Board. Then follow the prompt in the Dynamic C STDIO window to turn the LED ON
or OFF. A logic low will light up the LED you selected.
• FLASHLED1.C—demonstrates the use of assembly language to flash LEDs DS2 and
DS3 on the Prototyping Board at different rates. Once you have compiled and run this
program, LEDs DS2 and DS3 will flash on/off at different rates.
• FLASHLED2.C—demonstrates the use of cofunctions and costatements to flash LEDs
DS2 and DS3 on the Prototyping Board at different rates. Once you have compiled and
run this program, LEDs DS2 and DS3 will flash on/off at different rates.

16

RabbitCore RCM4000

• LOW_POWER.C—demonstrates how to implement a function in RAM to reduce power
consumption by the Rabbit microprocessor. There are four features that lead to the lowest possible power draw by the microprocessor.
1. Run the CPU from the 32 kHz crystal.
2. Turn off the high-frequency crystal oscillator.
3. Run from RAM.
4. Ensure that internal I/O instructions do not use CS0.

Once you are ready to compile and run this sample program, use  instead of
just F9. This will disable polling, which will allow Dynamic C to continue debugging
once the target starts running off the 32 kHz oscillator.
This sample program will toggle LEDs DS2 and DS3 on the Prototyping Board. You
may use an oscilloscope. DS2 will blink the fastest. After switching to low power, both
LEDs will blink together.
• TAMPERDETECTION.C—demonstrates how to detect an attempt to enter the bootstrap
mode. When an attempt is detected, the battery-backed onchip-encryption RAM on the
Rabbit 4000 is erased. This battery-backed onchip-encryption RAM can be useful to
store data such as an AES encryption key from a remote location.
This sample program shows how to load and read the battery-backed onchip-encryption
RAM and how to enable a visual indicator.
Once this sample is compiled running (you have pressed the F9 key while the sample
program is open), remove the programming cable and press the reset button on the
Prototyping Board to reset the module. LEDs DS2 and DS3 will be flashing on and off.
Now press switch S2 to load the battery-backed RAM with the encryption key. The
LEDs are now on continuously. Notice that the LEDs will stay on even when you press
the reset button on the Prototyping Board.
Reconnect the programming cable briefly and unplug it again. The LEDs will be flashing because the battery-backed onchip-encryption RAM has been erased. Notice that
the LEDs will continue flashing even when you press the reset button on the Prototyping Board.
You may press switch S2 again and repeat the last steps to watch the LEDs.
• TOGGLESWITCH.C—demonstrates the use of costatements to detect switch presses
using the press-and-release method of debouncing. LEDs DS2 and DS3 on the Prototyping Board are turned on and off when you press switches S2 and S3. S2 and S3 are
controlled by PB4 and PB5 respectively.
Once you have loaded and executed these five programs and have an understanding of
how Dynamic C and the RCM4000 modules interact, you can move on and try the other
sample programs, or begin building your own.

User’s Manual

17

3.2.1 Use of NAND Flash (RCM4000 only)
The following sample programs can be found in the SAMPLES\RCM4000\NANDFlash folder.

• 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 redirected to a serial port.
When the sample program starts running, it attempts to communicate with the userselected 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 win.for inspection.
Note that an error message might appear when the first 32 pages (0x20 pages) are
“dumped.” You may ignore the error message.
• 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 communicate with the NAND flash chip selected by the user. Once a NAND flash chip is found,
the user can execute various commands 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 to specified
pages.
CAUTION: When you run this sample program, enabling the #define
NFLASH_CANERASEBADBLOCKS macro makes it possible to write to bad blocks.

• NFLASH_LOG.c—This program runs a simple Web server and stores a log of hits in
the NAND flash.
This log can be viewed and cleared from a browser by connecting the RJ-45 jack on the
RCM4000 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.

18

RabbitCore RCM4000

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 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 “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  or  to exit the various dialog boxes.

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.
This sample program does not exhibit ideal behavior in its method of writing to the
NAND flash. However, the inefficiency attributable to 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.
• NFLASH_ERASE.c—This program is a utility to erase all the good blocks on a NAND
flash chip. When the program starts running, it attempts to establish communication
with the NAND flash chip selected by the user. If the communication is successful, the
progress in erasing the blocks is displayed in the Dynamic C STDIO window as the
blocks are erased.
User’s Manual

19

3.2.2 Serial Communication
The following sample programs are found in the SAMPLES\RCM4000\SERIAL folder.
• FLOWCONTROL.C—This program demonstrates how to configure Serial Port D for
CTS/RTS with serial data coming from Serial Port C (TxC) at 115,200 bps. The serial
data received are displayed in the STDIO window.
To set up the Prototyping Board, you will need to tie TxD and RxD
together on the RS-232 header at J4, and you will also tie TxC and
RxC together using the jumpers supplied in the Development Kit as
shown in the diagram.

RxC TxC

J4

TxD RxD GND

A repeating triangular pattern should print out in the STDIO window.
The program will periodically switch flow control on or off to demonstrate the effect of
no flow control.
If you have two Prototyping Boards with modules, run this sample program on the
sending board, then disconnect the programming cable and reset the sending board so
that the module is operating in the Run mode. Connect TxC, TxD, and GND on the
sending board to RxC, RxD, and GND on the other board, then, with the programming
cable attached to the other module, run the sample program.
• PARITY.C—This program demonstrates the use of parity modes by
repeatedly sending byte values 0–127 from Serial Port C to Serial Port D.
The program will switch between generating parity or not on Serial
Port C. Serial Port D will always be checking parity, so parity errors
should occur during every other sequence.

RxC TxC

J4
TxD RxD GND

To set up the Prototyping Board, you will need to tie TxC and RxD together on the
RS-232 header at J4 using one of the jumpers supplied in the Development Kit as
shown in the diagram.
The Dynamic C STDIO window will display the error sequence.
• SIMPLE3WIRE.C—This program demonstrates basic RS-232 serial
communication. Lower case characters are sent by TxC, and are
received by RxD. The characters are converted to upper case and are
sent out by TxD, are received by RxC, and are displayed in the
Dynamic C STDIO window.

RxC TxC

J4
TxD RxD GND

To set up the Prototyping Board, you will need to tie TxD and RxC together on the
RS-232 header at J4, and you will also tie RxD and TxC together using the jumpers
supplied in the Development Kit as shown in the diagram.

20

RabbitCore RCM4000

• SIMPLE5WIRE.C—This program demonstrates 5-wire RS-232 serial communication
with flow control on Serial Port D and data flow on Serial Port C.
To set up the Prototyping Board, you will need to tie TxD and RxD
together on the RS-232 header at J4, and you will also tie TxC and
RxC together using the jumpers supplied in the Development Kit as
shown in the diagram.

RxC TxC

J4

TxD RxD GND

Once you have compiled and run this program, you can test flow control by disconnecting TxD from RxD while the program is running. Characters will no
longer appear in the STDIO window, and will display again once TxD is connected
back to RxD.
If you have two Prototyping Boards with modules, run this sample program on the
sending board, then disconnect the programming cable and reset the sending board so
that the module is operating in the Run mode. Connect TxC, TxD, and GND on the
sending board to RxC, RxD, and GND on the other board, then, with the programming
cable attached to the other module, run the sample program. Once you have compiled
and run this program, you can test flow control by disconnecting TxD from RxD as
before while the program is running.
• SWITCHCHAR.C—This program demonstrates transmitting and then receiving an
ASCII string on Serial Ports C and D. It also displays the serial data received from both
ports in the STDIO window.
To set up the Prototyping Board, you will need to tie TxD and RxC
together on the RS-232 header at J4, and you will also tie RxD and
TxC together using the jumpers supplied in the Development Kit as
shown in the diagram.

RxC TxC

J4
TxD RxD GND

Once you have compiled and run this program, press and release
switches S2 and S3 on the Prototyping Board. The data sent between the serial ports
will be displayed in the STDIO window.

User’s Manual

21

3.2.3 A/D Converter Inputs (RCM4000 only)
The following sample programs are found in the SAMPLES\RCM4000\ADC folder.
• AD_CAL_CHAN.C—Demonstrates how to recalibrate one single-ended analog input
channel with one gain using two known voltages to generate the calibration constants
for that channel. The constants will be rewritten into the user block data area.
Connect a positive voltage to an analog input channel on the Prototyping Board, and
connect the ground to GND. Use a voltmeter to measure the voltage, and follow the instructions in the Dynamic C STDIO window. Remember that analog input LN7 on the Prototyping
Board is used with the thermistor and should not be used with this sample program.
NOTE: The above sample program will overwrite any existing calibration constants.

• AD_RDVOLT_ALL.C—Demonstrates how to read all single-ended A/D input channels
using previously defined calibration constants. Coefficients are read from the simulated
EEPROM in the flash memory to compute equivalent voltages, and cannot be run in
RAM.
Compile and run this sample program once you have connected a positive voltage from
0–20 V DC to an analog input (except LN7) on the Prototyping Board, and ground to
GND. Follow the prompts in the Dynamic C STDIO window. Computed raw data and
equivalent voltages will be displayed.
• AD_SAMPLE.C—Demonstrates how to how to use a low level driver on single-ended
inputs. The program will continuously display the voltage (averaged over 10 samples)
that is present on the A/D converter channels (except LN7). Coefficients are read from
the simulated EEPROM in the flash memory to compute equivalent voltages, so the
sample program cannot be run in RAM.
Compile and run this sample program once you have connected a positive voltage from
0–20 V DC to an analog input (except LN7) on the Prototyping Board, and ground to
GND. Follow the prompts in the Dynamic C STDIO window. Computed raw data and
equivalent voltages will be displayed. If you attach a voltmeter between the analog
input and ground, you will be able to observe that the voltage in the Dynamic C STDIO
window tracks the voltage applied to the analog input as you vary it.
• THERMISTOR.C—Demonstrates how to use analog input LN7 to calculate temperature
for display to the STDIO window. This sample program assumes that the thermistor is
the one included in the Development Kit whose values for beta, series resistance, and
resistance at standard temperature are given in the part specification.
Install the thermistor at location JP25 on the Prototyping Board before running this
sample program.
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 SETRTCKB.C sample program from
the Dynamic C SAMPLES\RTCLOCK folder, using the onscreen prompts. The
RTC_TEST.C sample program in the Dynamic C SAMPLES\RTCLOCK folder provides
additional examples of how to read and set the real-time clock.
22

RabbitCore RCM4000

4. HARDWARE REFERENCE
Chapter 4 describes the hardware components and principal hardware
subsystems of the RCM4000. Appendix A, “RCM4000 Specifications,” provides complete physical and electrical specifications.
Figure 5 shows the Rabbit-based subsystems designed into the RCM4000.

Ethernet
SRAM
Program
Flash

32 kHz 44.2 MHz
osc
osc

RABBIT ®
4000

NAND

Flash

A/D Converter

Customer-specific
applications
CMOS-level signals

Level
converter
RS-232, RS-485
serial communication
drivers on motherboard

RabbitCore Module
Figure 5. RCM4000 Subsystems

User’s Manual

23

4.1 RCM4000 Digital Inputs and Outputs
Figure 6 shows the RCM4000 pinouts for header J3.
J3
+3.3 V_IN
/RESET_OUT
/IOWR
VBAT_EXT
PA1
PA3
PA5
PA7
PB1
PB3
PB5
PB7
PC1
PC3
PC5
PC7
PE1
PE3
PE5/SMODE0
PE7/STATUS
LN1
LN3
LN5
LN7
n.c./VREF

GND
/IORD
/RESET_IN
PA0
PA2
PA4
PA6
PB0
PB2
PB4
PB6
PC0
PC2
PC4
PC6
PE0
PE2
PE4
PE6/SMODE1
LN0
LN2
LN4
LN6
CONVERT
GND

n.c. = not connected
Note: These pinouts are as seen on
the Bottom Side of the module.

Figure 6. RCM4000 Pinout

Headers J3 is a standard 2 × 25 IDC header with a nominal 1.27 mm pitch.

24

RabbitCore RCM4000

Figure 7 shows the use of the Rabbit 3000 microprocessor ports in the RCM4000 modules.

PC0, PC2
PC1, PC3

PA0–PA7

PB2–PB7

PD0–PD7

Port A

Port B

Port D

Port C

RABBIT®

Port E

(Serial Ports C & D)
Serial Ports E & F

PB1, PC6
PC7, /RES
PC4*
PC5*
* PC4 and PC5 are
not available on
RCM4100 module.

Programming
Port
(Serial Port A)

A/D Converter
(Serial Port B)

RAM

PE0–PE7

4000

Real-Time Clock
Watchdog
11 Timers
Slave Port
Clock Doubler

Backup Battery
Support

/RES_IN
/IORD

Misc. I/O

/RESET_OUT,
/IOWR,
STATUS
SMODE0
SMODE1

Flash

Figure 7. Use of Rabbit 4000 Ports

The ports on the Rabbit 4000 microprocessor used in the RCM4000 are configurable, and
so the factory defaults can be reconfigured. Table 2 lists the Rabbit 4000 factory defaults
and the alternate configurations.

User’s Manual

25

Table 2. RCM4000 Pinout Configurations
Pin

Pin Name

Default Use

Alternate Use

Notes

1

+3.3 V_IN

2

GND

3

/RES_OUT

Reset output

4

/IORD

Input

External read strobe

5

/IOWR

Output

External write strobe

6

/RESET_IN

Input

Input to Reset Generator

7

VBAT_EXT

Battery input

Reset input

Reset output from Reset
Generator

8–15

PA[0:7]

Input/Output

Slave port data bus
(SD7–SD1)
External I/O data bus
(ID7–ID1)

16

PB0

Input/Output

SCLKB
External I/O Address IA6

CLKB (used by RCM4000
A/D converter)

17

PB1

Input/Output

SCLKA
External I/O Address IA7

Programming port CLKA

18

PB2

Input/Output

/SWR
External I/O Address IA0

19

PB3

Input/Output

/SRD
External I/O Address IA1

20

PB4

Input/Output

SA0
External I/O Address IA2

21

PB5

Input/Output

SA1
External I/O Address IA3

22

PB6

Input/Output

/SCS
External I/O Address IA4

23

PB7

Input/Output

/SLAVATN
External I/O Address IA5

26

RabbitCore RCM4000

Table 2. RCM4000 Pinout Configurations (continued)
Pin

24

Pin Name

PC0

Default Use

Alternate Use

Input/Output

TXD
I/O Strobe I0
Timer C0
TCLKF

25

PC1

Input/Output

RXD/TXD
I/O Strobe I1
Timer C1
RCLKF
Input Capture

26

PC2

Input/Output

TXC/TXF
I/O Strobe I2
Timer C2

Input/Output

RXC/TXC/RXF
I/O Strobe I3
Timer C3
SCLKD
Input Capture

Input/Output

TXB
I/O Strobe I4
PWM0
TCLKE

Input/Output

RXB/TXB
I/O Strobe I5
PWM1
RCLKE
Input Capture

Input/Output

TXA/TXE
I/O Strobe I6
PWM2

Input/Output

RXA/TXA/RXE
I/O Strobe I7
PWM3
SCLKC
Input Capture

Input/Output

I/O Strobe I0
A20
Timer C0
SCLKD/TCLKF
INT0
QRD1B

27

28

29

30

31

32

PC3

PC4

PC5

PC6

PC7

PE0

User’s Manual

Notes

Serial Port D

Serial Port C

Serial Port B (used by
RCM4000 A/D converter)

Programming port

27

Table 2. RCM4000 Pinout Configurations (continued)
Pin

33

34

35

36

37

38

39

28

Pin Name

PE1

PE2

PE3

PE4

PE5/SMODE0

PE6/SMODE1

PE7/STATUS

Default Use

Alternate Use

Notes

Input/Output

I/O Strobe I1
A21
Timer C1
RXD/RCLKF
INT1
QRD1A
Input Capture

Input/Output

I/O Strobe I2
A22
Timer C2
TXF/SCLKC
DREQ0
QRD2B

Input/Output

I/O Strobe I3
A23
Timer C3
RXC/RXF/SCLKD
DREQ1
QRD2A
Input Capture

Input/Output

I/O Strobe I4
/A0
INT0
PWM0
TCLKE

Input/Output

I/O Strobe I5
INT1
PWM1
RXB/RCLKE
Input Capture

SMODE0 is the default
configuration

Input/Output

I/O Strobe I6
PWM2
TXE
DREQ0

SMODE1 is the default
configuration

Input/Output

I/O Strobe I7
PWM3
RXA/RXE/SCLKC
DREQ1
Input Capture

STATUS is the default
configuration

RabbitCore RCM4000

Table 2. RCM4000 Pinout Configurations (continued)
Pin

Pin Name

Default Use

Alternate Use

Notes

40–47

LN[0:7]

Analog Input

48

CONVERT

Analog Input

49

VREF

Analog reference
voltage

1.15 V/2.048 V/2.500 V
on-chip ref. voltage
(RCM4000 only)

50

GND

Ground

Analog ground

A/D converter
(RCM4000 only)

4.1.1 Memory I/O Interface
The Rabbit 4000 address lines (A0–A19) and all the data lines (D0–D7) are routed internally to the onboard flash memory and SRAM chips. I/0 write (/IOWR) and I/0 read
(/IORD) are available for interfacing to external devices.
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 auxiliary I/O bus for any reason, you must add the following line at the
beginning of your program.
#define PORTA_AUX_IO

// required to enable auxiliary I/O bus

Selected pins on Parallel Ports D and E as specified in Table 2 may be used for input
capture, quadrature decoder, DMA, and pulse-width modulator purposes.
4.1.2 Other Inputs and Outputs
The status and the two SMODE pins, SMODE0 and SMODE1, can be brought out to
header J3 instead of PE5–PE7 as explained in Appendix A.6.
/RESET_IN is normally associated with the programming port, but may be used as an
external input to reset the Rabbit 4000 microprocessor and the RCM4000 memory.
/RESET_OUT is an output from the reset circuitry that can be used to reset other
peripheral devices.

User’s Manual

29

4.2 Serial Communication
The RCM4000 module does not have any serial transceivers directly on the board. However, a serial interface may be incorporated on the board the RCM4000 is mounted on. For
example, the Prototyping Board has an RS-232 transceiver chip.
4.2.1 Serial Ports
There are five serial ports designated as Serial Ports A, B, C, D, and F. All five 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 asynchronous or as a clocked serial port once application development has been completed and
the RCM4000 is operating in the Run Mode.
Serial Port B is used by the A/D converter, and is not available for other use off the
RCM4000, but is available on the RCM4010.
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 F can also be configured as an SDLC/HDLC serial port. The IrDA protocol is
also supported in SDLC format by this serial port.
Table 3 summarizes the possible parallel port pins for the serial ports and their clocks.
Table 3. Rabbit 4000 Serial Port and Clock Pins

Serial Port A

TXA

PC6, PC7, PD6

RXA

PC7, PD7, PE7

SCLKA

Serial Port B

Serial Port D

PB1

TXB

PC4, PC5, PD4

RXB

PC5, PD5, PE5

TXD

PC0, PC1

RXD

PC1, PD1, PE1

SCLKD

PD0, PE0, PE3, PC3

TXF

PD6, PE6, PC6

RXF

PD3, PE3, PC3

PB0

RCLKF

PD1, PE1, PC1

TXC

PC2, PC3

TCLKF

PD0, PE0, PC0

RXC

PC3, PD3, PE3

TCLKF

PD0, PE0, PC0

Serial Port F
SCLKB

Serial Port C

SCLKC

PD2, PE2, PE7, PC7

RCLKF must be selected to be on the same parallel port as TXF.

30

RabbitCore RCM4000

4.2.2 Ethernet Port
Figure 8 shows the pinout for the RJ-45 Ethernet port (J2). Note that some Ethernet connectors are numbered in reverse to the order used here.
ETHERNET
1

8

1.
2.
3.
6.

RJ-45 Plug

E_Tx+
E_Tx–
E_Rx+
E_Rx–

RJ-45 Jack

Figure 8. RJ-45 Ethernet Port Pinout

Two LEDs are placed next to the RJ-45 Ethernet jack, one to indicate an Ethernet link
(LINK) and one to indicate Ethernet activity (ACT).
The RJ-45 connector is shielded to minimize EMI effects to/from the Ethernet signals.

User’s Manual

31

4.2.3 Programming Port
The RCM4000 is programmed via the 10-pin header labeled J1. The programming port
uses the Rabbit 4000’s Serial Port A for communication. Dynamic C uses the programming
port to download and debug programs.
Serial Port A is also used for the following operations.
• Cold-boot the Rabbit 4000 on the RCM4000 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.
Alternate Uses of the 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 via the DIAG connector on the
programming cable.
In addition to Serial Port A, the Rabbit 4000 startup-mode (SMODE0, SMODE1), status,
and reset pins are available on the programming port.
The two startup-mode pins determine what happens after a reset—the Rabbit 4000 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 output once a program has been downloaded and
is running.
The reset pin is an external input that is used to reset the Rabbit 4000.
Refer to the Rabbit 4000 Microprocessor User’s Manual for more information.

32

RabbitCore RCM4000

4.3 Programming Cable
The programming cable is used to connect the programming port of the RCM4000 to a PC
serial COM port. The programming cable converts the RS-232 voltage levels used by the
PC serial port to the CMOS voltage levels used by the Rabbit 4000.
When the PROG connector on the programming cable is connected to the programming
port on the RCM4000, 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 RCM4000
with the RCM4000 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 RCM4000 is automatically in Program Mode when the PROG connector on the programming cable is attached, and is automatically in Run Mode when no programming
cable is attached. When the Rabbit 4000 is reset, the operating mode is determined by the
status of the SMODE pins. When the programming cable’s PROG connector is attached,
the SMODE pins are pulled high, placing the Rabbit 4000 in the Program Mode. When the
programming cable’s PROG connector is not attached, the SMODE pins are pulled low,
causing the Rabbit 4000 to operate in the Run Mode.
RESET RCM4000 when changing mode:
Press RESET button (if using Prototyping Board), OR
Remove, then reapply power
after removing or attaching programming cable.

3-pin
power connector
J1
PWR

J1

PC2

PC3

PC4

PC5

PC6

PC7

PE0

PD3
LN3
PD5
LN5

PD2
LN2
PD4
LN4
PD6
LN6

PD7
LN7

CVT

TXC RXC
UX29

J4

GND
UX12

CX25

DS2

AGND

LN1IN

RX73

JP25

LN0IN

LN2IN

J3

RX79

DS3

R21

R22

UX16

R24

1

S2

UX14

CX27
CX23 RX77

R23

R11 R12

LN3IN

AGND

RX75

LN5IN

AGND

RX85

PD0
LN0

LN4IN

RX63

UX10

RX67

LN7IN

VREF

UX30

RX11

PE6

VREF

R17
R7

PD1
LN1

RX83

CVT

R15
R5

PE4

AGND

R13
R3

PE2

JP13

JP22
JP20

JP21

JP17

R14
R4

C9

C7

C8

C11

RX61

PE1

RX87

PC1

CX41

PC0

RX81

CX39

PB6

PB7

GND

UX45

PB4

PB5

RX65

C23

C22

+5 V

+3.3 V

LN6IN

U2

R26

JP19

JP15

R16
R6

JP11

R18
R8

C10

C12

C14

JP23

JP24

UX41
UX42

RX57

RX59

UX37

UX33

PB3

PE3
R19
PE5
R9
PE7

C13

C17

C20
C19

RX47

RX89
UX31

R43

U3

R28

UX3

PB2

R9

JP4

D1
R27

C38

PB0

PB1

R2

R26

U8

R33 R32

R30

RP2

C46 C45C44 R29
C36
RX97
RX49
RX55
R31

JP2

C32

R10

PA6

PA7

R10

C30
C31

Y2

C71

C56

U9

C55
R48

U17

U18

C28 C29

RX43

C53

C66

C51 C52
C54
R47

Y3

J1

PROG

R46

R20

PA4

PA5

U1

C50

C49

PA3

R8

C26
C27

C72

C48

C24
R29
C25

PA2

JP3

Q1

R25

C33 U5

Q1

R24

C34
C35

PA1

L9

L8

C20

C15

C42
C43

JP1

/RST_IN
PA0

R3

C10

Y1

U7

C47

U6

LINK

DS2

R37

R51

T1

J2

R25

C41 R35

DS1
R36

R5

C16

C13

/IORD

VBAT
EXT

R1

L2

JP16
JP6
JP5
JP12
JP4
JP3
JP14
JP8
C16 JP7
JP18
JP9
JP10
C18

C18

PROG R4

R7
R6

L3

C15

C7

L4

U3

J1

C8

L7

C9

R20

L6

/IOWR

RXD TXD

JP1
C3

C4
+3.3 V

D2

JP2
R34

C14

C11

L5

J2
GND

/RST_OUT
RCM1

S1
RESET

CX17

GND

D1

R2

GND

C6

C12

UX4

CX29

DS1

DIAG

L1

BT1
UX49

UX47

R27
R28

R1

1

C2

C5

Blue
shrink wrap

RESET

U1

C1

ACT

To
PC COM port

Programming
Cable
Colored
edge

1

S3

GND

GND
GND

Figure 9. Switching Between Program Mode and Run Mode
User’s Manual

33

A program “runs” in either mode, but can only be downloaded and debugged when the
RCM4000 is in the Program Mode.
Refer to the Rabbit 4000 Microprocessor User’s Manual for more information on the programming port.
4.3.2 Standalone Operation of the RCM4000
Once the RCM4000 has been programmed successfully, remove the programming cable
from the programming connector and reset the RCM4000. The RCM4000 may be reset by
removing, then reapplying power, or by pressing the RESET button on the Prototyping
Board. The RCM4000 module may now be removed from the Prototyping Board for enduse installation.
CAUTION: Power to the Prototyping Board or other boards should be disconnected
when removing or installing your RCM4000 module to protect against inadvertent
shorts across the pins or damage to the RCM4000 if the pins are not plugged in correctly. Do not reapply power until you have verified that the RCM4000 module is
plugged in correctly.

34

RabbitCore RCM4000

4.4 A/D Converter (RCM4000 only)
The RCM4000 has an onboard ADS7870 A/D converter whose scaling and filtering are
done via the motherboard on which the RCM4000 module is mounted. The A/D converter
multiplexes converted signals from eight single-ended or four differential inputs to Serial
Port B on the Rabbit 4000.
The eight analog input pins, LN0–LN7, each have an input impedance of 6–7 MΩ,
depending on whether they are used as single-ended or differential inputs. The input signal
can range from -2 V to +2 V (differential mode) or from 0 V to +2 V (single-ended mode).
Use a resistor divider such as the one shown in Figure 10 for the analog inputs.

R0

ADC

LN0

(RCM4000)
ADC

LN1
R0
C

C

R1

R1
3

BVREF

1

AGND

Figure 10. Resistor Divider Network for Analog Inputs

The R1 resistors are typically 20 kΩ to 100 kΩ, with a lower resistance leading to more
accuracy, but at the expense of a higher current draw. The R0 resistors would then be
180 kΩ to 900 kΩ for a 10:1 attenuator. The capacitor filters noise pulses on the A/D
converter input.
The actual voltage range for a signal going to the A/D converter input is also affected by
the 1, 2, 4, 5. 8, 10, 16, and 20 V/V software-programmable gains available on each channel
of the ADS7870 A/D converter. Thus, you must scale the analog signal with an attenuator
circuit and a software-programmable gain so that the actual input presented to the A/D
converter is within the range limits of the ADS7870 A/D converter chip (-2 V to + 2 V or
0 V to + 2 V).
The A/D converter chip can only accept positive voltages. With the R1 resistors connected
to ground, your analog circuit is well-suited to perform positive A/D conversions. When
the R1 resistors are tied to ground for differential measurements, both differential inputs
must be referenced to analog ground, and both inputs must be positive with respect to
analog ground.

User’s Manual

35

If a device such as a battery is
connected across two channels
R5
AIN0
for a differential measurement,
LN0 ADC
and it is not referenced to
2.2 nF
R13
Device +
analog ground, then the current
I
+
from the device will flow
2.2 nF
R14
through both sets of attenuator
R6
–
AIN1
resistors as shown in Figure 11.
LN1
This will generate a negative
voltage at one of the inputs,
Figure 11. Current Flow from Ungrounded
LN1, which will almost ceror Floating Source
tainly lead to inaccurate A/D
conversions. To make such differential measurements, connect the R1 resistors to the A/D converter’s internal reference
voltage, which is software-configurable for 1.15 V, 2.048 V, or 2.5 V. This internal reference
voltage is available on pin 49 of header J3 as VREF, and allows you to convert analog
input voltages that are negative with respect to analog ground.
NOTE: The amplifier inside the A/D converter’s internal voltage reference circuit has a
very limited output-current capability. The internal buffer can source up to 20 mA and
sink only up to 20 µA. Use a separate buffer amplifier if you need to supply any load
current.

The A/D converter’s CONVERT pin is available on pin 48 of header J3 and can be used as
a hardware means of forcing the A/D converter to start a conversion cycle. The CONVERT
signal is an edge-triggered event and has a hold time of two CCLK periods for debounce.
A conversion is started by an active (rising) edge on the CONVERT pin. The CONVERT
pin must stay low for at least two CCLK periods before going high for at least two CCLK
periods. Figure 12 shows the timing of a conversion start. The double falling arrow on
CCLK indicates the actual start of the conversion cycle.
Conversion starts

CCLK

BUSY
CONV

Figure 12. Timing Diagram for Conversion Start Using CONVERT Pin

Appendix B explains the implementation examples of these features on the Prototyping
Board.
36

RabbitCore RCM4000

4.4.1 A/D Converter Power Supply
The analog section is isolated from digital noise generated by other components by way of a
low-pass filter composed of C1, L1, and C3 on the RCM4000 as shown in Figure 13. The
+V analog power supply powers the A/D converter chip.

+3.3 V

+V
L1

C1
2.2 nF

C3
100 nF

Figure 13. Analog Supply Circuit

User’s Manual

37

4.5 Other Hardware
4.5.1 Clock Doubler
The RCM4000 takes advantage of the Rabbit 4000 microprocessor’s internal clock doubler.
A built-in clock doubler allows half-frequency crystals to be used to reduce radiated emissions. The 58.98 MHz frequency specified for the RCM4000 is generated using a
29.49 MHz crystal.
The clock doubler may be disabled if 58.98 MHz clock speeds are not required. Disabling
the Rabbit 4000 microprocessor’s internal clock doubler will reduce power consumption
and further reduce radiated emissions. The clock doubler is disabled with a simple global
macro as shown below.
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.
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.
4.5.2 Spectrum Spreader
The Rabbit 4000 features a spectrum spreader, which helps to mitigate EMI problems. By
default, the spectrum spreader is on automatically, but it may also be turned off or set to a
stronger setting. The means for doing so is through a simple global macro as shown below.
1. Select the “Defines” tab from the Dynamic C Options > Project Options menu.
2. For normal spreading, add the line
ENABLE_SPREADER=1

For strong spreading, add the line
ENABLE_SPREADER=2

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 setting will be used in a real application.

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.
NOTE: Refer to the Rabbit 4000 Microprocessor User’s Manual for more information
on the spectrum-spreading setting and the maximum clock speed.

38

RabbitCore RCM4000

4.6 Memory
4.6.1 SRAM
RCM4000 modules have 512K of data SRAM installed at U16.
4.6.2 Flash EPROM
All RCM4000 modules also have 512K of flash EPROM installed at U3.
NOTE: Rabbit Semiconductor 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, define a
“user block” area to store persistent data. The functions writeUserBlock and
readUserBlock are provided for this. Refer to the Rabbit 4000 Microprocessor
Designer’s Handbook for additional information.
4.6.3 NAND Flash
The RCM4000 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 Semiconductor for the NAND flash take care of the data-integrity and reliability
attributes.
Sample programs in the SAMPLES\RCM4000\NANDFlash folder illustrate the use of
the NAND flash. These sample programs are described in Section 3.2.1, “Use of NAND
Flash.”

User’s Manual

39

40

RabbitCore RCM4000

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 single-board computers and other devices
based on the Rabbit microprocessor. Chapter 5 describes the
libraries and function calls related to the RCM4000.
5.1 More About Dynamic C
Dynamic C has been in use worldwide since 1989. It is specially designed for programming embedded systems, and features quick compile and interactive debugging. A complete reference guide to Dynamic C is contained in the Dynamic C User’s Manual.
You have a choice of doing your software development in the flash memory or in the static
SRAM included on the RCM4000. 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 can be compiled directly to the battery-backed data SRAM on the
RCM4000 module, but 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. RCM4000 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 RCM4000 modules
running at 58.98 MHz.
NOTE: Do not depend on the flash memory sector size or type in your program logic.
The RCM4000 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 95 and later.
Programs can be downloaded at baud rates of up to 460,800 bps after the program compiles.

User’s Manual

41

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:
X Exceptionally fast support for floating-point arithmetic and transcendental functions.
X RS-232 and RS-485 serial communication.
X Analog and digital I/O drivers.
X I2C, SPI, GPS, file system.
X LCD display and keypad drivers.

• Powerful language extensions for cooperative or preemptive multitasking
• Loader utility program to load binary images into Z-World 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:
X Breakpoints—Set breakpoints that can disable interrupts.
X Single-stepping—Step into or over functions at a source or machine code level, µC/OS-II aware.
X 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.
X 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.
X Register window—All processor registers and flags are displayed. The contents of general registers
may be modified in the window by the user.
X Stack window—shows the contents of the top of the stack.
X Hex memory dump—displays the contents of memory at any address.
X 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.

42

RabbitCore RCM4000

5.2 Dynamic C Function Calls
5.2.1 Digital I/O
The RCM4000 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 auxiliary I/O bus on the Rabbit 4000 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/RCM4000 folder provide further
examples.
5.2.2 Serial Communication Drivers
Library files included with Dynamic C provide a full range of serial communications support. The RS232.LIB library provides a set of circular-buffer-based serial functions. The
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 performed between calls. For more information, see
the Dynamic C Function Reference Manual and Technical Note TN213, Rabbit Serial
Port Software.
5.2.3 SRAM Use
The RCM4000 module 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 maintains two
copies of each protected variable in the battery-backed SRAM. The compiler also generates
a flag to indicate which copy of the protected variable is valid at the current time. This flag
is also stored in the battery-backed SRAM. When a protected variable is updated, the
“inactive” copy is modified, and is made “active” only when the update is 100% complete.
This assures the integrity of the data in case a reset or a power failure occurs during the
update process. At power-on the application program uses the active copy of the variable
pointed to by its associated flag.

User’s Manual

43

The sample code below shows how a protected variable is defined and how its value can
be restored.
main() {
protected int state1, state2, state3;
...
_sysIsSoftReset();

// restore any protected variables

The bbram keyword may also 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
integrity 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
User’s Manual.

44

RabbitCore RCM4000

5.2.4 Prototyping Board Functions
The functions described in this section are for use with the Prototyping Board features.
The source code is in the Dynamic C LIB\RCM4xxx\RCM40xx.LIB library if you need
to modify it for your own board design.
NOTE: The analog input function calls are supported only by the RCM4000 model since
the RCM4010 does not have an A/D converter.

Other generic functions applicable to all devices based on Rabbit microprocessors are
described in the Dynamic C Function Reference Manual.
5.2.4.1 Board Initialization

void brdInit (void);
Call this function at the beginning of your program. This function initializes Parallel Ports A through E
for use with the Prototyping Board.
Summary of Initialization
1. I/O port pins are configured for Prototyping Board operation.
2. Unused configurable I/O are set as tied outputs.
3. RS-232 is not enabled.
4. LEDs are off.
5. The slave port is disabled.
RETURN VALUE

None.

User’s Manual

45

5.2.4.2 Alerts

void timedAlert(unsigned long timeout);
Polls the real-time clock until a timeout occurs. The RCM4000 will be in a low-power mode during this
time. Once the timeout occurs, this function call will enable the normal power source. The A/D converter
oscillator will be disabled and enabled.
PARAMETERS

timeout is the duration of the timeout in seconds
RETURN VALUE

None.
SEE ALSO
brdInit

void digInAlert(int dataport, int portbit,
int value, unsigned long timeout);
Polls a digital input for a set value or until a timeout occurs. The RCM4000 will be in a low-power mode
during this time. Once a timeout occurs or the correct byte is received, this function call will enable the
normal power source and exit.
PARAMETERS

dataport is the input port data register to poll (e.g., PADR).
portbit is the input port bit (0–7) to poll.
value is the value of 0 or 1 to receive.
timeout is the duration of the timeout in seconds (enter 0 for no timeout).
RETURN VALUE

None.

46

RabbitCore RCM4000

5.2.5 Analog Inputs (RCM4000 only)

unsigned int anaInConfig(unsigned int
instructionbyte, unsigned int cmd, long baud);
Use this function to configure the A/D converter. This function will address the A/D converter in
Register Mode only, and will return an error if you try the Direct Mode. Appendix B.4.3 provides
additional addressing and command information.
ADS7870 Signal

ADS7870 State

LN0

Input

AIN0

LN1

Input

AIN1

LN2

Input

AIN2

LN3

Input

AIN3

LN4

Input

AIN4

LN5

Input

AIN5

LN6

Input

AIN6

LN7

Input

AIN7

/RESET

Input

Board reset device

RISE/FALL

Input

Pulled up for SCLK active on rising edge

PIO0

Input

Pulled down

PIO1

Input

Pulled down

PIO2

Input

Pulled down

PIO3

Input

Pulled down

CONVERT

Input

Pulled down when not driven

BUSY

Output

CCLKCNTRL

Input

Pulled down; 0 state sets CCLK as input

CCLK

Input

Pulled down; external conversion clock

SCLK

Input

PB0; serial data transfer clock

SDI

Input

PC4; 3-wire mode for serial data input

SDO

Output

/CS

Input

BUFEN pulled up; active-low enables serial interface

BUFIN

Input

Driven by VREF

VREF

Output

Connected to BUFIN and BUFOUT

BUFOUT

Output

Driven by VREF

User’s Manual

RCM3400 Function/State

PE0 pulled down; logic high state converter is busy

PC5; serial data output /CS driven

47

PARAMETERS

instructionbyte is the instruction byte that will initiate a read or write operation at 8 or 16 bits on
the designated register address. For example,
checkid = anaInConfig(0x5F, 0, 9600);

// read ID and set baud rate

cmd are the command data that configure the registers addressed by the instruction byte. Enter 0 if you
are performing a read operation. For example,
i = anaInConfig(0x07, 0x3b, 0);

// write ref/osc reg and enable

baud is the serial clock transfer rate of 9600 to 57,600 bps. baud must be set the first time this function
is called. Enter 0 for this parameter thereafter, for example,
anaInConfig(0x00, 0x00, 9600);

// resets device and sets baud

RETURN VALUE

0 on write operations,
data value on read operations
SEE ALSO
anaInDriver, anaIn, brdInit

48

RabbitCore RCM4000

unsigned int anaInDriver(unsigned int cmd,
unsigned int len);
Reads the voltage of an analog input channel by serial-clocking an 8-bit command to the A/D converter
by its Direct Mode method. This function assumes that Mode1 (most significant byte first) and the A/D
converter oscillator have been enabled. See anaInConfig() for the setup.
The conversion begins immediately after the last data bit has been transferred. An exception error will
occur if Direct Mode bit D7 is not set.
PARAMETERS

cmd contains a gain code and a channel code as follows.
D7—1; D6–D4—Gain Code; D3–D0—Channel Code
Use the following calculation and the tables below to determine cmd:
cmd = 0x80 | (gain_code*16) + channel_code

Gain Code

Multiplier

0

×1

1

×2

2

×4

3

×5

4

×8

5

×10

6

×16

7

×20

Channel Code

Differential Input
Lines

Channel Code

Single-Ended
Input Lines*

4–20 mA
Lines

0

+AIN0 -AIN1

8

AIN0

AIN0*

1

+AIN2 -AIN3

9

AIN1

AIN1*

2

+AIN4 -AIN5

10

AIN2

AIN2*

3†

+AIN6 -AIN7

11

AIN3

AIN3

4

-AIN0 +AIN1

12

AIN4

AIN4

5

-AIN2 +AIN3

13

AIN5

AIN5

6

-AIN4 +AIN5

14

AIN6

AIN6

7‡

-AIN6 +AIN7

15

AIN7

AIN7*

* Negative input is ground.
† Not accessible on Prototyping Board
‡ Not accessible on Prototyping Board
len, the output bit length, is always 12 for 11-bit conversions

User’s Manual

49

RETURN VALUE

A value corresponding to the voltage on the analog input channel:
0–2047 for 11-bit conversions (bit 12 for sign)
-1 overflow or out of range
-2 conversion incomplete, busy bit timeout
SEE ALSO
anaInConfig, anaIn, brdInit

50

RabbitCore RCM4000

unsigned int anaIn(unsigned int channel,
int opmode, int gaincode);
Reads the value of an analog input channel using the Direct Mode method of addressing the A/D
converter. Note that it takes about 1 second to ensure an internal capacitor on the A/D converter is
charged when the function is called the first time.
PARAMETERS

channel is the channel number (0 to 7) corresponding to LN0_IN to LN7_IN
opmode is the mode of operation:
SINGLE—single-ended input
DIFF—differential input
mAMP—4–20 mA input
channel

SINGLE

DIFF

mAMP

0

+AIN0

+AIN0 -AIN1

+AIN0*

1

+AIN1

+AIN1 -AIN0*

+AIN1*

2

+AIN2

+AIN2 -AIN3

+AIN2*

3

+AIN3

+AIN3 -AIN2*

+AIN3

4

+AIN4

+AIN4 -AIN5

+AIN4

5

+AIN5

+AIN5 -AIN4*

+AIN5

6

+AIN6

+AIN6 -AIN7*

+AIN6

7

+AIN7

+AIN7 -AIN6*

+AIN7*

* Not accessible on Prototyping Board.
gaincode is the gain code of 0 to 7 (applies only to Prototyping Board):
Gain Code

Multiplier

Voltage Range
(V)

0

×1

0–22.5

1

×2

0–11.25

2

×4

0–5.6

3

×5

0–4.5

4

×8

0–2.8

5

×10

0–2.25

6

×16

0–1.41

7

×20

0–1.126

RETURN VALUE

A value corresponding to the voltage on the analog input channel:
0–2047 for 11-bit A/D conversions (bit 12 for sign)
ADOVERFLOW (defined macro = -4096) if overflow or out of range
ADTIMEOUT (defined macro = -4095) if conversion is incomplete or busy-bit timeout
SEE ALSO
anaIn, anaInConfig, anaInDriver
User’s Manual

51

int anaInCalib(int channel, int opmode,
int gaincode, int value1, float volts1,
int value2, float volts2);
Calibrates the response of the desired A/D converter channel as a linear function using the two conversion points provided. Four values are calculated and placed into global tables _adcCalibS,
_adcCalibD, and adcCalibM to be later stored into simulated EEPROM using the function
anaInEEWr(). Each channel will have a linear constant and a voltage offset.
PARAMETERS

channel is the analog input channel number (0 to 7) corresponding to LN0_IN to LN7_IN
opmode is the mode of operation:
SINGLE—single-ended input
DIFF—differential input
mAMP—milliamp input
channel

SINGLE

DIFF

mAMP

0

+AIN0

+AIN0 -AIN1

+AIN0*

1

+AIN1

+AIN1 -AIN0*

+AIN1*

2

+AIN2

+AIN2 -AIN3

+AIN2*

3

+AIN3

+AIN3 -AIN2*

+AIN3

4

+AIN4

+AIN4 -AIN5

+AIN4

5

+AIN5

+AIN5 -AIN4*

+AIN5

6

+AIN6

+AIN6 -AIN7*

+AIN6

7

+AIN7

+AIN7 -AIN6*

+AIN7*

* Not accessible on Prototyping Board.
gaincode is the gain code of 0 to 7:

Gain Code

Multiplier

Voltage Range*
(V)

0

×1

0–22.5

1

×2

0–11.25

2

×4

0–5.6

3

×5

0–4.5

4

×8

0–2.8

5

×10

0–2.25

6

×16

0–1.41

7

×20

0–1.126

* Applies to Prototyping Board.

52

RabbitCore RCM4000

value1 is the first A/D converter channel raw count value
volts1 is the voltage or current corresponding to the first A/D converter channel value (0 to +20 V or
4 to 20 mA)
value2 is the second A/D converter channel raw count value
volts2 is the voltage or current corresponding to the first A/D converter channel value (0 to +20 V or
4 to 20 mA)
RETURN VALUE

0 if successful.
-1 if not able to make calibration constants.
SEE ALSO
anaIn, anaInVolts, anaInmAmps, anaInDiff, anaInCalib, brdInit

User’s Manual

53

float anaInVolts(unsigned int channel,
unsigned int gaincode);
Reads the state of a single-ended analog input channel and uses the previously set calibration constants to
convert it to volts.
PARAMETERS

channel is the channel number (0 to 7) corresponding to LN0_IN to LN7_IN

Channel Code

Single-Ended
Input Lines*

Voltage Range†
(V)

0

+AIN0

0–22.5

1

+AIN1

0–22.5

2

+AIN2

0–22.5

3

+AIN3

0–22.5

4

+AIN4

0–22.5

5

+AIN5

0–22.5

6

+AIN6

0–22.5

7

+AIN7

0–2‡

* Negative input is ground.
† Applies to Prototyping Board.
‡ Used for thermistor in sample program.
gaincode is the gain code of 0 to 7.

Gain Code

Multiplier

Voltage Range*
(V)

0

×1

0–22.5

1

×2

0–11.25

2

×4

0–5.6

3

×5

0–4.5

4

×8

0–2.8

5

×10

0–2.25

6

×16

0–1.41

7

×20

0–1.126

* Applies to RCM3400 Prototyping Board.
RETURN VALUE

A voltage value corresponding to the voltage on the analog input channel.
ADOVERFLOW (defined macro = -4096) if overflow or out of range.
ADTIMEOUT (defined macro = -4095) if conversion is incomplete or busy-bit timeout.
SEE ALSO
anaInCalib, anaIn, anaInmAmps, brdInit

54

RabbitCore RCM4000

float anaInDiff(unsigned int channel,
unsigned int gaincode);
Reads the state of differential analog input channels and uses the previously set calibration constants to
convert it to volts.
PARAMETERS

channel is the analog input channel number (0 to 7) corresponding to LN0_IN to LN7_IN
channel

DIFF

Voltage Range
(V)

0

+AIN0 -AIN1

-22.5 to +22.5*

1

+AIN1 -AIN1

—

2

+AIN2 -AIN3

-22.5 to +22.5*

3

+AIN3 -AIN3

—

4

+AIN4 -AIN5

-22.5 to +22.5*

5

+AIN5 -AIN5

—

6

+AIN6 -AIN7

—

7

+AIN7 -AIN7

—

* Accessible on Prototyping Board.
gaincode is the gain code of 0 to 7.
Gain Code

Multiplier

Voltage Range*
(V)

0

×1

-22.5 – +22.5

1

×2

-11.25 – +11.25

2

×4

-5.6 – +5.6

3

×5

-4.5 – +4.5

4

×8

-2.8 – +2.8

5

×10

-2.25 – +2.25

6

×16

-1.41 – +1.41

7

×20

-1.126 – +1.126

* Applies to Prototyping Board.
RETURN VALUE

A voltage value corresponding to the voltage differential on the analog input channel.
ADOVERFLOW (defined macro = -4096) if overflow or out of range.
ADTIMEOUT (defined macro = -4095) if conversion is incomplete or busy-bit timeout.
SEE ALSO
anaInCalib, anaIn, anaInmAmps, brdInit

User’s Manual

55

float anaInmAmps(unsigned int channel);
Reads the state of an analog input channel and uses the previously set calibration constants to convert it
to current.
PARAMETERS

channel is the channel number (0–7):
Channel Code

4–20 mA
Input Lines*

0

+AIN0

1

+AIN1

2

+AIN2

3

+AIN3†

4

+AIN4*

5

+AIN5*

6

+AIN6*

7

+AIN7

* Negative input is ground.
† Applies to Prototyping Board.
RETURN VALUE

A current value between 4.00 and 20.00 mA corresponding to the current on the analog input channel.
ADOVERFLOW (defined macro = -4096) if overflow or out of range.
ADTIMEOUT (defined macro = -4095) if conversion is incomplete or busy-bit timeout.
SEE ALSO
anaInCalib, anaIn, anaInVolts

56

RabbitCore RCM4000

root int anaInEERd(unsigned int channel,
unsigned int opmode, unsigned int gaincode);
Reads the calibration constants, gain, and offset for an input based on their designated position in the
flash memory, and places them into global tables _adcCalibS, _adcCalibD, and _adcCalibM for
analog inputs. Depending on the flash size, the following macros can be used to identify the starting
address for these locations.
ADC_CALIB_ADDRS, address start of single-ended analog input channels
ADC_CALIB_ADDRD, address start of differential analog input channels
ADC_CALIB_ADDRM, address start of milliamp analog input channels
NOTE: This function cannot be run in RAM.
PARAMETER

channel is the analog input channel number (0 to 7) corresponding to LN0_IN to LN7_IN.
opmode is the mode of operation:
SINGLE—single-ended input line
DIFF—differential input line
mAMP—milliamp input line
channel

SINGLE

DIFF

mAMP

0

+AIN0

+AIN0 -AIN1

+AIN0*

1

+AIN1

+AIN1 -AIN0*

+AIN1*

2

+AIN2

+AIN2 -AIN3

+AIN2*

3

+AIN3

+AIN3 -AIN2*

+AIN3

4

+AIN4

+AIN4 -AIN5

+AIN4

5

+AIN5

+AIN5 -AIN4*

+AIN5

6

+AIN6

+AIN6 -AIN7*

+AIN6

7

+AIN7

+AIN7 -AIN6*

+AIN7*

ALLCHAN

read all channels for selected opmode

* Not accessible on Prototyping Board.

User’s Manual

57

gaincode is the gain code of 0 to 7. The gaincode parameter is ignored when channel is ALLCHAN.

Gain Code

Voltage Range*
(V)

0

0–22.5

1

0–11.25

2

0–5.6

3

0–4.5

4

0–2.8

5

0–2.25

6

0–1.41

7

0–1.126

* Applies to Prototyping Board.
RETURN VALUE

0 if successful.
-1 if address is invalid or out of range.
SEE ALSO
anaInEEWr, anaInCalib

58

RabbitCore RCM4000

int anaInEEWr(unsigned int channel, int opmode
unsigned int gaincode);
Writes the calibration constants, gain, and offset for an input based from global tables _adcCalibS,
_adcCalibD, and _adcCalibM to designated positions in the flash memory. Depending on the flash
size, the following macros can be used to identify the starting address for these locations.
ADC_CALIB_ADDRS, address start of single-ended analog input channels
ADC_CALIB_ADDRD, address start of differential analog input channels
ADC_CALIB_ADDRM, address start of milliamp analog input channels
NOTE: This function cannot be run in RAM.
PARAMETER

channel is the analog input channel number (0 to 7) corresponding to LN0_IN to LN7_IN.
opmode is the mode of operation:
SINGLE—single-ended input line
DIFF—differential input line
mAMP—milliamp input line
channel

SINGLE

DIFF

mAMP

0

+AIN0

+AIN0 -AIN1

+AIN0*

1

+AIN1

+AIN1 -AIN0*

+AIN1*

2

+AIN2

+AIN2 -AIN3

+AIN2*

3

+AIN3

+AIN3 -AIN2*

+AIN3

4

+AIN4

+AIN4 -AIN5

+AIN4

5

+AIN5

+AIN5 -AIN4*

+AIN5

6

+AIN6

+AIN6 -AIN7*

+AIN6

7

+AIN7

+AIN7 -AIN6*

+AIN7*

ALLCHAN

read all channels for selected opmode

* Not accessible on Prototyping Board.

User’s Manual

59

gaincode is the gain code of 0 to 7. The gaincode parameter is ignored when channel is ALLCHAN.

Gain Code

Voltage Range*
(V)

0

0–22.5

1

0–11.25

2

0–5.6

3

0–4.5

4

0–2.8

5

0–2.25

6

0–1.41

7

0–1.126

* Applies to Prototyping Board.
RETURN VALUE

0 if successful
-1 if address is invalid or out of range.
SEE ALSO
anaInEEWr, anaInCalib

60

RabbitCore RCM4000

5.3 Upgrading Dynamic C
Dynamic C patches that focus on bug fixes are available from time to time. Check the Web
sites
• www.zworld.com/support/
or
• www.rabbitsemiconductor.com/support/
for the latest patches, workarounds, and bug fixes.
5.3.1 Add-On Modules
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. Z-World offers for purchase add-on
Dynamic C modules including the popular µC/OS-II real-time operating system, as well
as PPP, Advanced Encryption Standard (AES), FAT file system, RabbitWeb, and other
select libraries.
NOTE: Version 2.10 or later of the Dynamic C FAT file system module is required for
the RCM3365 and RCM3375 models.

Each Dynamic C add-on module has complete documentation and sample programs to
illustrate the functionality of the software calls in the module. Visit our Web site at
www.rabbit.com for further information and complete documentation for each module.
In addition to the Web-based technical support included at no extra charge, a one-year
telephone-based technical support module is also available for purchase.

User’s Manual

61

62

RabbitCore RCM4000

6. USING THE TCP/IP FEATURES
6.1 TCP/IP Connections
Programming and development can be done with the RCM4000 without connecting 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 RCM4000 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.
• Two RJ-45 straight-through Ethernet cables and a hub, or an RJ-45 crossover Ethernet
cable.
Figure 14 shows how to identify the two Ethernet cables based on the wires in the transparent RJ-45 connectors.

Same
color order
in connectors

StraightThrough
Cable

Different
color order
in connectors

Crossover
Cable

Figure 14. How to Identify Straight-Through and Crossover Ethernet Cables

Ethernet cables and a 10Base-T Ethernet hub are available from Rabbit Semiconductor in
a TCP/IP tool kit. More information is available at www.rabbit.com.
Now you should be able to make your connections.
User’s Manual

63

1. Connect the AC adapter and the serial programming cable as shown in Chapter 2, “Getting Started.”
2. Ethernet Connections
There are four options for connecting the RCM4000 module to a network for development 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 RCM4000
module’s Ethernet port directly to the PC’s network interface card using an RJ-45
crossover cable. A crossover cable is a special cable that flips some connections
between the two connectors and permits direct connection of two client systems. A
standard RJ-45 network cable will not work for this purpose.
• 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
RCM4000 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 RCM4000 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 RCM4000 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 RCM4000 module and Prototyping Board are now ready to
be used.

64

RabbitCore RCM4000

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 RCM4000 using an Ethernet crossover
cable or a simple arrangement with a hub. (A crossover cable should not be confused with
regular straight through cables.)
In order to set up this direct connection, the user 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 corporate 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 RCM4000 uses a 10Base-T type of Ethernet connection, which is the most common
scheme. 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 using a crossover cable is a direct 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 RCM4000 uses 10 Mbps Ethernet, so the hub or
Ethernet adapter can be a 10 Mbps unit or a 10/100 Mbps unit.
In a corporate setting where the Internet is brought in via a high-speed line, there are typically machines between the outside Internet and the internal network. These machines
include a combination of proxy servers and firewalls that filter and multiplex Internet traffic. In the configuration below, the RCM4000 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 outside of the firewall. This avoids some of the configuration complications by sacrificing
some security.

User’s Manual

65

Hub(s)

T1 in

Adapter

Ethernet

Firewall
Proxy
Server

Network

Ethernet

Typical Corporate Network

RCM4000
System

If your system administrator can give you an Ethernet cable along with its 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 RCM4000. 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.

66

RabbitCore RCM4000

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 adjacent 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.

User’s Manual

67

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 RCM4000 RabbitCore module has its own unique MAC address, which consists of
the prefix 0090C2 followed by a code that is unique to each RCM4000 module. For example, a MAC address might be 0090C2C002C0.
TIP: You can always obtain the MAC address on your module by running the sample
program DISPLAY_MAC.C from the SAMPLES\TCPIP folder.

68

RabbitCore RCM4000

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 RCM4000 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 RCM4000 from the Internet, you can place
the RCM4000 on the internal network using an IP address assigned either statically or
through DHCP.

User’s Manual

69

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 network. If you want users on the Internet to communicate with your RCM4000, you have
several options. You can either place the RCM4000 directly on the Internet with a real
Internet address or place it behind the firewall. If you place the RCM4000 behind the firewall, you need to configure the firewall to translate and forward packets from the Internet
to the RCM4000.

70

RabbitCore RCM4000

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
RCM4000 module together on the same network. This network can be a local private network (preferred for initial experimentation and debugging), or a connection via the Internet.
RCM4000
System

User’s PC
Ethernet
crossover
cable

Direct Connection
(network of 2 computers)

User’s Manual

RCM4000
System

Ethernet
cables

Hub

To additional
network
elements

Direct Connection Using a Hub

71

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_NETMASK, 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 RCM4000 module, 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 different features such as DHCP. Their values are documented at the top of the TCP_CONFIG.LIB library in the LIB\TCPIP directory. More information is available in the
Dynamic C TCP/IP User’s Manual.

72

RabbitCore RCM4000

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 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 “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  or  to exit the various dialog boxes.
RCM4000
System

IP 10.10.6.101
Netmask
255.255.255.0

User’s PC
Ethernet
crossover
cable

Direct Connection PC to RCM4000 Module

User’s Manual

73

6.5 Run the PINGME.C Sample Program
Connect the crossover cable from your computer’s Ethernet port to the RCM4000 module’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. The crossover
cable is connected from your computer’s Ethernet adapter to the RCM4000 module’s RJ45 Ethernet connector. When the program starts running, the green LINK light on the
RCM4000 module should be on to indicate an Ethernet connection is made. (Note: If the
LNK light does not light, you may not be using a crossover cable, or if you are using a hub
with straight-through cables perhaps the power is off on the hub.)
The next step is to ping the module from your PC. This can be done by bringing up the
MS-DOS window and running the pingme program:
ping 10.10.6.101

or by Start > Run
and typing the entry
ping 10.10.6.101

Notice that the yellow ACT light flashes on the RCM4000 module while the ping is taking
place, and indicates the transfer of data. The ping routine will ping the module four times
and write a summary message on the screen describing the operation.

6.6 Running Additional Sample Programs With Direct Connect
The following sample programs are in the Dynamic C SAMPLES\RCM4000\TCPIP\
folder.
• BROWSELED.C—This program demonstrates a basic controller running a Web page.
Two “device LEDs” are created along with two buttons to toggle them. Users can use
their Web browser to change the status of the lights. The DS2 and DS3 LEDs on the
Prototyping Board will match those 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.
• PINGLED.C—This program demonstrates ICMP by pinging a remote host. It will flash
LEDs DS2 and DS3 on the Prototyping Board when a ping is sent and received.
• SMTP.C—This program demonstrates using the SMTP library to send an e-mail when
the S2 and S3 switches on the Prototyping Board are pressed. LEDs DS2 and DS3 on
the Prototyping Board will light up when e-mail is being sent.

74

RabbitCore RCM4000

6.7 Where Do I Go From Here?
NOTE: If you purchased your RCM4000 through a distributor or through a Rabbit Semiconductor or Z-World 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 Semiconductor/Z-World Technical Bulletin Board at
www.rabbit.com/support/bb/.
• 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 User’s Manual.
Please refer to the Dynamic C TCP/IP User’s 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 Z-World’s Web site.

User’s Manual

75

76

RabbitCore RCM4000

APPENDIX A. RCM4000 SPECIFICATIONS
Appendix A provides the specifications for the RCM4000, and
describes the conformal coating.

User’s Manual

77

A.1 Electrical and Mechanical Characteristics
Figure A-1 shows the mechanical dimensions for the RCM4000.
1.84
(47)

Y2

C66

C54
R47
Y3

C51 C52
C48

C50

(15.7)

0.62

0.72

(16)

0.10
(2.5)

(5.8)

(2.8)

(20)

(5.8)

0.23

(2.8)

0.11

(47)

(1.6)

1.84

0.064

J3

0.77

(12)

0.47

(61)

0.23

2.42

0.11

(1.6)

0.064

(20)

0.77

(12)

0.47

(18)

(28)

(9.4)

0.37

R20

L3

1.10

C16

C11

R2

C7

C9

C14
C12

R4

L2

L5

R7
R6
C8

L7
L6

R34

C15

L4

J1

(61)

0.619

C10

R51
R5

C13

R1

2.42

DS2

U7

DS1

L8

T1

J2

C41 R35

U6

R25

C33 U5

Y1

C18
L9

C72

C28 C29
Q1

R24

C20

R10

JP2

JP3
JP1

R9

R37
R36

C24
C25

C34
C35

C42
C43

U1

C47

U3

C26
C27

C49

R8

U17

C53

C30
C31

C32

(13)

LINK

C36

0.50

ACT

D1
R27

R26

C22
R3

C55
R48

U9

C46 C45C44 R29

U8

C56

C23

(5)

R46

R43

0.19

U18

R28
C38

R30

RP2

JP4

R33 R32
R31

(3.2)

C71

0.125 dia × 2

Please refer to the RCM4000
footprint diagram later in this
appendix for precise header
locations.

Figure A-1. RCM4000 Dimensions

NOTE: All measurements are in inches followed by millimeters enclosed in parentheses.
All dimensions have a manufacturing tolerance of ±0.01" (0.25 mm).

78

RabbitCore RCM4000

It is recommended that you allow for an “exclusion zone” of 0.04" (1 mm) around the
RCM4000 in all directions when the RCM4000 is incorporated into an assembly that
includes other printed circuit boards. An “exclusion zone” of 0.08" (2 mm) is recommended below the RCM4000 when the RCM4000 is plugged into another assembly.
Figure A-2 shows this “exclusion zone.”

2.50

(2)

0.08

(16)

0.51

(63)

2.42
(61)

Exclusion
Zone

1.92

(2)

0.08

(16)

0.51

(49)

J3

1.84
(47)

Figure A-2. RCM4000 “Exclusion Zone”

User’s Manual

79

Table A-1 lists the electrical, mechanical, and environmental specifications for the RCM4000.
Table A-1. RCM4000 Specifications
Parameter

RCM4000

RCM4010

Rabbit® 4000 at 58.98 MHz

Microprocessor
Ethernet Port

10Base-T, RJ-45, 2 LEDs

SRAM

512K (16-bit)

Flash Memory (program)

512K (16-bit)

Flash Memory
(mass data storage)
Backup Battery

General Purpose I/O
Additional Inputs

32 Mbytes
(NAND flash)

—

Connection for user-supplied backup battery
(to support RTC and data SRAM)
19 parallel digital I/O lines:
• configurable with four layers
of alternate functions

25 parallel digital I/O lines:
• configurable with four layers
of alternate functions

2 startup mode, reset in, CONVERT

2 startup mode, reset in

Additional Outputs

Status, reset out, analog VREF

Status, reset out

Analog Inputs

8 channels single-ended
or 4 channels differential
Programmable gain
1, 2, 4, 5, 8, 10, 16, and 20 V/V

—

• A/D Converter
Resolution

12 bits (11 bits single-ended)

• A/D Conversion Time
(including 120 µs raw
count and Dynamic C)
Auxiliary I/O Bus

180 µs
Can be configured for 8 data lines and
6 address lines (shared with parallel I/O lines), plus I/O read/write
5 shared high-speed, CMOS-compatible ports:

• all 5 configurable as asynchronous (with IrDA), 4 as clocked serial (SPI),
Serial Ports

and 1 as SDLC/HDLC

• 1 asynchronous clocked serial port dedicated for programming
• 1 clocked serial port dedicated for A/D converter (RCM4000)
Serial Rate
Slave Interface
Real Time Clock

80

Maximum asynchronous baud rate = CLK/8
Slave port allows the RCM4000 to be used as an intelligent peripheral device
slaved to a master processor
Yes

RabbitCore RCM4000

Table A-1. RCM4000 Specifications (continued)
Parameter
Timers

RCM4000

RCM4010

Ten 8-bit timers (6 cascadable from the first),
one 10-bit timer with 2 match registers, and
one 16-bit timer with 4 outputs and 8 set/reset registers

Watchdog/Supervisor

Yes
2 channels:

• synchronized PWM with 10-bit
Pulse-Width Modulators

—

counter

• variable-phase or synchronized
PWM with 16-bit counter
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
Operating Temperature
Humidity

3.0– 3.6 V.DC, 90 mA @ 3.3 V (preliminary, pins unloaded)
0 to +70°C
5% to 95%, noncondensing

Connectors

One 2 × 25, 1.27 mm pitch IDC signal header
One 2 × 5, 1.27 mm pitch IDC programming header

Board Size

1.84" × 2.41" × 0.77"
(47 mm × 61 mm × 20 mm)

User’s Manual

81

A.1.1 A/D Converter
Table A-2 shows some of the important A/D converter specifications. For more details,
refer to the ADC7870 data sheet.
Table A-2. A/D Converter Specifications
Parameter

Test Conditions

Analog Input Characteristics
Input Capacitance
Input Impedance
Common-Mode
Differential Mode

6 MΩ
7 MΩ

11 bits
12 bits
±1 LSB
±0.5 LSB

Dynamic Characteristics
Throughput Rate

82

Max

4 – 9.7 pF

Static Accuracy
Resolution
Single-Ended Mode
Differential Mode
Integral Linearity
Differential Linearity

Voltage Reference
Accuracy
Buffer Amp Source Current
Buffer Amp Sink Current
Short-Circuit Current

Typ

±2.5 LSB

52 ksamples/s

Vref = 2.048 V and 2.5 V

±0.05%
20 µA
20 mA
20 mA

±0.25%

RabbitCore RCM4000

A.1.2 Headers
The RCM4000 uses a header at J3 for physical connection to other boards. J3 is a 2 × 25
SMT header with a 1.27 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 RCM4000 to be plugged into. These
reference design values are relative to one of the mounting holes.

J1
0.875
(22.2)

0.050
(1.27)

J3

RCM4000 Series
Footprint
0.284
(7.2)

0.334
(8.5)

Figure A-3. User Board Footprint for RCM4000

User’s Manual

83

A.2 Rabbit 4000 DC Characteristics
Table A-3. Rabbit 4000 Absolute Maximum Ratings
Symbol

Parameter

Maximum Rating

TA

Operating Temperature

-40° to +85°C

TS

Storage Temperature

-55° to +125°C

VIH

Maximum Input Voltage

VDDIO + 0.3 V
(max. 3.6 V)

VDDIO Maximum Operating Voltage

3.6 V

Stresses beyond those listed in Table A-3 may cause permanent damage. The ratings are
stress ratings only, and functional operation of the Rabbit 4000 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
4000 chip.
Table A-4 outlines the DC characteristics for the Rabbit 4000 at 3.3 V over the recommended operating temperature range from TA = –40°C to +85°C, VDDIO = 3.0 V to 3.6 V.
Table A-4. 3.3 Volt DC Characteristics
Symbol
VDDIO

Min

Typ

Max

I/O Ring Supply Voltage, 3.3 V

3.0 V

3.3 V

3.6 V

I/O Ring Supply Voltage, 1.8 V

1.65 V

1.8 V

1.90 V

VIH

High-Level Input Voltage

0.7 × VDDIO

VDDIO + 0.3 V

VIL

Low-Level Input Voltage

-0.3 V

0.3 × VDDIO

VOH

High-Level Output Voltage

0.7 × VDDIO

VDDIO + 0.3 V

VOL

Low-Level Output Voltage

-0.3 V

0.3 × VDDIO

IIO
IDRIVE

84

Parameter

I/O Ring Current @ 29.4912 MHz,
3.3 V, 25°C
All other I/O
(except TXD+, TXDD+, TXD-, TXDD-)

12.2 mA
8 mA

RabbitCore RCM4000

A.3 I/O Buffer Sourcing and Sinking Limit
Unless otherwise specified, the Rabbit I/O buffers are capable of sourcing and sinking
8 mA of current per pin at full AC switching speed. Full AC switching assumes a
29.4 MHz CPU clock with the clock doubler enabled and capacitive loading on address
and data lines of less than 70 pF per pin. The absolute maximum operating voltage on all
I/O is 3.6 V.

A.4 Bus Loading
You must pay careful attention to bus loading when designing an interface to the
RCM4000. This section provides bus loading information for external devices.
Table A-5 lists the capacitance for the various RCM4000 I/O ports.
Table A-5. Capacitance of Rabbit 4000 I/O Ports
I/O Ports

Input
Capacitance
(pF)

Output
Capacitance
(pF)

12

14

Parallel Ports A to E

Table A-6 lists the external capacitive bus loading for the various RCM4000 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-6.
Table A-6. External Capacitive Bus Loading -40°C to +85°C
Output Port

Clock Speed
(MHz)

Maximum External
Capacitive Loading (pF)

58.98

100

All I/O lines with clock
doubler enabled

Table A-7 lists the loadings for the A/D converter inputs.
Table A-7. A/D Converter Inputs

User’s Manual

Parameter

Value

Input Capacitance

4–9.7 pF

Input Impedance

Common-Mode 6 MΩ
Differential 7 MΩ

85

Figure A-4 shows a typical timing diagram for the Rabbit 4000 microprocessor external
I/O read and write cycles.
External I/O Read (no extra wait states)
T1

Tw

T2

CLK
A[15:0]

valid
Tadr

/CSx
/IOCSx

TCSx

TCSx

TIOCSx

TIOCSx

/IORD

TIORD

TIORD

/BUFEN

TBUFEN
Tsetup

TBUFEN

D[7:0]

valid
Thold

External I/O Write (no extra wait states)
T1

Tw

T2

CLK
A[15:0]

valid
Tadr

/CSx
/IOCSx
/IOWR
/BUFEN
D[7:0]

TCSx

TCSx

TIOCSx

TIOCSx

TIOWR

TIOWR

TBUFEN

TBUFEN
valid
TDHZV

TDVHZ

Figure A-4. External I/O Read and Write Cycles—No Extra Wait States

NOTE: /IOCSx can be programmed to be active low (default) or active high.

86

RabbitCore RCM4000

Table A-8 lists the delays in gross memory access time for several values of VDDIO.
Table A-8. Preliminary Data and Clock Delays
Clock to Address
Output Delay
(ns)

VDDIO
(V)

30 pF 60 pF 90 pF

Worst-Case
Spectrum Spreader Delay
(ns)

Data Setup
Time Delay
(ns)
0.5 ns setting 1 ns setting
no dbl / dbl
no dbl / dbl

2 ns setting
no dbl / dbl

3.3

6

8

11

1

2.3 / 2.3

3 / 4.5

4.5 / 9

1.8

18

24

33

3

7 / 6.5

8 / 12

11 / 22

The measurements are taken at the 50% points under the following conditions.
• T = -40°C to 85°C, V = VDDIO ±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 maximum shortening for a pair of clocks combined is shown in the table.
Technical Note TN227, Interfacing External I/O with Rabbit Microprocessor Designs,
contains suggestions for interfacing I/O devices to the Rabbit 4000 microprocessors.

User’s Manual

87

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.

C8

C11

C14

R1
R2

R7
R6

L3

C15

C7

L7

C9

R20

L6

L4

J1

R34

C12
L5

R4

L2

U1
R9
R10

JP2

U3

C28 C29
C30
C31

C53

C32

R30
C38

JP4

R28

D1
R27

R33 R32

R26

Y2

R31

C36

RP2

C46 C45C44 R29

U8

C56

U9

C55
R48

U17
C71

R8

C10

C20
C26
C27

C51 C52
C54
C50
R47

C49

U18

JP3

C24
C25

Y3

C66

R46

JP1

Q1

R24

R25

C34
C35

C33 U5

C42
C43

C48

C72

Conformally coated
area

C18

Y1

U7

C47

U6

LINK

DS2

R37

L9

L8
T1

J2

C41 R35

DS1

ACT

R36

R51

R3

R5

C16

C13

R43

C23

C22

Figure A-5. RCM4000 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 Technical Note 303, Conformal Coatings.

88

RabbitCore RCM4000

A.6 Jumper Configurations
Figure A-6 shows the header locations used to configure the various RCM4000 options
via jumpers.

RCM4000
Top Side

JP1
JP2
JP3

JP4

Figure A-6. Location of RCM4000 Configurable Positions

Table A-9 lists the configuration options.
Table A-9. RCM4000 Jumper Configurations
Header

JP1

JP2

JP3

JP4

Description

Pins Connected
1–2

SMODE1

2–3

PE6

1–2

SMODE0

2–3

PE5

1–2

STATUS

2–3

PE7

1–2

Battery Backup

2–3

No Battery Backup

Factory
Default

×

PE6 or SMODE1 Output on J3

×

PE5 or SMODE0 Output on J3

×

PE7 or STATUS Output on J3

Battery Backup for Real-Time
Clock

×

NOTE: The jumper connections are made using 0 Ω surface-mounted resistors.
User’s Manual

89

90

RabbitCore RCM4000

APPENDIX B. PROTOTYPING BOARD
Appendix B describes the features and accessories of the Prototyping Board, and explains the use of the Prototyping Board to
demonstrate the RCM4000 and to build prototypes of your own
circuits. The Prototyping Board has power-supply connections
and also provides some basic I/O peripherals (RS-232, LEDs,
and switches), as well as a prototyping area for more advanced
hardware development.

User’s Manual

91

B.1 Introduction
The Prototyping Board included in the Development Kit makes it easy to connect an
RCM4000 module to a power supply and a PC workstation for development. It also provides some basic I/O peripherals (RS-232, 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,
modifications and additions can be made to the board without modifying the RCM4000
module.
The Prototyping Board is shown below in Figure B-1, with its main features identified.
CurrentMeasurement
Headers
Power
Input

Power
LED

Reset
Switch

J1

U1

R2
PA6

PA7

PB0

PB1

PB2

PB3

PB4

PB5

PB6

PB7

PC0

PC1

PC2

PC3

PC4

PC5

PC6

PC7

PE0

PE1

PE2

PE3
R19
PE5
R9
PE7

PE4

PD1
LN1

PD2
LN2
PD4
LN4

TXC RXC
UX29

J4

GND
UX10

UX12

SMT Prototyping
Area

PE6
PD0
LN0

PD6
LN6

RX75

CVT

LN5IN

LN3IN

LN1IN

AGND

LN4IN

LN2IN

LN0IN

RX73

CX25

DS2

JP25

J3

Analog
I/O
RCM4000

Module
Extension Header

UX14

CX27
CX23 RX77

RX79

DS3

R23

R11 R12

LN7IN

AGND
VREF

RX65

UX30

RX11

RX67

CVT

VREF

Through-Hole
Prototyping Area

AGND

PD7
LN7

RX83

LN6IN

C13

R17
R7
C11

C9

C7

C8

C10

C12

C14

RX61

RX59

PD3
LN3
PD5
LN5

UX42

UX41

RX57

RX63

UX3

RX55

UX37

UX33

RX49

RX89
UX31

RX97

JP23

JP24

RX47

RX43

JP13

JP22
JP20
R15

JP21

R13

JP17

R14

R5

JP19

R16

R3

JP15

R4

R10

R6

R20

R18

R29

R8

Q1

JP11

R26

C15

RX87

PA4

PA5

CX41

PA3
JP16
JP6
JP5
JP12
JP4
JP3
JP14
JP8
C16 JP7
JP18
JP9
JP10

RX81

CX39

PA2

RS-232
Header

UX45

PA0

PA1

GND
+3.3 V

CX17

VBAT
EXT

R25

RCM4000
Standoff
Mounting

/IORD
/RST_IN

RX85

/IOWR

U2
C17

C19

C20

C18
U3

+5 V

GND

/RST_OUT
RCM1

AGND

D2

C6

J2

S1
RESET

UX4

RXD TXD

JP1
C3

C4
+3.3 V

UX47

JP2

L1

BT1
UX49

C53

CX29

GND

D1

1

GND
C2

R21

R22

UX16

R24

1

S2

R27
R28

DS1

C1

C5

SMT Prototyping
Area

+5 V, 3.3 V, and
GND Buses

PWR
R1

RCM4000
Module
Connector

Backup
Battery

1

S3

GND

GND
GND

User
LEDs
User
Switches

Figure B-1. Prototyping Board

92

RabbitCore RCM4000

B.1.1 Prototyping Board Features
• Power Connection—A a 3-pin header is provided for connection 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 the North American version of the Development Kit is terminated with a header
plug that connects to the 3-pin header in either orientation. The header plug leading to
bare leads provided for overseas customers can be connected to the 3-pin header in
either orientation.
Users providing their own power supply should ensure that it delivers 8–24 V DC at
8 W. The voltage regulators will get warm while in use.
• Regulated Power Supply—The raw DC voltage provided at the 3-pin header 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 RCM4000 module and the Prototyping
Board.
• Power LED—The power LED lights whenever power is connected to the Prototyping
Board.
• Reset Switch—A momentary-contact, normally open switch is connected directly to the
RCM4000’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 connected to the PB4 and PB5 pins of the RCM4000 module and may be read as inputs by
sample applications.
Two LEDs are connected to the PB2 and PB3 pins of the RCM4000 module, and may
be driven as output indicators by 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 around the edge of
this area. Several areas for surface-mount devices are also available. (Note that there
are SMT device pads on both top and bottom of the Prototyping Board.) Each SMT pad
is connected to a hole designed to accept a 30 AWG solid wire.
• Module Extension Header—The complete non-analog pin set of the RCM4000 module is duplicated at header J2. Developers can solder wires directly into the appropriate
holes, or, for more flexible development, a 2 × 25 header strip with a 0.1" pitch can be
soldered into place. See Figure B-4 for the header pinouts.
• Analog Inputs Header—The complete analog pin set of the RCM4000 module is
duplicated at header J3. Developers can solder wires directly into the appropriate holes,
or, for more flexible development, a 2 × 7 header strip with a 0.1" pitch can be soldered
into place. See Figure B-4 for the header pinouts.
• RS-232—Two 3-wire or one 5-wire RS-232 serial ports are available on the Prototyping Board at header J4. A 10-pin 0.1" pitch header strip installed at J4 allows you to
connect a ribbon cable that leads to a standard DE-9 serial connector.

User’s Manual

93

• Current Measurement Option—You may cut the trace below header JP1 on the
bottom side of the Prototyping Board and install a 1 × 2 header strip from the Development Kit to allow you to use an ammeter across the pins to measure the current drawn
from the +5 V supply. Similarly, you may cut the trace below header JP2 on the bottom
side of the Prototyping Board and install a 1 × 2 header strip from the Development Kit
to allow you to use an ammeter across the pins to measure the current drawn from the
+3.3 V supply.
• Backup Battery—A 2032 lithium-ion battery rated at 3.0 V, 220 mA·h, provides
battery backup for the RCM4000 SRAM and real-time clock.

94

RabbitCore RCM4000

B.2 Mechanical Dimensions and Layout
Figure B-2 shows the mechanical dimensions and layout for the Prototyping Board.
2.735

(6)

0.24

(69.5)

1.935

(3.8)

0.15

(49.1)

PWR

J1

R2
PB4

PB5

PB6

PB7

PC0

PC1

PC2

PC3

PC4

PC5

PC6

PC7

PE0

PE1

PE2

PE3
R19
PE5
R9
PE7

PE4

PD1
LN1

PD2
LN2
PD4
LN4
PD6
LN6

UX29

J4

GND
UX12

RX85

PD0
LN0

AGND

DS2

JP25

RX79

DS3

R23

R21

R22

1

S2

UX16

R24

1

S3

GND

GND

(3.8)

(3.8)

(4.2)

(9.1)

GND

0.15
0.165

0.36

0.15

LN0IN

LN2IN

LN4IN

LN6IN

J3

CX27
CX23 RX77

3.485
(88.5)

3.80

(4.8)

RX73

CX25

R11 R12

LN1IN

LN3IN

AGND

AGND

UX14

0.19

RX75

CVT

VREF

RX65
RX63

RX67

CVT

R17
R7
C11

JP13

VREF

UX10

PE6

AGND

R15
R5

C9

C7

C8

C12

C14

C10

RX59
RX61

UX41

RX57

PD3
LN3
PD5
LN5
PD7
LN7

UX42

RX89
UX31
UX3

RX55

UX37

RX49

UX33

RX97

JP23

JP24

RX47

RX43

C13

R13
R3

JP17

JP22
JP20

R14
R4

JP21

R16
R6

JP19

R26
R10

JP15

JP11
R20

R18

R29

R8

Q1

UX30

RX11

(97)

PB2

PB3

3.80

PB1

RX83

3.10

PB0

(78.8)

PA6

PA7

CX41

PA4

PA5

RX87

PA2

PA3

RX81

CX39

PA1

+3.3 V

UX45

PA0

R25
C15

/RST_IN

VBAT
EXT

U2
C17

U3

C19

C20

C18

GND

/IORD

LN7IN

/IOWR

JP16
JP6
JP5
JP12
JP4
JP3
JP14
JP8
C16 JP7
JP18
JP9
JP10

+5 V

GND

/RST_OUT
RCM1

J2

LN5IN

JP2

C6

S1
RESET

TXC RXC

JP1
D2

L1

UX4

CX17

GND

C3

C4
+3.3 V

UX47

RXD TXD

GND

C5

BT1
UX49

CX29

DS1
D1

1

C2

R27
R28

R1

U1

C1

0.15
(3.8)

(97)

Figure B-2. Prototyping Board Dimensions

User’s Manual

95

Table B-1 lists the electrical, mechanical, and environmental specifications for the Prototyping Board.
Table B-1. Prototyping Board Specifications
Parameter

Specification

Board Size

3.80" × 3.80" × 0.48" (97 mm × 97 mm × 12 mm)

Operating Temperature

0°C to +70°C

Humidity

5% to 95%, noncondensing

Input Voltage

8 V to 24 V DC

Maximum Current Draw
800 mA max. for +3.3 V supply,
(including user-added circuits) 1 A total +3.3 V and +5 V combined
Prototyping Area

1.3" × 2.0" (33 mm × 50 mm) throughhole, 0.1" spacing,
additional space for SMT components

Connectors

One 2 × 25 header socket, 1.27 mm pitch, to accept RCM4000
One 1 × 3 IDC header for power-supply connection
One 2 × 5 IDC RS-232 header, 0.1" pitch
Two unstuffed header locations for analog and RCM4000 signals
25 unstuffed 2-pin header locations for optional configurations

B.3 Power Supply
The RCM4000 requires a regulated 3.0 V – 3.6 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 Shottky diode at D2
as shown in Figure B-3.

SWITCHING POWER REGULATOR

POWER
IN

J1
1
2
3

D2

DCIN

DL4003

C5
47 µF

LINEAR POWER
REGULATOR +3.3 V

+5 V
JP1

U2
330 µH

LM2575

L1
D1
B140

C4
C6
330 µF 10 µF

3

LM1117
U1
1

2

JP2
C2
10 µF

Figure B-3. Prototyping Board Power Supply

96

RabbitCore RCM4000

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 to demonstrate the functionality of the RCM4000
right out of the box without any modifications to either board.
The Prototyping Board comes with the basic components necessary to demonstrate the
operation of the RCM4000. Two LEDs (DS2 and DS3) are connected to PB2 and PB3,
and two switches (S2 and S3) are connected to PB4 and PB5 to demonstrate the interface
to the Rabbit 4000 microprocessor. Reset switch S1 is the hardware reset for the RCM4000.

GND
+
GND

The Prototyping Board provides the user with RCM4000 connection points brought out conveniently to labeled points at header J2 on the Prototyping Board. Although header J2 is
unstuffed, a 2 × 25 header is included in the bag of parts. RS-232 signals (Serial Ports C
and D) are available on header J4. A header strip at J4 allows you to connect a ribbon cable,
and a ribbon cable to DB9 connector is included with the Development Kit. The pinouts for
these locations are shown in Figure B-4.

J1

J4
RS-232

GND

VREF
LN7IN
LN5IN
LN3IN
LN1IN
AGND

GND
/IORD
/RST_IN
PA0
PA2
PA4
PA6
PB0
PB2
PB4
PB6
PC0
PC2
PC4
PC6
PE0
PE2
PE4
PE6
PD0/LN0
PD2/LN2
PD4/LN4
PD6/LN6
CVT
AGND

RxC
TxC

J3
AGND
CVT
LN6IN
LN4IN
LN2IN
LN0IN

RCM4100
Signals

+3.3 V
/RST_OUT
/IOWR
VBAT_EXT
PA1
PA3
PA5
PA7
PB1
PB3
PB5
PB7
PC1
PC3
PC5
PC7
PE1
PE3
PE5
PE7
PD1/LN1
PD3/LN3
PD5/LN5
PD7/LN7
VREF

J2

RxD
TxD

Analog
Inputs

Figure B-4. Prototyping Board Pinout

The analog signals are brought out to labeled points at header location J3 on the Prototyping
Board. Although header J3 is unstuffed, a 2 × 7 header can be added. Note that analog
signals are not available from the RCM4010 included in the Development Kit — only the
RCM4000 model has an A/D converter.
User’s Manual

97

Selected signals from the Rabbit 4000 microprocessor are available on header J2 of the
Prototyping Board. The remaining ports on the Rabbit 4000 microprocessor are used for
RS-232 serial communication. Table B-2 lists the signals on header J2 and explains how
they are used on the Prototyping Board.
Table B-2. Use of Rabbit 4000 Signals on the Prototyping Board
Pin

Pin Name

1

+3.3 V

2

GND

3

Prototyping Board Use
+3.3 V power supply

/RST_OUT Reset output from reset generator

4

/IORD

External read strobe

5

/IOWR

External write strobe

6

/RESET_IN Input to reset generator

8–15

PA0–PA7

16

PB0

CLKB (used by A/D converter RCM4000 only)

17

PB1

Programming port CLKA

18

PB2

LED DS2 (normally high/off)

19

PB3

LED DS3 (normally high/off)

20

PB4

Switch S2 (normally open/pulled up)

21

PB5

Switch S3 (normally open/pulled up)

22–23

PB6–PB7

Output, pulled high

24–25

PC0–PC1

Serial Port D (RS-232, header J4) (high)

26–27

PC2–PC3

Serial Port C (RS-232, header J4) (high)

28–29

PC4–PC5

Serial Port B (used by A/D converter RCM4000 only)

30–31

PC6–PC7

Serial Port A (programming port) (high)

32–39

PE0–PE7

Parallel I/O, Output, I0–I7

LN0–LN7

A/D converter inputs (RCM4000 only)

PD0–PD7

Output, pulled high

40–47
48

Output, pulled high

CONVERT A/D converter CONVERT input (RCM4000 only)

49

VREF

A/D converter reference voltage (RCM4000 only)

50

AGND

A/D converter ground (RCM4000 only)

There is a 1.3" × 2" 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 the top edge of the prototyping area for easy access. 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 surfacemount components may be installed. Small holes are provided around the surface-mounted
components that may be installed around the prototyping area.
98

RabbitCore RCM4000

B.4.1 Adding Other Components
There are pads for 28-pin TSSOP devices, 16-pin SOIC devices, and 6-pin SOT devices
that can be used for surface-mount prototyping with these 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.
B.4.2 Measuring Current Draw
The Prototyping Board has a current-measurement feature available at header locations
JP1 and JP2 for the +5 V and +3.3 V supplies respectively. To measure current, you will
have to cut the trace on the bottom side of the Prototyping Board corresponding to the
power supply or power supplies whose current draw you will be measuring. Header locations JP1 and JP2 are shown in Figure B-5. Then install a 1 × 2 header strip from the
Development Kit on the top side of the Prototyping Board at the header location(s) whose
trace(s) you cut. The header strip(s) will allow you to use an ammeter across their pins to
measure the current drawn from that supply. Once you are done measuring the current,
place a jumper across the header pins to resume normal operation.

PWR
R1

Bottom Side

U1

J1

DS1

C1
GND

GND

D1

JP1
JP1

C2

JP2

C3
C6

Cut traces

JP2

L1

D2

C5

JP1

JP2

CURRENT
MEASUREMENT
JP1 (+5 V)
or
JP2 (+3.3 V)

0

A

Figure B-5. Prototyping Board Current-Measurement Option

NOTE: Once you have cut the trace below header location JP1 or JP2, you must either be
using the ammeter or have a jumper in place in order for power to be delivered to the
Prototyping Board.

User’s Manual

99

B.4.3 Analog Features (RCM4000 only)
The Prototyping Board has typical support circuitry installed to complement the ADS7870
A/D converter on the RCM4000 module (the A/D converter is not available on the
RCM4010 module).
B.4.3.1 A/D Converter Inputs

Figure B-6 shows a pair of A/D converter input circuits. The resistors form an approx. 9:1
attenuator, and the capacitor filters noise pulses from the A/D converter input. The 10 kΩ
inline jumpers allow other configurations (see Table B-6) and provide digital isolation.
Inline jumpers are
10 kW resistors
100 kW

ADC

LN0_IN

(RCM4100)
ADC

LN1_IN
2.2 nF

10 kW

2.2 nF

10 kW

100 kW

JP23/JP24
3

BVREF =
2.048 V

1

AGND

Figure B-6. A/D Converter Inputs

The A/D converter chip can make either single-ended or differential measurements
depending on the value of the opmode parameter in the software function call. Adjacent
A/D converter inputs are paired to make differential measurements. The default setup on
the Prototyping Board is to measure only positive voltages for the ranges listed in Table B-3.
Table B-3. Positive A/D Converter Input Voltage Ranges

100

Min. Voltage
(V)

Max. Voltage
(with prescaler)
(V)

A/D Converter

0.0

+22.528

1

11

0.0

+11.264

2

5.5

0.0

+5.632

4

2.75

0.0

+4.506

5

2.20

0.0

+2.816

8

1.375

0.0

+2.253

10

1.100

0.0

+1.408

16

0.688

0.0

+1.126

20

0.550

Gain

mV per Tick

RabbitCore RCM4000

Many other possible ranges are possible by physically changing the resistor values that
make up the attenuator circuit.
NOTE: Analog input LN7_IN does not have the 10 kΩ resistor installed, and so no
resistor attenuator is available, limiting its maximum input voltage to 2 V. This input is
intended to be used for a thermistor that you may install at header location JP25.

It is also possible to read a negative voltage on LN0_IN–LN5_IN by moving the 0 Ω
jumper (see Figure B-6) on header JP23 or JP24 associated with the A/D converter input
from analog ground to the reference voltage generated and buffered by the A/D converter.
Adjacent input channels are paired; moving the jumper on JP 23 changes both of the
paired channels (LN4_IN–LN5_IN), and moving the jumper on JP24 changes LN0_IN–
LN3_IN. At the present time Rabbit Semiconductor does not offer the software drivers to
work with single-ended negative voltages, but the differential mode described below may
be used to measure negative voltages.
Differential measurements require two channels. As the name differential implies, the difference in voltage between the two adjacent channels is measured rather than the difference between the input and analog ground. Voltage measurements taken in differential
mode have a resolution of 12 bits, with the 12th bit indicating whether the difference is
positive or negative.
The A/D converter chip can only accept positive voltages, as explained in Section 4.4. Both
differential inputs must be referenced to analog ground, and both inputs must be positive
with respect to analog ground. Table B-4 provides the differential voltage ranges for this
setup.
Table B-4. Differential Voltage Ranges
Min. Differential
Voltage
(V)

Max. Differential
Voltage (with
prescaler)
(V)

0

±22.528

1

11

0

±11.264

2

5.5

0

±5.632

4

2.75

0

±4.506

5

2.20

0

±2.816

8

1.375

0

±2.253

10

1.100

0

±1.408

16

0.688

0

±1.126

20

0.550

User’s Manual

A/D Converter
Gain

mV per Tick

101

B.4.3.2 Thermistor Input

Analog input LN7_IN on the Prototyping Board was designed specifically for use with a
thermistor at JP25 in conjunction with the THERMISTOR.C sample program, which demonstrates how to use the analog input to measure temperature, which will be displayed in the
Dynamic C STDIO window. The sample program is targeted specifically for the thermistor
included with the Development Kit with R0 @ 25°C = 3 kΩ and β 25/85 = 3965. Be sure
to use the applicable R0 and β values for your thermistor if you use another thermistor.

BVREF

Inline jumper is
10 kW resistor

1 kW

ADC

LN7_IN

(RCM4100)
2.2 nF

AGND

9

JP25

J3

Thermistor

Figure B-7. Prototyping Board Thermistor Input
B.4.3.3 A/D Converter Calibration

To get the best results form the A/D converter, it is necessary to calibrate each mode (singleended or differential) for each of its gains. It is imperative that you calibrate each of the
A/D converter inputs in the same manner as they are to be used in the application. For
example, if you will be performing floating differential measurements or differential measurements using a common analog ground, then calibrate the A/D converter in the corresponding manner. The calibration must be done with the JP23/JP24 selection jumpers in
the desired position (see Figure B-6). If a calibration is performed and a jumper is subsequently moved, the corresponding input(s) must be recalibrated. The calibration table in
software only holds calibration constants based on mode, channel, and gain. Other factors
affecting the calibration must be taken into account by calibrating using the same mode
and gain setup as in the intended use.
Sample programs are not yet available to illustrate how to read and calibrate the various
A/D inputs for the three operating modes.
Mode
Single-Ended, one channel

102

Read
—

Calibrate
AD_CAL_CHAN.C

Single-Ended, all channels

AD_RDVOLT_ALL.C

AD_CAL_ALL.C

Differential, analog ground

AD_RDDIFF_CH.C

AD_CALDIFF_CH.C
RabbitCore RCM4000

B.4.4 Serial Communication
The Prototyping Board allows you to access five of the serial ports from the RCM4000
module. Table B-5 summarizes the configuration options. Note that Serial Ports E and F
can be used only with the RCM3400 Prototyping Board.
Table B-5. Prototyping Board Serial Port Configurations
Serial Port

Header

Default Use

Alternate Use

A

J2

Programming Port

RS-232

B

J2

A/D Converter
(RCM4000 only)

—

C

J2, J4

RS-232

—

D

J2, J4

RS-232

—

E

J2

—

—

F

J2

—

—

Serial Ports E and F may be used as serial ports, or the corresponding pins at header location J2 may be used as parallel ports.

User’s Manual

103

B.4.4.1 RS-232

RS-232 serial communication on header J4 on both Prototyping Boards is supported by an
RS-232 transceiver installed at U3. 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 4000’s signals to RS-232 signal levels. Note that
the polarity is reversed in an RS-232 circuit so that a +3.3 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 RCM4000 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 RS232.LIB, where X is the serial port (C or D). 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., PCDR).
SERA_RTS_SHADOW—Shadow register for the RTS line's parallel port (e.g., PCDRShadow).
SERA_RTS_BIT—The bit number for the RTS line.
SERA_CTS_PORT—Data register for the parallel port that the CTS line is on (e.g., PCDRShadow).
SERA_CTS_BIT—The bit number for the CTS line.

Standard 3-wire RS-232 communication using Serial Ports C and D is illustrated in the
following sample code.
#define CINBUFSIZE 15
#define COUTBUFSIZE 15

// set size of circular buffers in bytes

#define DINBUFSIZE 15
#define DOUTBUFSIZE 15
#define MYBAUD 115200
#endif
main(){
serCopen(_MYBAUD);
serDopen(_MYBAUD);
serCwrFlush();
serCrdFlush();
serDwrFlush();
serDrdFlush();
serCclose(_MYBAUD);
serDclose(_MYBAUD);
}

104

// set baud rate

// open Serial Ports C and D
// flush their input and transmit buffers

// close Serial Ports C and D

RabbitCore RCM4000

B.5 Prototyping Board Jumper Configurations
Figure B-8 shows the header locations used to configure the various Prototyping Board
options via jumpers.

JP1
UX49

JP2

JP11
JP15
JP19
JP21
JP22
JP20
JP17
JP13

JP16
JP6
JP5
JP12
JP4
JP3
JP14
JP8
JP7
JP18
JP9
JP10

JP24

JP23

JP25

Figure B-8. Location of Configurable Jumpers on Prototyping Board

Table B-6 lists the configuration options using either jumpers or 0 Ω surface-mount resistors.
Table B-6. RCM3400 Prototyping Board Jumper Configurations
Header

Description

Pins Connected

Factory
Default

JP1

+5 V Current Measurement

1–2

Via trace or jumper

Connected

JP2

+3.3 V Current Measurement

1–2

Via trace or jumper

Connected

JP3
1–2

TxD on header J4

JP4
1–2

PC0 to LED DS2

n.c.

PC0 available on header J2

JP3
JP4

PC0/TxD/LED DS2

User’s Manual

×

105

Table B-6. RCM3400 Prototyping Board Jumper Configurations (continued)
Header

JP5
JP6

JP7
JP8

JP9
JP10

Description

PC1/RxD/Switch S2

PC2/TxC/LED DS3

PC3/RxC/Switch S3

Pins Connected
JP5
1–2

RxD on header J4

JP6
1–2

PC1 to Switch S2

n.c.

PC1 available on header J2

JP7
1–2

TxC on header J4

JP6
1–2

PC2 to LED DS3

n.c.

PC2 available on header J2

JP9
1–2

PC3 to Switch S3

JP10
RxC on header J4
1–2
n.c.

JP11

LN0 buffer/filter to RCM4000

JP12

PB2/LED DS2

JP13

LN1 buffer/filter to RCM4000

JP14

PB3/LED DS3

JP15

LN2 buffer/filter to RCM4000

JP16

PB4/Switch S2

JP17

LN3 buffer/filter to RCM4000

JP18

PB5/Switch S3

Factory
Default

×

×

×

PC3 available on header J2

1–2

Connected

1–2

Connected: PB2 to LED DS2

n.c.

PB2 available on header J2

1–2

×
Connected

1–2

Connected: PB3 to LED DS3

n.c.

PB3 available on header J2

1–2

×
Connected

1–2

Connected: PB4 to Switch S2

n.c.

PB4 available on header J2

1–2

×
Connected

1–2

Connected: PB5 to Switch S3

n.c.

PB5 available on header J2

×

JP19

LN4 buffer/filter to RCM4000

1–2

Connected

JP20

LN5 buffer/filter to RCM4000

1–2

Connected

JP21

LN6 buffer/filter to RCM4000

1–2

Connected

JP22

LN7 buffer/filter to RCM4000

1–2

Connected

106

RabbitCore RCM4000

Table B-6. RCM3400 Prototyping Board Jumper Configurations (continued)
Header

JP23

JP24

JP25

Description

Pins Connected
1–2

Tied to analog ground

2–3

Tied to VREF

1–2

Tied to analog ground

2–3

Tied to VREF

LN4_IN–LN6_IN

LN0_IN–LN3_IN

Thermistor Location

1–2

Factory
Default

×
×
n.c.

NOTE: Jumper connections JP3–JP10, JP12, JP14, JP16, JP18, JP23, and JP24 are made
using 0 Ω surface-mounted resistors. Jumper connections JP11, JP13, JP15, JP17, and
JP19–JP22 are made using 10 kΩ surface-mounted resistors.

User’s Manual

107

108

RabbitCore RCM4000

APPENDIX C. POWER SUPPLY
Appendix C provides information on the current requirements of
the RCM4000, and includes some background on the chip select
circuit used in power management.
C.1 Power Supplies
The RCM4000 requires a regulated 3.0 V – 3.6 V DC power source. The RabbitCore
design presumes that the voltage regulator is on the user board, and that the power is made
available to the RCM4000 board through header J2.
An RCM4000 with no loading at the outputs operating at 58.98 MHz typically draws
110 mA.
C.1.1 Battery-Backup Circuits
The RCM4000 does not have a battery, but there is provision for a customer-supplied battery to back up the data SRAM and keep the internal Rabbit 4000 real-time clock running.
Header J2, shown in Figure C-1, allows access to the external battery. This header makes
it possible to connect an external 3 V power supply. This allows the SRAM and the internal Rabbit 4000 real-time clock to retain data with the RCM4000 powered down.

J2
External
Battery

+3.3 V_IN

1

2

VBAT_EXT

7

8

GND

Figure C-1. External Battery Connections
at Header J2

A lithium battery with a nominal voltage of 3 V and a minimum capacity of 165 mA·h is
recommended. A lithium battery is strongly recommended because of its nearly constant
nominal voltage over most of its life.

User’s Manual

109

The drain on the battery by the RCM4000 is typically 7.5 µA when no other power is supplied. If a 165 mA·h battery is used, the battery can last about 2.5 years:

165 mA·h
------------------------ = 2.5 years.
7.5 µA
The actual life in your application will depend on the current drawn by components not on
the RCM4000 and on the storage capacity of the battery. The RCM4000 does not drain the
battery while it is powered up normally.
C.1.2 Reset Generator
The RCM4000 uses a reset generator to reset the Rabbit 3000 microprocessor when the voltage drops below the voltage necessary for reliable operation. The reset occurs between
2.85 V and 3.00 V, typically 2.93 V. The RCM4000 has a reset output, pin 3 on header J2.

110

RabbitCore RCM4000

NOTICE TO USERS
RABBIT AND Z-WORLD PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE-SUPPORT DEVICES OR SYSTEMS UNLESS A SPECIFIC WRITTEN AGREEMENT
SIGNED BY A CORPORATE OFFICER OF DIGI INTERNATIONAL IS ENTERED INTO BETWEEN
THE CUSTOMER AND DIGI INTERNATIONAL.
No complex software or hardware system is perfect. Bugs are always present in a system of any size, and
microprocessor systems are subject to failure due to aging, defects, electrical upsets, and various other
causes. In order to prevent danger to life or property, it is the responsibility of the system designers, who are
our customers, to incorporate redundant protective mechanisms appropriate to the risk involved. Even with
the best practices, human error and improbable coincidences can still conspire to result in damaging or dangerous system failures. Our products cannot be made perfect or near-perfect without causing them to cost so
much as to preclude any practical use, thus our products reflect our “reasonable commercial efforts.”
All Rabbit and Z-World products are functionally tested. Although our tests are comprehensive and carefully
constructed, 100% test coverage of every possible defect is not practical. Our products are specified for
operation under certain environmental and electrical conditions. Our specifications are based on analysis and
sample testing. Individual units are not usually tested under all environmental and electrical conditions. Individual components may be specified for different environmental or electrical conditions than our assembly
containing the components. In this case we have qualified the components through analysis and testing to
operate successfully in the particular circumstances in which they are used.

User’s Manual

111

112

RabbitCore RCM4000

INDEX
A

C

A/D converter
inputs
differential measurements ........................ 101
negative voltages ......... 101
single-ended measurements ........................ 100
A/D converter inputs
access via Prototyping Board
..................................... 100
software
anaIn .............................. 51
anaInCalib ..................... 52
anaInConfig ................... 47
anaInDiff ....................... 55
anaInDriver ................... 49
anaInEERd .................... 57
anaInEEWr .................... 59
anaInmAmps ................. 56
anaInVolts ..................... 54
additional information
online documentation .......... 5
alerts
software
digInAlert ...................... 46
timedAlert ..................... 46
auxiliary I/O bus ................... 29

clock doubler ........................ 38
conformal coating ................. 88

B
battery backup
battery life ....................... 110
external battery connections ............................ 109
reset generator ................. 110
use of battery-backed SRAM
....................................... 43
board initialization ................ 45
software
brdInit ............................ 45
bus loading ............................ 85

User’s Manual

D
Development Kits ................... 4
RCM4000 Development Kit 4
AC adapter ...................... 4
DC power supply ............ 4
Getting Started instructions .............................. 4
programming cable ......... 4
digital I/O .............................. 24
I/O buffer sourcing and sinking limits ....................... 85
memory interface .............. 29
SMODE0 .................... 29, 32
SMODE1 .................... 29, 32
software ............................. 43
dimensions
Prototyping Board ............. 95
RCM4000 .......................... 78
Dynamic C .............. 5, 7, 12, 41
add-on modules ............. 7, 61
installation ....................... 7
battery-backed SRAM ...... 43
COM port .......................... 12
libraries
RCM40xx.LIB .............. 45
protected variables ............ 43
sample programs ............... 16
standard features
debugging ...................... 42
telephone-based technical
support ...................... 5, 61
upgrades and patches ........ 61
USB port settings .............. 12

E
Ethernet cables ...................... 63
how to tell them apart ....... 63

Ethernet connections ....... 63, 65
10/100Base-T .................... 65
10Base-T Ethernet card .... 63
additional resources .......... 75
direct connection ............... 65
Ethernet cables .................. 65
Ethernet hub ...................... 63
IP addresses ................ 65, 67
MAC addresses ................. 68
steps .................................. 64
Ethernet port ......................... 31
pinout ................................ 31
exclusion zone ...................... 79

F
features .................................... 2
Prototyping Boards ..... 92, 93
flash memory addresses
user blocks ........................ 39

H
hardware connections
install RCM4000 on Prototyping Board ........................ 9
power supply ..................... 11
programming cable ........... 10

I
I/O buffer sourcing and sinking
limits ............................. 85
IP addresses .......................... 67
how to set in sample programs
....................................... 72
how to set PC IP address .. 73

J
jumper configurations
Prototyping Board ........... 105
JP1 (+5 V current measurement) ........................ 105
JP1 (LN0 buffer/filter to
RCM4000) ............... 106
113

jumper configurations
Prototyping Board (continued)
JP12 (PB2/LED DS2) ..106
JP13 (LN1 buffer/filter to
RCM4000) ................106
JP14 (PB3/LED DS3) ..106
JP15 (LN2 buffer/filter to
RCM4000) ................106
JP16 (PB4/Switch S2) .106
JP17 (LN3 buffer/filter to
RCM4000) ................106
JP18 (PB5/Switch S2) .106
JP19 (LN4 buffer/filter to
RCM4000) ................106
JP2 (+ 3.3 V current measurement) ..................105
JP20 (LN5 buffer/filter to
RCM4000) ................106
JP21 (LN6 buffer/filter to
RCM4000) ................106
JP22 (LN7 buffer/filter to
RCM4000) ................106
JP23 (analog inputs LN4–
LN6 configuration) ...107
JP24 (analog inputs LN0–
LN3 configuration) ...107
JP3–JP4 (PC0/TxD/LED
DS2) ..........................105
JP5–JP6 (PC1/RxD/
Switch S2) ................106
JP7–JP8 (PC2/TxC/
LED DS3) .................106
JP9–JP10 (PC3/RxC/
Switch S3) ................106
RCM4000 ..........................89
JP1 (PE6 or SMODE1
output on J3) ...............89
JP2 (PE5 or SMODE0
output on J3) ...............89
JP3 (PE7 or STATUS
output on J3) ...............89
JP4 (battery backup for realtime clock) ..................89
jumper locations ............89

M
MAC addresses .....................68

O
onchip-encryption RAM
how to use ..........................17

114

P
pinout
Ethernet port ......................31
Prototyping Board .............97
RCM4000
alternate configurations .26
RCM4000 headers .............24
power supplies
+3.3 V ..............................109
battery backup .................109
Program Mode .......................33
switching modes ................33
programming cable
PROG connector ...............33
RCM4000 connections ......10
programming port .................32
Prototyping Board .................92
access to RCM4000 analog
inputs .............................93
adding components ............99
dimensions .........................95
expansion area ...................93
features ........................92, 93
jumper configurations .....105
jumper locations ..............105
mounting RCM4000 ............9
pinout .................................97
power supply .....................96
prototyping area ................98
specifications .....................96
use of Rabbit 3000 signals 98

R
Rabbit 4000
spectrum spreader time delays
.......................................87
Rabbit subsystems .................25
RCM4000
mounting on Prototyping
Board ...............................9
Run Mode ..............................33
switching modes ................33

S
sample programs ...................16
A/D converter inputs
AD_CAL_ALL.C ........102
AD_CAL_CHAN.C 22, 102
AD_CALDIFF_CH.C .102
AD_RDDIFF_CH.C ....102
AD_RDVOLT_ALL.C
.............................22, 102

AD_SAMPLE.C ............22
THERMISTOR.C ..22, 102
getting to know the RCM4000
CONTROLLED.C .........16
FLASHLED1.C .............16
FLASHLED2.C .............16
LOW_POWER.C ..........17
TAMPERDETECTION.C
.....................................17
TOGGLESWITCH.C ....17
how to run TCP/IP sample
programs .................71, 72
how to set IP address .........72
NAND flash
NFLASH_DUMP.c .......18
NFLASH_ERASE.c ......19
NFLASH_INSPECT.c ..18
NFLASH_LOG.C ..........18
PONG.C ............................12
real-time clock
RTC_TEST.C ................22
SETRTCKB.C ...............22
serial communication
FLOWCONTROL.C .....20
PARITY.C .....................20
SIMPLE3WIRE.C .........20
SIMPLE5WIRE.C .........21
SWITCHCHAR.C .........21
TCP/IP
BROWSELED.C ...........74
DISPLAY_MAC.C .......68
PINGLED.C ..................74
PINGME.C ....................74
SMTP.C .........................74
serial communication ............30
Prototyping Board
RS-232 .........................104
software .............................43
PACKET.LIB ................43
RS232.LIB .....................43
serial ports .............................30
Ethernet port ......................31
programming port ..............32
software ...................................5
auxiliary I/O bus ..........29, 43
I/O drivers .........................43
libraries
RCM40XX.LIB .............45
readUserBlock ...................39
sample programs ...............16
serial communication drivers ..................................43
writeUserBlock .................39

RabbitCore RCM4000

specifications ........................ 77
A/D converter chip ............ 82
bus loading ........................ 85
digital I/O buffer sourcing and
sinking limits ................ 85
dimensions ........................ 78
electrical, mechanical, and
environmental ............... 80
exclusion zone ................... 79
header footprint ................. 83
Prototyping Board ............. 96
Rabbit 4000 DC characteristics ................................. 84
Rabbit 4000 timing diagram .............................. 86
relative pin 1 locations ...... 83
spectrum spreader ................. 87
subsystems
digital inputs and outputs .. 24
switching modes ................... 33

T
TCP/IP primer ....................... 65
technical support ................... 13

U
USB/serial port converter
Dynamic C settings ........... 12

User’s Manual

115

116

RabbitCore RCM4000

SCHEMATICS
090-0227 RCM4000 Schematic
www.rabbit.com/documentation/schemat/090-0227.pdf

090-0230 Prototyping Board Schematic
www.rabbit.com/documentation/schemat/090-0230.pdf

090-0128 Programming Cable Schematic
www.rabbit.com/documentation/schemat/090-0128.pdf

The schematics included with the printed manual were the latest revisions available at the
time the manual was last revised. The online versions of the manual contain links to the
latest revised schematic on the Web site. You may also use the URL information provided
above to access the latest schematics directly.

User’s Manual

117



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : Yes
Page Count                      : 124
Page Mode                       : UseOutlines
XMP Toolkit                     : XMP toolkit 2.9.1-14, framework 1.6
About                           : uuid:f2a3176c-b916-4e3b-b038-7f943b222d2b
Producer                        : Acrobat Distiller 6.0.1 (Windows)
Creator Tool                    : FrameMaker 6.0
Modify Date                     : 2006:05:15 10:46:11-07:00
Create Date                     : 2006:05:11 15:09:14Z
Metadata Date                   : 2006:05:15 10:46:11-07:00
Document ID                     : uuid:c70472db-dfc0-4baa-af5a-f8b7f156da6a
Format                          : application/pdf
Title                           : RCM4000UM.book
Creator                         : tiwanows
Author                          : tiwanows
EXIF Metadata provided by EXIF.tools

Navigation menu