A.2 Rabbit 4000 DC Characteristics........................................................................................................84
A.3 I/O Buffer Sourcing and Sinking Limit.............................................................................................85
A.4 Bus Loading ......................................................................................................................................85
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
The RCM4000 series of RabbitCore modules is one of the next
generation of core modules that tak e advantage of n ew 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 tha t is fast, efficien t, and the id eal soluti on for
a wide range of embedded applications. The RCM4000 also features an integrated 10 Bas e-T Et hern et po r t.
The Development Kit has the essentials that you need to design
your own microprocessor-based system, and includes a com-
®
plete Dynamic C softw are development system. Th is Development Kit also contains a Prototyping Board that will al low 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 Manual1
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 li nes wi th low-p ow er mo des down t o 2 kH z
•
Five CMOS-compatible serial ports — f
our 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 F AT
File System module
• Real-time clock
• Watchdog supervisor
There are two RCM4000 production models. T able 1 summarizes their main features.
Table 1. RCM4000 Features
FeatureRCM4000RCM4010
Microprocessor
SRAM512K
Flash Memory (program)512K
Flash Memory
(mass data storage)
A/D Converter12 bits—
Serial P orts
32 Mbytes (NAND flash)—
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 po rt is ded i cated fo r A /D co nver ter (R CM40 00)
Rabbit® 4000 at 58.98 MHz
The RCM4000 is programmed ov er a stan dard PC seri al port th rough a programmi ng cable
supplied with t he Develo pment K it, and can also be program ed throug h a USB po rt with an
RS-232/USB convert er or over an Ethe rnet with the R abbitLink (both available from Rabbit
Semiconductor ).
Appendix A provides detailed specifications for the RCM4000.
2RabbitCore RCM4000
1.2 Advantages of the RCM4000
• Fast time to market using a fully engineered, “ready-to-run/ready-to-program” microprocessor core.
• Competit ive pr ici ng when c ompar ed with the alternative of purchasing and assembling
individual components.
• Easy C-language program development and debugging
• Rabbit Field Utility to download compiled Dynamic C .bin files, and cloning board
options for rapid production loading of programs.
• Generous memory size allows large programs with tens of thousands of lines of code,
and substantial data storage.
User’s Manual3
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
DIAG
PROG
RabbitCore RCM4000
Development Kit Contents
The RCM4000 Development Kit contains the following items:
• RCM4000 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–30 V.)
• 10-pin header to DB9 programming cable with integrated level-matching circuitry.
• 10-pin header to DB9 serial cable.
®
• Dynamic C
CD-ROM, with complete product documen-
tation on disk.
• Getting Started instructions.
• A bag of accessory parts for use on the Prototyping
Board.
• Rabbit 4000 Processor Easy Reference poster.
• Registration card.
Getting Started
Instructions
Getting Started
Cable
A Digi International® Company.
Installing Dynamic C
Insert the CD from the Development Kit in
your PC’s CD-ROM drive. If the installation
does not auto-start, run the
program in the root directory of the
Dynamic C CD. Install any Dynamic C
modules after you install Dynamic C.
Rabbit Semiconductor, Rabbit, Z-World, and Dynamic C are
registered trademarks of their respective holders.
setup.exe
AC Adapter
(North American
kits only)
Accessory Parts for
®
®
Prototyping Board
Serial
Cable
PWR
R
1
J1
U1
DS1
2
C1
R
GND
GND
1
D
C2
1
P
J
4
3
V
C
C
C5
L1
JP16
JP6
7
C18
1
JP5
0
C
2
JP12
C
U3
JP4
JP3
JP14
JP8
C16
JP7
JP18
JP9
JP10
9
1
C
R25
C15
6
2
R
Q1
PC3
PC5
1
C8
U1
R1
R2
RX43
38
R
J1
7
4
4
TP2
2
X
C3
P
P
R
J
J
U4
RX97
RX57
RX55
RX49
1
3
4
3
R13
X
X
C9
R5
U
U
C10
R6
C11
R7
2
1
4
3
C12
R8
X
9
X
C13
R9
8
U
U
C14
R10
X
R
C15
R11
7
P1
3
R
C16
R12
XU
R20
JP4
3
UX3
6
JP5
X
JP6
40
C20
R
PC7
C1
80
5
9
1
1
2
0
7
1
1
1
2
R29
2
2
1
P
P
P
P
P
P
P
J
J
J
J
J
J
J
PE1
U2
31P
J
PE3
8
6
4
3
5
7
R20
R19
1
1
1
1
1
1
R
R
R
R
R
R
PE5
PE6
C4
R10
7
R9
C5
PD0
R8R6R4R3R5R
PE7
R3
LN0
U3
R37
PD1
R21
PD2
C53
LN1
LN2
9
3
4
2
0
11
1
1
1
1
3
C8C7C
U9
C
2
C
C
C
C
PD4
PD3
C6C7R4
LN4
LN3
R41
PD6
PD5
LN6
LN5
RX59
JP3
PD7
CVT
U5
LN7
16
D
X
N
U6
C17
VREF
AGND
R
G
C18
A
C52
N
N
N
F
I
I
I
E
7
5
3
R
N
N
N
5
V
L
L
L
L
6
C56
XR
R23
J3
R22
41
L1
C21
T
D
N
N
N
IN
I
I
I
V
N
0
2
4
6
C
G
N
N
N
N
A
L
L
L
L
3
.
J2
3
2
+
D
C6
2
U
PB1
PB3
PB5
PB7
PC1
PC4
PC6
PE0
PE2
PE4
D
N
I
N
1
G
N
A
2
1
R
1
1
R
+5 V
2
P
GND
J
GND
/RST_OUT
/IORD
+3.3 V
RCM1
/IOWR
/RST_IN
VBAT
PA0
EXT
PA1
PA2
PA3
PA4
PA5
PA6
PA7
PB0
PB2
PB4
PB6
PC0
PC2
5
8
X
R
RX75
CX25
DS2
JP25
9
2
CX27
RX73
X
C
RX77
RX79
CX23
DS3
R21
UX16
R22
R24
R23
8
7
GND
1
1
2
2
R
R
GND
GND
S3S2
1
S1
BT1
RESET
C
D
UX49
UX47
RX83
RX11
5
4
X
U
UX10
7
1
RX67
X
C
UX12
UX14
X
UX4
X
R
T
D
C
X
X
R
T
D
N
G
4
J
9
2
X
RX81
U
7
8
X
R
1
4
X
C
9
3
X
C
UX30
Prototyping Board
Figure 1. RCM4000 Development Kit
4RabbitCore 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 Onlin e 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 Manual5
6RabbitCore RCM4000
2. GETTING S TARTED
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 thi s manual) assume that you have t he 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 de bug pr ogram s for the RCM400 0 (a nd for a ll o ther Rabbit Se micond ucto r
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 communica te with the tar get deve lopment sy stem.
The installation allows you to choose the COM port that will be used. The default 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. Speci-
fying a port in u se by a not her device (mouse, modem, et c.) may l ea d t o a message such
as
"could not open serial port" when Dynamic C is started.
Once your installation is complete, you will have up to three new icons on your PC 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 Manual7
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.
PWR
R
1
J1
U1
DS1
C1
GND
1
D
C5
C18
17
C
20
JP12
C
U3
JP4
JP3
JP14
JP8
C16
JP7
JP18
JP9
JP10
19
C
R25
C15
26
R
Q1
R29
JP11JP15JP19JP21JP22
R20
R18R16R14R13R15R
R10
7
RX43
47
X
R
RX97
RX49
X33U
U
31
X
89
X
R
UX3
R8R6R4R3R5R
9
11
10
C8C7C
C
23
C14C12C
JP24JP
RX59
RX57
RX55
41
X
U
42
X
U
37
X
U
LN7
61
X
VREF
R
65
X
R
J3
63
X
R
GND
C2
JP
3
C
2
L1
D
C6
JP16
JP6
JP5
JP20
JP17
PE1
13
JP
PE3
R19
17
PE5
R9
PE7
PD1
LN1
13
C
PD3
LN3
PD5
LN5
PD7
V
D
N
C
AG
2
U
PC1
PC3
PC5
PC7
PD4
LN4
PD6
LN6
CVT
AGND
F
E
7INLN5INLN3INLN1IN
R
LN
T
V
6INLN4INLN2INLN0IN
LN
2
JP
/RST_OUT
RCM1
/IOWR
VBAT
EXT
PA1
PA3
PA5
PA7
PB1
PB2
PB3
PB4
PB5
PB6
PB7
PC0
PC2
PC4
PC6
PE0
PE2
PE4
PE6
PD0
LN0
PD2
LN2
D
N
G
A
D
N
G
A
11
R
2
R
1
4
C
J2
3.3 V
+
GND
/IORD
/RST_IN
PA0
PA2
PA4
PA6
PB0
RX75
CX25
DS2
JP25
12
R
UX47
+5 V
GND
+3.3 V
85
RX
CX27
RX73
R23
RX79
RX77
CX23
DS3
R21
R22
R24
GND
1
1
28
R27R
GND
S3S2
1
S1
BT1
RESET
D
UX49
UX4
RX81
87
X
R
RX83
39
X
C
RX11
X45
U
RX67
X17
C
UX14
29
X
C
UX16
GND
UX30
UX10
UX12
XC
TX
R
C
XD
R
TX
D
N
G
J4
29
UX
X41
C
Figure 2. Insert Standoffs
8RabbitCore 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.
R34
Insert standoff
between upper
mounting hole and
Prototyping Board.
RCM4000/
RCM4010
Line up mounting
holes with holes
on Prototyping Board.
C12
C11
L5
R20
L4
J2
ACT
DS1
R36
DS2
LINK
R37
C47
C48
C72
C49
C50
Y3
C51
C52
R47
C54
C66
R46
U17
R48
C55
U18
C71
Y2
Y1
C41
R35
R24
C33
U6
R25
U5
U7
C42
C34
C43
C35
C24
C25
C27
C53
C45
C46
C56
R31
R33
C31
C32
U9
C44
R29
C36
U8
R26
R30
R27
C38
D1
R32
R28
JP4
J1
C8
C14
L6
C9
L7
C15
C16
T1
C18
C20
Q1
C26
C28
C29
C30
RP2
R43
R1
C7
L3
R7
R2
R6
R4
L2
R5
R3
C13
R8
C10
R51
L8
L9
U1
R9
JP1
R10
JP2
JP3
U3
D1
C22
C23
RX43
RX47
RX97
PWR
R1
J1
U1
DS1
C1
GND
GND
C2
C5
L1
D2
C6
RCM1
U2
JP16
JP6
C18
JP5
C17
JP12
U3
JP4
JP3
RCM1
JP14
JP8
C16
JP7
JP18
JP9
JP10
C19C20
R25
C15
R26
Q1
R29
JP11
JP15
JP19
JP21
JP22
JP20
R20
R18
R16
R14
R13
R15
R17
R10
R8R6R4R3R5
R7
C8C7C9
C14
C12
C10
JP24
JP23
RX59
RX57
RX55
RX49
UX41
UX33UX31
RX89
UX3
RX61
RX65
UX37 UX42
RX63
/RST_OUT
C11
R2
JP1
C4
C3
J2
+3.3 V
JP2
/IOWR
VBAT
EXT
PA1
PA3
PA5
PA7
PB1
PB3
PB5
PB7
PC1
PC3
PC5
PC7
JP17
PE1
JP13
PE3
R19
PE5
R9
PE7
PD1
LN1
C13
PD3
LN3
PD5
LN5
PD7
LN7
VREF
J3
UX47
+5 V
GND
GND
/IORD
+3.3 V
/RST_IN
PA0
PA2
PA4
PA6
PB0
PB2
PB4
PB6
PC0
PC2
PC4
PC6
PE0
PE2
PE4
PE6
PD0
LN0
PD2
LN2
PD4
LN4
PD6
LN6
CVT
AGND
AGND
VREF
LN7IN
LN5IN
LN3IN
LN1IN
AGND
CVT
AGND
LN6IN
LN4IN
LN2IN
LN0IN
1
S1
BT1
UX49
RX75
RX73
CX25
DS2
JP25
R12
R11
RESET
UX4
CX27
RX77
CX23
DS3
R21
R23
1
R27
RXD TXD
TXC RXC
GND
RX81
RX83
RX11
UX45
RX67
RX85
RX79
R22
R24
1
R28
GND
S3S2
J4
UX29
RX87
CX41
CX39
UX30
UX10
CX17
UX12
UX14
CX29
UX16
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 Pr ototyp ing Boa rd. The header pins may bec ome bent or da maged
if the pin alignment is offse t, 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 Manual9
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
Programming
Cable
Colored
To
Blue
PC COM port
shrink wrap
PROG
edge
J1
J1
PWR
R1
J1
U1
DS1
C1
D1
C5
R20
ACT
LINK
C66
R46
U17
J2
DS1
C41
R36
R35
DS2
R37
U6
R25
U7
C42
C34
C47
C43
C35
C48
C72
C49
C50
Y3
C51
C52
R47
RX43
C54
C53
RX47
R48
C55
U18
C45
U9
C46
R29
C44
C56
RX97
C71
RX49
Y2
R30
R31
R33
R32
JP4
RX89
GND
C2
DIAG
L1
C6
R34
C12
C11
C8
C14
L5
L6
U2
C9
C7
L7
L4
C15
L3
R7R6
JP16
L2
JP6
C18
JP5
C16
C17
JP12
U3
JP4
C13
JP3
JP14
C10
JP8
C16
L8
JP7
L9
JP18
T1
JP9
JP10
C18
Y1
C19C20
C20
R25
JP1
JP2
C15
R26
R24
C33
Q1
Q1
U5
C24
R29
C25
C26
C27
JP11
JP15
JP19
JP21
JP22
R20
C28
R18
R16
R14
R13
R10
C29
R8R6R4R3R5
C30
C31
C8C7C9
C14
C12
C10
C32
JP24
JP23
RP2
C36
U8
RX59
R26
RX57
RX55
UX41
UX33UX31
R27
C38
D1
C22
C23
R43
R28
UX37 UX42
UX3
RX63
D2
R51
JP3
GND
RCM1
R5
JP20
R15
JP1
/RST_OUT
J1
PROG
R4
R8
U3
JP17
R17
R7
C11
RX61
RX65
R2
C4
C3
J2
+3.3 V
JP2
/IOWR
VBATR1
EXT
PA1
PA3
R2
PA5
R3
PA7
PB1
PB3
U1
PB5
R9
PB7
R10
PC1
PC3
PC5
PC7
PE1
JP13
PE3
R19
PE5
R9
PE7
PD1LN1
C13
PD3LN3
PD5LN5
PD7LN7
VREF
J3
UX47
+5 V
GND
GND
/IORD
+3.3 V
/RST_IN
PA0
PA2
PA4
PA6
PB0
PB2
PB4
PB6
PC0
PC2
PC4
PC6
PE0
PE2
PE4
PE6
PD0
LN0
PD2
LN2
PD4
LN4
PD6
LN6
CVT
AGND
AGND
VREF
LN7IN
LN5IN
LN3IN
LN1IN
CVT
AGND
LN6IN
LN4IN
LN2IN
RESET
1
S1
BT1
RESET
UX49
UX4
RXD TXD
TXC RXC
GND
RX81
RX83
RX11
RX67
RX75
CX25
DS2
JP25
AGND
R12
R11
LN0IN
RX85
CX27
RX73
RX77
RX79
CX23
DS3
R21
R22
R24
R23
1
R27
R28
GND
S3S2
J4
UX29
RX87
CX41
CX39
UX30
UX45
UX10
CX17
UX12
UX14
CX29
UX16
GND
1
GND
Figure 4. Connect Programming Cable and Power Supply
NOTE: Be sure to use the pro gramming c able (p art numbe r 10 1-0542) suppli ed 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 ar e not designe d 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.
10RabbitCore 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 Protot yping Boar d next to t he batter y 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 Manual11
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
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, comp ile it us ing th e 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.
and select “Use USB to Serial Converter” under the Communications
• 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 B oard 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 <Ctrl-Y> to force Dynamic C to
recompile the BIOS. If Dynamic C still re ports 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.
12RabbitCore 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
fied for your own use. The user's manual also provides complete hardware reference infor-
mation 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 d ist ri buto r or thr ough a Rabbit Semi-
conductor or Z-World partner, contact t he di stributor 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/sup port/ .
can be easily modi-
User’s Manual13
14RabbitCore RCM4000
3. RUNNING SAMPLE PROGRAMS
To develop and debug programs for the RC M4000 (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:
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 pro-
gram. 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.
The sample progr ams assum e that you have at lea st an el ementa ry gr asp of ANS I C.
If you do not, see the introductory pages of the Dynamic C User’s Manual for a sug-
gested reading list.
User’s Manual15
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.
16RabbitCore 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 <Alt-F9> 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 Manual17
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 redi-
rected to a serial port.
When the sample program starts running, it attempts to communicate with the user-
selected 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 s pecified pag e, erase (set to FF), or write to specified
pages.
CAUTION: When you run this sample program, enabling the #define
NFLASH_CANERASEBADBLOCKS macro makes it possi ble t o 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.
18RabbitCore 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”):
4. Click <OK> or <Close> 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 o f 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 Manual19
3.2.2 Serial Co mmunication
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
RxC TxC
TxD RxD
GND
shown in the diagram.
A repeating triangular pattern should print out in the STDIO window.
The program will periodically switch flow control on or of f to demonstrate the ef fect 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
RxC
TxD
TxC
RxD GND
repeatedly sending byte values 0–127 from Serial Port C to Serial Port D.
The program will switch between generating parity or not on Serial
Port C. Serial Port D will always be checking parity, so parity errors
should occur during every other sequence.
J4
J4
To set up the Prototyping Board, you will need to tie TxC and RxD together on the
RS-232 header at J4 using one of the jumpers supplied in the Development Kit as
shown in the diagram.
The Dynamic C STDIO window will display the error sequence.
• 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
RxC TxC
TxD RxD
Dynamic C 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.
J4
GND
20RabbitCore 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
RxC TxC
TxD RxD
J4
GND
shown in the diagram.
Once you have compiled and run this program, you can test flow con-
trol by disconnecting 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
TxD RxD
J4
GND
Once you have compiled and run this program, press and release
switches S2 and S3 on the Prototyping Board. The data sent between the serial ports
will be displayed in the STDIO window.
User’s Manual21
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 instruc-
tions 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.
22RabbitCore RCM4000
4. HARDWARE REFERENCE
Chapter 4 describes the hardware components and principal hardware
subsystems of the RCM40 00. Appendix A, “RC M4000 Specific ations,” provides complete physical and electrical specifications.
Figure 5 shows the Rabbit-based subsystems designed into the RCM4000.