Rabbit RCM3365, RCM3375 User Manual

RabbitCore RCM3365/RCM3375
C-Programmable Core Module
with NAND Flash Mass Storage and Ethernet
User’s Manual
019–0150 080528–G
RabbitCore RCM3365/RCM3375 User’s Manual
©2005–2008 Digi International Inc. • All rights res erved.
No part of the contents of this manual may be reproduced or transmitted in any form or by any means without the express written permission of Digi International.
Permission is granted to make one or more copies as long as the copyright page contained therein is included. These copies of the manuals may not be let or sold for any reason without the express written permission of Digi International.
Digi International reserves the right to make changes and
improvements to its products without providing n otice.
T r ade mark s
Rabbit, RabbitCore, and Dynamic C are registered trademarks of Digi International Inc.
Rabbit 3000 is a trademark of Digi International Inc.
xD-Picture Card is a trademark of Fuji Photo Film Co., O lympus C orporat ion, and Toshiba Corporation.
Rabbit Semiconductor Inc.
RabbitCore RCM3365/RCM3375

TABLE OF CONTENTS

Chapter 1. Introduction 1
1.1 RCM3365 and RCM3375 Features......................................................................................................2
1.2 Comparing the RCM3900/RCM3910 and RCM3365/RCM3375........................................................4
1.3 Advantages of the RCM3365 and RCM3375.......................................................................................5
1.4 Development and Evaluation Tools......................................................................................................6
1.4.1 RCM3365/RCM3375 Development Kit.......................................................................................6
1.4.2 Software........................................................................................................................................7
1.4.3 Accessories....................................................................................................................................7
1.4.4 Online Documentation..................................................................................................................7
Chapter 2. Getting Started 9
2.1 Install Dynamic C.................................................................................................................................9
2.2 Hardware Connections........................................................................................................................10
2.2.1 Step 1 — Attach Module to Prototyping Board..........................................................................10
2.2.2 Step 2 — Connect Serial Programming Cable............................................................................11
2.2.2.1 Programming via Ethernet Option..................................................................................... 12
2.2.3 Step 3 — Connect Power............................................................................................................13
2.2.3.1 Alternate Power-Supply Connections................................................................................ 13
2.3 Starting Dynamic C ............................................................................................................................14
2.3.1 Running Dynamic C via Serial Programming Cable..................................................................15
2.3.1.1 Run a Sample Program....................................................................................................... 15
2.3.1.2 Troubleshooting ................................................................................................................. 15
2.3.2 Running Dynamic C via Ethernet Cables ...................................................................................16
2.3.2.1 Run a Sample Program....................................................................................................... 16
2.3.2.2 Troubleshooting ................................................................................................................. 17
2.4 Where Do I Go From Here? ...............................................................................................................17
2.4.1 Technical Support.......................................................................................................................17
Chapter 3. Running Sample Programs 19
3.1 Introduction.........................................................................................................................................19
3.2 Sample Programs................................................................................................................................20
3.2.1 Use of NAND Flash....................................................................................................................21
3.2.2 Hot-Swapping xD-Picture Card..................................................................................................23
3.2.3 Serial Communication.................................................................................................................24
3.2.4 Real-Time Clock.........................................................................................................................25
3.2.5 RabbitNet....................................................................................................................................26
3.2.6 Other Sample Programs..............................................................................................................26
Chapter 4. Hardware Reference 27
4.1 RCM3365/RCM3375 Inputs and Outputs..........................................................................................28
4.1.1 Memory I/O Interface.................................................................................................................33
4.1.2 Other Inputs and Outputs............................................................................................................33
4.1.3 LEDs ...........................................................................................................................................33
4.2 Serial Communication ........................................................................................................................34
4.2.1 Serial Ports..................................................................................................................................34
4.2.2 Ethernet Port ...............................................................................................................................34
4.2.3 Serial Programming Port.............................................................................................................35
User’s Manual
4.3 Serial Programming Cable.................................................................................................................36
4.3.1 Changing Between Program Mode and Run Mode....................................................................36
4.3.2 Standalone Operation of the RCM3365/RCM3375...................................................................37
4.4 Memory..............................................................................................................................................38
4.4.1 SRAM.........................................................................................................................................38
4.4.2 Flash EPROM.............................................................................................................................38
4.4.3 NAND Flash...............................................................................................................................38
4.5 Other Hardware..................................................................................................................................40
4.5.1 Clock Doubler ............................................................................................................................ 40
4.5.2 Spectrum Spreader......................................................................................................................40
Chapter 5. Software Reference 41
5.1 More About Dynamic C .....................................................................................................................41
5.1.1 Developing Programs Remotely with Dynamic C..................................................................... 43
5.2 Dynamic C Functions........................................................................................................................ 44
5.2.1 Digital I/O...................................................................................................................................44
5.2.2 SRAM Use..................................................................................................................................44
5.2.3 Serial Communication Drivers...................................................................................................45
5.2.4 TCP/IP Drivers...........................................................................................................................45
5.2.5 NAND Flash Drivers..................................................................................................................45
5.2.6 Prototyping Board Functions...................................................................................................... 46
5.2.6.1 Board Initialization............................................................................................................ 46
5.2.6.2 Digital I/O.......................................................................................................................... 47
5.2.6.3 Switches, LEDs, and Relay............................................................................................... 48
5.2.6.4 Serial Communication....................................................................................................... 49
5.2.6.5 RabbitNet Port................................................................................................................... 50
5.3 Upgrading Dynamic C .......................................................................................................................52
5.3.1 Extras..........................................................................................................................................52
Chapter 6. Using the TCP/IP Features 53
6.1 TCP/IP Connections...........................................................................................................................53
6.2 TCP/IP Primer on IP Addresses.........................................................................................................55
6.2.1 IP Addresses Explained..............................................................................................................57
6.2.2 How IP Addresses are Used.......................................................................................................58
6.2.3 Dynamically Assigned Internet Addresses.................................................................................59
6.3 Placing Your Device on the Network ................................................................................................60
6.4 Running TCP/IP Sample Programs....................................................................................................61
6.4.1 How to Set IP Addresses in the Sample Programs.....................................................................62
6.4.2 How to Set Up your Computer for Direct Connect....................................................................63
6.5 Run the PINGME.C Sample Program................................................................................................ 64
6.6 Running Additional Sample Programs With Direct Connect............................................................64
6.6.1 RabbitWeb Sample Programs.....................................................................................................65
6.7 Where Do I Go From Here?...............................................................................................................65
Appendix A. RCM3365/RCM3375 Specifications 67
A.1 Electrical and Mechanical Characteristics ........................................................................................68
A.1.1 Headers......................................................................................................................................72
A.2 Bus Loading ...................................................................................................................................... 73
A.3 Rabbit 3000 DC Characteristics........................................................................................................76
A.4 I/O Buffer Sourcing and Sinking Limit.............................................................................................77
A.5 Jumper Configurations......................................................................................................................78
A.6 Conformal Coating............................................................................................................................80
Appendix B. Prototyping Board 81
B.1 Introduction .......................................................................................................................................82
B.1.1 Prototyping Board Features.......................................................................................................83
B.2 Mechanical Dimensions and Layout................................................................................................. 85
RabbitCore RCM3365/RCM3375
B.3 Power Supply.....................................................................................................................................87
B.4 Using the Prototyping Board..............................................................................................................88
B.4.1 Adding Other Components.........................................................................................................89
B.4.2 Digital I/O...................................................................................................................................90
B.4.2.1 Digital Inputs..................................................................................................................... 90
B.4.3 CMOS Digital Outputs...............................................................................................................91
B.4.4 Sinking Digital Outputs..............................................................................................................91
B.4.5 Relay Outputs.............................................................................................................................91
B.4.6 Serial Communication................................................................................................................92
B.4.6.1 RS-232............................................................................................................................... 93
B.4.6.2 RS-485............................................................................................................................... 94
B.4.7 RabbitNet Ports ..........................................................................................................................95
B.4.8 Other Prototyping Board Modules.............................................................................................96
B.4.9 Quadrature Decoder ...................................................................................................................96
B.4.10 Stepper-Motor Control.............................................................................................................96
B.5 Prototyping Board Jumper Configurations ........................................................................................98
B.6 Use of Rabbit 3000 Parallel Ports....................................................................................................100
Appendix C. LCD/Keypad Module 103
C.1 Specifications...................................................................................................................................103
C.2 Contrast Adjustments for All Boards...............................................................................................105
C.3 Keypad Labeling..............................................................................................................................106
C.4 Header Pinouts.................................................................................................................................107
C.4.1 I/O Address Assignments.........................................................................................................107
C.5 Mounting LCD/Keypad Module on the Prototyping Board ............................................................108
C.6 Bezel-Mount Installation..................................................................................................................109
C.6.1 Connect the LCD/Keypad Module to Your Prototyping Board...............................................111
C.7 Sample Programs .............................................................................................................................112
C.8 LCD/Keypad Module Function Calls..............................................................................................113
C.8.1 LCD/Keypad Module Initialization..........................................................................................113
C.8.2 LEDs.........................................................................................................................................113
C.8.3 LCD Display.............................................................................................................................114
C.8.4 Keypad......................................................................................................................................130
Appendix D. Power Supply 133
D.1 Power Supplies.................................................................................................................................133
D.1.1 Battery Backup.........................................................................................................................133
D.1.2 Battery-Backup Circuit............................................................................................................134
D.1.3 Reset Generator ........................................................................................................................135
Appendix E. Programming via Ethernet Crossover Cable 137
E.1 Load TCP/IP Parameters to the RCM3365 Module.........................................................................138
E.2 Load TCP/IP Parameters to the PC, Notebook, or Workstation......................................................139
E.3 Run a Program..................................................................................................................................141
E.3.1 Troubleshooting..................................................... ...... ..... ......................................... ...............141
Appendix F. RabbitNet 143
F.1 General RabbitNet Description ........................................................................................................143
F.1.1 RabbitNet Connections.............................................................................................................143
F.1.2 RabbitNet Peripheral Cards......................................................................................................144
F.2 Physical Implementation ..................................................................................................................145
F.2.1 Control and Routing..................................................................................................................145
F.3 Function Calls...................................................................................................................................146
F.3.1 Status Byte................................................................................................................................152
Index 153
User’s Manual
Schematics 157
RabbitCore RCM3365/RCM3375

1. INTRODUCTION

The RCM3365 and RCM3375 RabbitCore modules feature a compact module that incorporates the latest revision of the power-
ful Rabbit® 3000 microprocessor, flash memory, mass storage (NAND flash), static RAM, and digital I/O ports. The RCM3365 and RCM3375 present a new form of embedded flexibility with removable (“hot-swappable”) memory cards. The RCM3365 and RCM3375 both have an integrated 10/100Base-T Ethernet port, and provide for LAN and Internet-enabled systems to be built as easily as serial-communication systems.
In addition to the features already mentioned above, the RCM3365 and RCM3375 have two clocks (main oscillator and real-time clock), reset circuitry , and the circuitry necessary for management of battery backup of the Rabbit 3000’s internal real-time clock and the static RAM. Two 34-pin headers bring out the Rabbit 3000 I/O bus lines, parallel ports, and serial ports.
The RCM3365/RCM3375’s mass-storage capabilities make them suited to running the optional Dynamic C FAT file system module where data are stored and handled using the same directory file structure commonly used on PCs. A removable xD-Picture Card can be hot-swapped to transfer data quickly and easily using a standardized file system that can be read away from the RCM3365/RCM3375 installation.
The RCM3365 or RCM3375 receives +3.3 V power from the customer-supplied mother­board on which it is mounted. The RCM3365 and RCM3375 can interface with all kinds of CMOS-compatible digital devices through the motherboard.
The Development Kit has what you need to design your own microprocessor-based system: a complete Dynamic C software development system including the Dynamic C FAT File System module, and a Prototyping Board that allows you to evaluate the RCM3365 or RCM3375, and to prototype circuits that interface to the RCM3365 or RCM3375 module.
User’s Manual 1

1.1 RCM3365 and RCM3375 Features

Small size: 1.85" x 2.73" x 0.86" (47 mm x 69 mm x 22 mm)
Microprocessor: Rabbit 3000 running
at 44.2 MHz
52 parallel 5 V tolerant I/O lines: 44 configurabl e for I/O, 4 fixe d in pu ts, 4 fi xed o ut p uts
Three additional digital inputs, two additional digital outputs
External reset
Alternate I/O bus can be configured for 8 data lines and 6 address lines (shared with
parallel I/O lines), plus I/O read/write
Ten 8-bit timers (six cascadable) and one 10-bit timer with two match registers
512K flash memory, 512K program execution SRAM, 512K data SRAM
Fixed and hot-swappable mass-storage flash-memory options, which may be used with
the standardized directory structure supported by the Dynamic C FAT File System module.
Real-time clock
Watchdog supervisor
Provision for customer-supplied backup battery via connections on header J4
10-bit free-running PWM counter and four pulse-width registers
Two-channel Input Capture (shared with parallel I/O ports) can be used to time input
signals from various port pins
Two-channel Quadrature Decoder accepts inputs from external incremental encoder modules
Five or six 3.3 V CMOS-compatible serial ports with a maximum asynchronous baud rate of 5.525 Mbps
. Three ports are configurable as a clocked serial port (SPI), and two
ports are configurable as SDLC/HDLC serial ports (shared with parallel I/O ports).
Supports 1.15 Mbps IrDA transceiver
Supports Dynamic C RabbitSys, which supports Ethernet access for remote application
updates, and remote monitoring and control of a RabbitSys-enabled RCM3365
The RCM3900/RCM3910 and RCM3365/RCM3375 RabbitCore modules are similar to the RCM3305/RCM3315 and RCM3309/RCM3319, but they use fixed NAND or remov­able media for their mass-storage memories instead of the fixed serial flash options of the RCM3305/RCM3315 and the RCM3309/RCM3319.
2 RabbitCore RCM3365/RCM3375
Table 1 below summarizes the main features of the RCM3365 and the RCM3375 modules.
Table 1. RCM3365/RCM3375 Features
Feature RCM3365 RCM3375
Microprocessor Rabbit 3000 running at 44.2 MHz SRAM 512K program (fast SRAM) + 512K data Flash Memory
(program) Flash Memory
(mass data storage)
Serial P orts
* RCM3365 modules sold before 2008 had 16MB fixed NAND flash
memory.
NOTE: M-type xD-Picture Cards are not supported at this time.
32MB (fixed)
up to 128MB ( removable)
(NAND flash)
6 shared high-speed, 3.3 V CMOS-compatible ports:
• all 6 are configurable as asynchronous serial ports;
• 4 are configurable as a clocked serial port (SPI) and 1 is configurable as an HDLC serial port;
• option for second HDLC serial port at the expense of 2 clocked serial ports (SPI)
*
+
512K
up to 128MB ( removable)
(NAND fl ash)
The RCM3365 and RCM3375 are programmed over a standard PC serial port through a serial programming cable supplied with the Development Kit, and can also be programed through a USB port with an RS-232/USB converter, or directly over an Ethernet link using the Dynamic C download manager with or without a RabbitLink; Dynamic C RabbitSys may also be used with a RabbitSys-enabled RCM3365 over an Ethernet link.
Appendix A provides detailed specifications for the RCM3365 and the RCM3375.
User’s Manual 3

1.2 Comparing the RCM3900/RCM3910 and RCM3365/RCM3375

We can no longer obtain certain components for the RCM3365/RCM3375 RabbitCore modules that support the originally specified -40°C to +70°C temperature range. Instead of changing the design of the RCM3365/RCM3375 RabbitCore modules to handle available components specified for the original temperature range, we decided to develop a new product line — the RCM3 900 s e ries.
The RCM3900 series of RabbitCore modules is similar in form, dimensions, and function to the RCM3365/RCM3375 modules. We strongly recommend that existing RCM3365/ 3375 customers and designers of new systems consider using the new RCM3900 series RabbitCore modules.
This section compares the two lines of RabbitCore modules.
Temperature Specifications — RCM3365/RCM3375 RabbitCore modules manufac-
tured after May, 2008, are specified to operate at 0°C to +70°C. The RCM3900/ RCM3910, rated for -20°C to +85°C, are offered to customers requiring a larger temperature range after May, 2008.
Removable Mass Storage — The hot-swappable xD-Picture Card™ mass storage device with up to 128MB of memory has been replaced with the miniSD Card with up to 1GB of memory. The miniSD Card is more readily available today, and is expected to remain readily available for a long time. In addition, miniSD Cards provide a signif­icantly larger memory capacity, which has been requested by customers. The trade-off for the larger memory capacity is that the data transfer rate to/from the miniSD Card is about an order of magnitude slower than to/from the xD-Picture Card.
NOTE: RCM3365/RCM3375 RabbitCore modules may eventually be discontinued
because of changes to the xD-Picture Card™.
Serial Ports — Serial Port B, available as either a clocked serial port or an asynchro-
nous serial port on the RCM3365/RCM3375, is used by the RCM3900/RCM3910 as a clocked serial peripheral interface (SPI) for the miniSD™ Card, and is not brought out for customer use.
General-Purpose I/O — PD2, a configurable I/O pin on the RCM3365/RCM3375, is used to enable/disable the RabbitNet SPI interface when the RCM3365/RCM3375 is installed on the Prototyping Board. The RCM3900/RCM3900 use PD2 to detect whether the miniSD™ Card is installed, and so PD2 is not brought out for customer use on the RCM3900/RCM3910.
Maximum Current — The RCM3365/RCM3375 draws 250 mA vs. the 325 mA required by the RCM3900/RCM3910.
LEDs — The SPEED and user (USR/BSY)LED locations have been swapped between the RCM3365/RCM3375 and the RCM3900/RCM3910, the LNK/ACT LEDs have been combined to one LED on the RCM3900/RCM3910, and the RCM3900/RCM3910 has an FDX/COL LED instead of the FM LED on the RCM3365/RCM3375. The LED placements on the boards remain unchanged.
4 RabbitCore RCM3365/RCM3375
Ethernet chip — A different Ethernet controller chip is used on the RCM3900/ RCM3910. The Ethernet chip is able to detect automatically whether a crossover cab le or a straight-through cable is being used in a particular setup, and will configure the signals on the Ethernet jack inte rf ace.
Dynamic C — As long as no low-level FA T file system calls or direct xD-Picture Card access calls to the
NFLASH.LIB library were used in your application develo ped f or t he
RCM3365/RCM3375, you may run that application on the RCM3900/RCM3910 after you recompile it using Dynamic C v. 9.60.
NOTE: The Dynamic C RabbitSys option for programming an RCM3365 over an
Ethernet link is not supported for the RCM3900.

1.3 Advantages of the RCM3365 and RCM3375

Fast time to market using a fully engineered, “ready-to-run/ready-to-program” micro­processor core.
Competitive pricing when c ompar ed with the alternative of purchasing and assembling individual components.
Easy C-language program development and debugging
Program download utility (Rabbit Field Utility) and cloning board options for rapid
production loading of programs.
Generous memory size allows large programs with tens of thousands of lines of code, and substantial data storage.
Integrated Ethernet port for network connectivity, with royalty-free TCP/IP software.
Ideal for network-enabling security and access systems, home automation, HVAC
systems, and industrial controls
User’s Manual 5

1.4 Development and Evaluation Tools

1.4.1 RCM3365/RCM3375 Development Kit

The RCM3365/RCM3375 Development Kit contains the hardware you need to use your RCM3365 or RCM3375 module.
RCM3365 module.
Prototyping Board.
AC adapter, 12 V DC, 1 A (inclu ded onl y with Deve lop ment Kits sold for the North Amer-
ican 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.)
Serial programming cable with 10-pin header and DE9 connections.
2 CDs — Dynamic C
documentation on disk.
Getting Started instructions.
32 MB xD-Picture Card™.
Accessory parts for use on the Prototyping Board.
Screwdriver and Ethernet cables.
Rabbit 3000 Processor Easy Reference poster.
®
and Dynamic C FA T File Syst em module — with complete produ ct
Registration card.
Programming
DIAG
PROG
Getting Started
Ethernet
Cables
®
Installing Dynamic C
Insert the CD from the Development Kit in your PC’s CD-ROM drive. If the instal­lation 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.
RabbitCore RCM3365/RCM3375
Development Kit Contents
The RCM3365/RCM3375 Development Kit contains the following items:
RCM3365 module.
RCM3300 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.
2 CDs — Dynamic C and Dynamic C FAT Fil e Syst em mod ule — with complete product documentation
on disk.
Ethernet cables and screwdriver.
Getting Started instructions.
32 MB xD-Picture Card™ (NAND flash)
A bag of accessory parts for use on the Prototyping Board.
Rabbit 3000 Processor Easy Reference poster.
Registration card.
Rabbit and Dynamic C are registered trademarks of Rabbit Semiconductor Inc.
Instructions
Cable
Accessory Parts for
Prototyping Board
XD-Picture Card
+DC
GND
D
D
C
J1
N
N
D
G
+
G
R1
D N G
R30
U8
C16
R24
D5D6D7
C9
U4
JB
4
3
2
O
O
O
H
H
H
R31
R32
DS5DS6
J2
D1
C1
C2
U1
J10
C10
C11
00 01 02 03 04 05 06 07
OUT
C12
RP1
JP4
C13
U5
R16
CX2
SO20W
J13
1
C21
C22
O H
C23
C24
J14
TxE RxE GND TxF RxF 485+ GND 485
J8
GND
NC
GND
+3.3 V
VBT
VRAM
/RES
SMODE1
SM0
D2
/IORD
/IOWR
PG4
L1
PG5
PG6
R11
PG7
PE0
PE1
PE3
PE4
PE5
R12
7 E
PE6
P 6 F
PF7
P 4 F
PF5
P
R67
C8
PB7
PB6
R68
R69
PB5
PB4
R70
PB3
PB2
PB0
/RES_OUT
RCM3300
PROTOTYPING
BOARD
CORE MODULE
GND/EGND
LINK
ACT
PD6
PD7
PD2
PD3
PD4
PD5
PG2
PG3
PG0
PG1
PC6
PC7
PC4
PC5
PC2
PC3
PC0
PC1
PF1
PF0
PF3
PF2
PA1
PA0
PA3
PA2
PA5
PA4
PA7
PA6
GND
STAT
J9
S1
RESET
R23
R21
R22
Q1
Q2Q3Q4
JA
J12
R28
R27
R25
R26
R50
D4 Q6
R49
R29
CORE
S3
S2
DS2
DS4
DS3
Prototyping Board
AC Adapter
(North American
kits only)
Screwdriver
VMA+ MDA1 MDA2 MDA3 MDA4 VMA
POWER
1 S D
J3
JP1
C3
U2
L293D
H-DRIVER
C4
R13
OUT
RP2
R17
R15
+5 V
GND
+3.3 V
RX13
RX14
CX1
RX15
UX4
UX1
DX1
SO20W
UX5
DX2
C18
C17
UX2
R33
R34
U10
U9
R35
R36
R37
JP5
R38
C26
C25
VMB MDB1 MDB2 MDB3 MDB4 VMB+
J5
J4
R52 R53
R51
R54
PF0_CLKD
JP3
PF0_QD
JP2
L293D
H-DRIVER
R14
BT1
RX16
RX17
RX18
SOT23-6
SOT23-6
LCD1JB
U3
C5
LCD1JA
R40
U11
KEYPAD DISPLAY BOARD
5
6
7
8
5
5
5
5
R
R
R
R
+5 V
GND
+3.3 V
0
1
2
3
D
0
1
2
S
A
A
A
A
C
D
D
D
C
L
/
B
B
B
B
B
B
B
J15
R39
0
2
4
6
S
D
D
D
D
D
E
N
E
E
E
E
R
+V/
L
L
L
L
G
A3A1D0D2D4D
0
7
5
3
1
T
S
D
D
L
A2A
D1D3D5D
D
D
D
C
N
N
/
K
E
E
E
G
G
B
L
L
L
+
R42
C19
C20
R41
K1
U12
D8
R45
LCD1JC
GND IN3 IN2 IN1 IN0 +5V
+5V QD2A QD2B QD1A QD1B GND
R60 R61
U7
R59
R62
3
4
5
6
6
6
6
6
R
R
R
R
R9
3
4
5
6
7
D
D
D
D
D
B
B
B
B
B
J16
6
C27
C28
R44
R43
C30C29
R46
DS7
Q5
R47
RELAY
R48
R8
J17
NO1 COM1 NC1 NO2 COM2 NC2
J7
J6
C7
RABBITNET
R2
R7
R3R4R5
R6
C6
U6
R10
/ H
S
J11
A
C14
C15
L
F
L
M
A
E
I
D
R
O
E S
M
R19
R20
R18
D
E
V
0 T A
3
@ Y R A
A L
.5
E
0
R
Figure 1. RCM3365/RCM3375 Development Kit
6 RabbitCore RCM3365/RCM3375

1.4.2 Software

The RCM3365 an d the RCM 3375 are programm ed using v ersion 9.24 or later o f Dynamic C. A compatible version is included on the Development Kit CD-ROM.
Rabbit is also offering RCM3365 RabbitCore modules preloaded with Dynamic C Rabbit­Sys firmware to allow these modules to run Dynamic C RabbitSys. Dynamic C RabbitSys requires Dynamic C version 9.30 or later, and allows the RCM3365 to be accessed via an Ethernet connection for remote application updates, and for remote monitoring and con­trol. A RabbitSys Development Kit is available with all the hardware and software tools that are needed to develop a RabbitSys application.
Dynamic C v. 9.60 includes the popular µC/OS-II real-time operating system, point-to­point protocol (PPP), FAT file system, RabbitWeb, and other select libraries that were previously sold as individual Dynamic C modules.
Rabbit also offers for purchase the Rabbit Embedded Security Pack featuring the Secure Sockets Layer (SSL) and a specific Advanced Encryption Standard (AES) library. In addi­tion to the Web-based technical support included at no extra charge, a one-year telephone­based technical support subscription is also available for purchase.
NOTE: Version 2.10 or later of the Dynamic C FAT file system module is required to use
the FAT file system with the RCM3365 and RCM3375 models.

1.4.3 Accessories

Rabbit has available a USB Removable Memory Card Reader and a Connector Adapter Board.
USB Removable Memory Card Reader (Part No. 20-101-1104)—allows you to read data from the xD-Picture Card via your PC.
Connector Adapter Board (Part No. 151-0114)—allows you to plug the RCM3365/ RCM3375 whose headers have a 2 mm pitch into header sockets with a 0.1" pitch.

1.4.4 Onlin e Documentation

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

2. GETTING S TARTED

This chapter explains how to set up and use the RCM3365/ RCM3375 modules with the accompanying Prototyping Board.
NOTE: It is assumed that you have a Development Kit. If you purc hased an RCM3365 or
RCM3375 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 RCM3365/RCM3375 (and for all other Rabbit hardware), you must install and use Dynamic C.
If you have not yet installed Dynamic C version 9.24 (or a later version), do so now by inserting the Dynamic C CD from the Development Kit in your PC’s CD-ROM drive. If autorun is enabled, the CD installation will begin automatically.
If autorun is disabled or the installation otherwise does not start, use the Windows
Start | Run menu or Windows Disk Explorer to launch setup.exe from the root folder
of the CD-ROM. The installation program will guide you through the installation process. Most steps of the
process are self-explanatory. Dynamic C uses a COM (serial ) port to communica te with the tar get deve lopment sy stem.
The installation allows you to choose the COM port that will be used. The default selec­tion is COM1. You may select any available port for Dynamic C’s use. If you are not cer­tain which port is available, select COM1. This selection can be changed later within Dynamic C.
NOTE: The installation utility does not check the selected COM port in any way. Speci-
fying a port in u se by a not her device (mouse, modem, etc.) may l ea d to a message such as
"could not open serial port" when Dynamic C is started.
Once your installation is complete, you will have up to three icons on your PC desktop. One icon is for Dynamic C, one opens the documentation menu, and the third is for the Rabbit Field Utility, a tool used to download precompiled software to a target system.
If you have purchased the optional Dynamic C Rabbit Embedded Security Pack, install it after installing Dynamic C. You must install the Rabbit Embedded Security Pack in the same directory where Dynamic C was installed.
User’s Manual 9

2.2 Hardware Connections

There are three steps to connecting the Prototyping Board for use with Dynamic C and the sample programs:
1. Attach the RCM3365/RCM3375 module to the Prototyping Board.
2. Connect the serial programming cable between the RCM3365/RCM3375 and the worksta­tion PC or if you have an RCM3365 with RabbitSys firmware you may connect the RCM3365 and the PC using Ethernet cables.
3. Connect the power supply to the Prototyping Board.
2.2.1 Step 1 — Attach Module to Prototyping Board
Turn the RCM3365/RCM3375 module so that the Ethernet jack is facing the direction shown in Figure 2 below. Align the pins from headers J3 and J4 on the bottom side of the modul e into header sockets JA and JB on the Prototyping Board. The picture card (NAND flash) does not have to be inserted into connector J6 on the RCM3365/RCM3375 at this time.
RCM3365/ RCM3375
Do not press down
here.
RP1
C13
U5
R16
GND
HO4
D4
D5D6D7
R29
DS3
JP1
L293D H-DRIVER
R13
RP2
R17
R15
JB
JB
HO3
HO2
HO1
R30
R31
R32
DS5 DS6
DS4
VMA+ MDA1 MDA2 MDA3 MDA4 VMA
C3
U2
C4
OUT
CX1
SO20W
CX2
SO20W
J13
C21
C23
C24
J14
TxE RxE GND TxF RxF 485+ GND 485
POWER
+DC
GND
J1
GND
+DC
GND
DS1
R1 J2
J8
GND
NC
GND
+3.3 V
VBT
VRAM
/RES
SMODE1
SPEED
C79
C78
SM0
D2
/IORD
USR FMLINK ACT
R38
C77
R79
/IOWR
PG4
DS3
L1
L1
R37
DS4
R43
C42
PG5
PG6
R11
R36
DS2
C72
C76
PG7
PE0
R35
J6
L2
J2
PE1
PE4
PE6
PF7
PF5
PB7
PB5
PB3
R67
C105
R96
PB0
JP5
Q2
RCM3300 PROTOTYPING BOARD
ACT
PD7
PD3
PD5
PG3
PG1
PC7
PC5
PC3
PC1
PF0
PF2
PA0
PA2
PA4
PA6
STAT
J9
S1
RESET
C71
PE3
C86
C70
R81
PE5
C80
R12
R82
C82
R30
R31 R54
PF4 PF6 PE7
R67
R53
PB6
R44
R68
C58
C61
R69
PB4
C36
R20
R21
R70
PB2
R25
JP6
/RES_OUT
C27
JP7
JP8
JP4
C21
C22
J6
C18
C12
C13
C9
U3
C3 C2 R7
JP9
R29
R50
R59
C104
LINK
U5
PD6
C67
PD2
R45
PD4
PG2
PG0
PC6
PC4
PC2
JA
PC0
PF1
PF3
PA1
PA3
PA5
PA7
GND
R25
DS1
L4
J3
D1
C1
C2
C74
U13
U1
J10
C81
C10
C11
C9
00 01 02 03 04 05 06 07
OUT
C12
C8
JP4
R27 R26
Y2
U4
C35
R15
R19
R17
R14
C28
R1
C34
R23
U4
R22
R18
C24
C20
C19
C15
C11
C10
R8
C6
U16
R5
C4
R4
U1
C5
Y1
R2
R6
C1
R10
R86
R70
R85
R9
R84
CORE MODULE
R80
R64
R77
J1
GND/EGND
U6
R11
C14
R12
U2
R13
U8
C16
R24
R23
R21
R22
Q1
Q2Q3Q4
JA
J12
R28
R27
R26
R50
Q6
R49
CORE
S3
S2
DS2
VMB MDB1 MDB2 MDB3 MDB4 VMB+
J5
J4
PF0_CLKD
PF0_QD
JP2
U3 L293D H-DRIVER
R14
C5
BT1
+5 V
GND
+3.3 V
RX13
RX16
RX14
RX17
RX18
RX15
UX4
UX1
DX1
SOT23-6
UX5
DX2
SOT23-6
C18
C17
UX2
R33
R34
U10
U9
R35
R36
C22
R37
JP5
R38
C26
C25
JP3
R52 R53
R51
R55
LCD1JA
LCD1JB
R54
R56
R57
R58
R39
+V
+BKLT
R40
U11
+5V QD2A QD2B QD1A QD1B GND
LCD
/CS
J15
/RES
LED0
LED2
/CS
LED1
LED3
C19
KEYPAD DISPLAY BOARD
R60 R61
R59
R63
R64
R65
BA0
BA1
BA2
LED4
LED6
GNDA3A1D0D2D4D6
GND
GND
LED5
C20
R41
U12
GND IN3 IN2 IN1 IN0 +5V
J7
J6
U7
R62
C7
RABBITNET
R2
R7
R3R4R5
BD1
D1D3D5
R6
C6
R8
U6
R9
R10
J11
C14
C15
SERIAL FLASH/
MODEM
R19
R20
R18
BD2
BD3
BD4
BD5
BD6
BD7
J16
0.5 A @ 30 V
RELAY RATED
D7
K1
LCD1JC
J17
C27
C28
R44
R43
C30C29
R45
R46
NO1 COM1 NC1 NO2 COM2 NC2
DS7
Q5
R47
RELAY
R48
R66
+5 V
GND
+3.3 V
BA3
BD0
A2
A0
R42
D8
CORE LED
Figure 2. Install the RCM3365/RCM3375 Module on the Prototyping Board
NOTE: It is important that you line up the pins on headers J3 and J4 of the RCM3365/
RCM3375 module exactly with th e cor re spon din g pins of header sockets JA and JB on the Prototyping Board. The header pins may become bent or damaged if the pin align­ment is offset, and the module will not work. Permanent electrical damage to the mod­ule may also result if a misaligned module is powered up.
Press the module’s pins firmly into the Prototyping Board header sockets—press down in the area above the header pins using your thumbs or fingers over the header pins as shown in Figure 2. Do not press down on the picture card connector (J6) unless the picture card is installed, but rather press down on the circuit board along the edge by the connector. Also, do not press down on the middle of the module t o avoid fl exing the module, which could damag e the module or components on the module.
Should you need to remove the module, grasp it with your fingers along the sides by the con­nectors and gently work the module up to pull the pins away from the sockets where they are installed. Do not remove the module by grasping it at the top and bottom.
10 RabbitCore RCM3365/RCM3375

2.2.2 Step 2 — Connect Serial Programming Cable

The serial programming cable connects the RCM3365/RCM3375 to the PC running Dynamic C to download programs and to monitor the module during debugging.
Connect the 10-pin connector of the serial programming cable labeled
PROG to header J1
on the RCM3365/RCM3375 module as shown in Figure 3. There is a small dot on the cir­cuit board next to pin 1 of header J1. Be sure to orient the marked (usually red) edge of the cable towards pin 1 of the connector. (Do not use the DIAG connector , which is used for a nonprogramming serial connection.)
AC adapter
VMB MDB1 MDB2 MDB3 MDB4 VMB+
J5
J4
PF0_CLKD
PF0_QD
U3
C5
BT1
RX16
RX17
RX18
UX4
DX1
SOT23-6
UX5
DX2
SOT23-6
C18
C17
U10
R35
R37
JP5
R38
Programming Cable
+5V QD2A QD2 B QD1A QD1B GND
R52 R53
R51
R54
JP3
R55
R56
R57
R58
LCD
J15
R39
+V
/RES
LED0
LCD1JA
/CS
LED1
+BKLT
C19
R40
To
U11
PC COM port
Blue
KEYPAD DISPLAY BOARD
shrink wrap
LCD1JB
LED2
LED3
R60 R61
R59
R63
/CS
BA0
BA1
LED4
LED6
GND
LED5
R41
U7
R62
R64
R65
R66
+5 V
GND
+3.3 V
BA2
BA3
BD0
BD1
GNDA3A1D0D2D4D6
A2
A0
D1D3D5
GND
R42
C20
U12
D8
GND IN3 IN2 IN1 IN0 +5V
C7
R8
R9
BD2
BD3
BD4
D7
K1
LCD1JC
J7
J6
RABBITNET
R2
R7
R3R4R5
R6
C6
U6
R10
J11
C14
C15
SERIAL FLASH/
MODEM
R19
R20
R18
BD5
BD6
BD7
J16
0.5 A @ 30 V
RELAY RATED
J17
C27
C28
R44
R43
C30C29
R45
R46
NO1 COM1 NC1 NO2 COM2 NC2
DS7
Q5
R47
RELAY
R48
J1
PROG
J8
GND
GND
VBT
/RES
SM0
/IOWR
PG5
PG7
PE1
PE4
PE6
PF7
PF5
PB7
PB5
PB3
PB0
RCM3300 PROTOTYPING BOARD
ACT
PD7
PD3
PD5
PG3
PG1
PC7
PC5
PC3
PC1
PF0
PF2
PA0
PA2
PA4
PA6
STAT
J9
S1
RESET
NC
+3.3 V
VRAM
SMODE1
/IORD
PG4
PG6
PE0
PE3
PE5
PF4 PF6 PE7
PB6
PB4
PB2
/RES_OUT
LINK
PD6
PD2
PD4
PG2
PG0
PC6
PC4
PC2
PC0
PF1
PF3
PA1
PA3
PA5
PA7
GND
alternate
3-pin
power connector
RP1
Y2
R4 U1
R70
R64
HO4
D5D6D7
L293D H-DRIVER
RP2
C74
R19
R17
U4
R22
R18
U16
R5
R2
R6
R85
R9
R84
R80
U6
PROG
C14
JB
R13
HO3
HO2
R30
R31
DS5 DS6
DS4
VMA+ MDA1 MDA2 MDA3 MDA4 VMA
JP1
C3
U2
C4
R13
OUT
R17
U13
R15
C81
R27 R26
C35
R15 R14
C28
R1
R23
C24
CX1
C20
C19
C15
UX1
C11
SO20W
C10
R8
C6
CX2
C4
Y1
C1
R10
UX2
J1
SO20W
R11
R12
J13
U2
C21
C22
HO1
C23
C24
J14
DIAG
R32
TxE RxE GND TxF RxF 485+ GND 485
JP2
L293D H-DRIVER
R14
+5 V
GND
+3.3 V
RX13
RX14
RX15
R33
R34
U9
R36
C26
C25
Colored edge
SPEED
GND/EGND
JA
R38 R37
DS4
R36
R35
GND
J1
C1
C9
U4
R43
C105
GND
+DC
C10
C11
L1
C42
C76
L2
J2
C86
R81
R30
CORE MODULE
R67
R96
JP4
JP5
Q2
R21
Q1
Q2Q3Q4
R28
R27
S3
POWER
GND
DS1
R1 J2
J3
D1
C2
U1
J10
00 01 02 03 04 05 06 07
OUT
C12
JP4
C79
C78
R16
C77
R79
C72
C71
C70
C80
R82
C82
R31
R54
R53
R44
C58
C61
C36
R20
R21
R25
JP6
C27
JP7
JP8
C21
C22
J6
C18
C12
C13
U8
C9
U3
C3 C2 R7
JP9
C16
R29
R50
R24
R23
R22
R59
C104
U5
C67
R45
J12
R50
D4
Q6
R49
CORE
DS2
C13
U5
C34
C5 R86
R77
GND
R29
DS3
+DC
D2
L1 R11
R12
R67
C8
R68 R69 R70
USR FMLINK ACT
DS3
DS2
DS1
L4
R25
R26
S2
Figure 3. Connect Serial Programming Cable and Power Supply
NOTE: Be sure to use the serial programming cable (part number 101-0542) supplied
with this Development Kit—the serial programming cable has blue shrink wrap around the RS-232 converter section located in the middle of the cable. Pr ogramming cables with clear o r r ed s hr i nk w ra p f ro m o th er Rabbit kits are not desig ned to work wit h RCM3365 / RCM3375 modules.
Connect the other end of the serial 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. 20-151--0178) with the serial programming cable supplied with the RCM3365/RCM3375 Development Kit. Note that not all RS-232/ USB converters work with Dynamic C.
User’s Manual 11
2.2.2.1 Programming via Ethernet Option
An Ethernet cable connects a RabbitSys-enabled RCM3365 to the PC running Dynamic C with Dynamic C RabbitSys via a DHCP network to download programs and to monitor the RCM3365 module during debugging.
Use a straight-through CAT 5/6 Ethernet cable to connect the Ethernet jack on the RCM3365 to a DHCP-enabled network. Y our PC should also be connected to this network—you will need a second straight-through CAT 5/6 Ethernet cable to connect the PC to the net work since only one straight-through Ethernet cable is supplied with the Development Kit.
R60 R61
U7
R62
R63
R64
R65
R66
+5 V
+3.3 V
BA1
BA2
BA3
BD0
LED6
GNDA3A1D0D2D4D6
A2
A0
GND
GND
R42
C20
U12
D8
GND
BD1
D1D3D5
GND IN3 IN2 IN1 IN0 +5V
C7
R8
R9
BD2
BD3
BD4
D7
K1
LCD1JC
J7
J6
RABBITNET
R2
R7
R3R4R5
R6
C6
U6
R10
J11
C14
C15
SERIAL FLASH/
MODEM
R19
R20
R18
BD5
BD6
BD7
J16
0.5 A @ 30 V
RELAY RATED
J17
C27
C28
R44
R43
C30C29
R45
R46
NO1 COM1 NC1 NO2 COM2 NC2
DS7
Q5
R47
RELAY
R48
CAT 5/6
Ethernet Cable
To Network
or PC
J8
GND
GND
VBT
/RES
SM0
/IOWR
PG5
PG7
PE1
PE4
PE6
PF7
PF5
PB7
PB5
PB3
PB0
RCM3300 PROTOTYPING BOARD
ACT
PD7
PD3
PD5
PG3
PG1
PC7
PC5
PC3
PC1
PF0
PF2
PA0
PA2
PA4
PA6
STAT
J9
S1
RESET
NC
+3.3 V
VRAM
SMODE1
/IORD
PG4
PG6
PE0
PE3
PE5
R12
PF4 PF6 PE7
PB6
PB4
PB2
/RES_OUT
LINK
PD6
PD2
PD4
PG2
PG0
PC6
PC4
PC2
PC0
PF1
PF3
PA1
PA3
PA5
PA7
GND
RP1
C74
R22
R4 U1
R2
R70
R85
R80
R64
HO4
D5D6D7
R30
DS4
R84
JB
L293D H-DRIVER
RP2
R19
R18
U16
R6 R9
U6
C14
HO3
R17
U4
R13
HO2
R31
DS5 DS6
R5
VMA+ MDA1 MDA2 MDA3 MDA4 VMA
JP1
C3
U2
C4
R13
OUT
R17
U13
R15
C81
R27 R26
C35
R15 R14
C28
R1
R23
C24
CX1
C20
C19
C15
UX1
C11
SO20W
C10
R8
C6
CX2
C4
Y1
C1
R10
UX2
J1
SO20W
R11
R12
J13
U2
C21
C22
HO1
C23
C24
J14
R32
TxE RxE GND TxF RxF 485+ GND 485
SPEED
R38 R37
R36
R35
GND/EGND
JA
DS4
GND
C1
C9
U4
R43
C105
J1
GND
C10
C42
L2
J2
CORE MODULE
R67
R96
Q2
R21
Q1
R27
+DC
GND
D1
C11
C79
L1
C76
C86
R81
R82
R30
C61
JP8
JP4
JP5
R22
Q2Q3Q4
R28
S3
R1 J2
U1
OUT
C12
JP4
C77
R79
C72
C70
C82
JP7
C22
J6
C12
C13
JP9
R59
R50
Q6
R49
CORE
POWER
DS1
J3
C2
J10
00 01 02 03 04 05 06 07
C13
U5
C78
R16
C71
C80
R31 R54
R53
R44
C58
Y2
C36
C34
R20
R21
R25
JP6
C27
C21
C18
U8
C9
U3
C3 C2 R7
C5
C16
R29
R86
R50
R24
R23
R77
C104
U5
C67
R45
GND
J12
D4
R29
DS2
DS3
+DC
D2
L1
R11
R67
C8
R68 R69 R70
USR FMLINK ACT
DS3
DS2
DS1
L4
R25
R26
S2
JP2
L293D H-DRIVER
R14
VMB MDB1 MDB2 MDB3 MDB4 VMB+
J5
J4
PF0_CLKD
PF0_QD
U3
C5
+5V QD2A QD2 B QD1A QD1B GND
R52 R53
R51
R54
JP3
R59
R55
R56
R57
R58
BT1
+5 V
GND
+3.3 V
RX13
RX16
RX14
RX17
RX18
RX15
UX4
DX1
SOT23-6
UX5
DX2
SOT23-6
C18
C17
R33
R34
U10
U9
R35
R36
R37
JP5
R38
C26
C25
LCD1JA
J15
R39
+V
/RES
LED0
/CS
LED1
+BKLT
C19
R40
U11
KEYPAD DISPLAY BOARD
LCD
/CS
BA0
LED2
LED4
LED3
LED5
R41
LCD1JB
Figure 4. Connect Ethernet Cable for Ethernet Programming Option
You may also use a crossover CAT 5/6 Ethernet cable to connect the Ethernet jack on the RCM3365 directly to your PC, but there will be additional steps required to configure the TCP/IP parameters on the RCM3365 and on your PC if your PC does not have a DHCP server. These steps are described in Appendix E.
12 RabbitCore RCM3365/RCM3375

2.2.3 Step 3 — Connect Power

When all other connections have been made, you can connect power to the Prototyping Board. Connect the wall transformer to jack J1 on the Prototyping Board as shown in Figure 3.
Plug in the wall transformer.
The core LED on the Prototyping Board should light up. The
RCM3365/RCM3375 and the Prototyping Board are now ready to be used.
NOTE: A RESET button is provided on the Prototypi ng Board to a llow a har dware reset
without disconnecting power. The RCM3365/RCM3375 can also be reset from Dynamic C by pressing <Ctrl-Y> if your PC is connected to the RCM3365/RCM3375 via the serial programming cable.
2.2.3.1 Alternate Power-Supply Connections
All Development Kits include a header connector that may be used to connect your power supply to 3-pin header J2 on the Prototyping Board. The connector may be attached either way as long as it is not offset to one side—the center pin of J2 is always connected to the positive terminal, and either edge pin is negative. The power supply should deliver 8 V to 30 V DC at 8 W.
User’s Manual 13

2.3 St arting Dynamic C

Once the RCM3365/RCM3375 is connected as described in the preceding pages, start Dynamic C by double-clicking on the Dynamic C icon on your desktop or in your Start menu. Select Code an d BIOS in Fla sh , Run in RAM on the “Compiler” tab in the Dynamic C Options > Project Options menu. Click OK.
Section 2.3.1 explains the remaining Dynamic C configurations to run a sample program via the serial programming cable, and Section 2.3.2 explains the remaining Dynamic C configurations to run a sample program via an Ethernet cable.
14 RabbitCore RCM3365/RCM3375

2.3.1 Running Dynamic C via Serial Programming Cable

Dynamic C uses the serial port on your PC that you specified during installation. If you are using a USB port to connect you r computer to the RCM3365 /RCM3375 module,
choose
Communications tab.
2.3.1.1 Run a Sample Program
Options > Project Options and select “Use USB to Serial Converter” on the
Use the File menu to open the sample program PONG.C, which is in the Dynamic C
SAMPLES folder. Press function key F9 to compile and run the program. The STDIO
window will open on your PC and will display a small square bouncing around in a box. This program shows that the CPU is working. The sample program described in
Section 6.5, “Run the PINGME.C Sample Program,” tests the TCP/IP portion of the board.
2.3.1.2 Troubleshooting
If Dynamic C cannot find the target system (error message "No Rabbit Processor Detected."):
Check that the RCM3365/RCM3375 is powered correctly — the red CORE LED on the
Prototyping Board should be lit when the RCM3365/RCM3375 is mounted on the Prototyping Board and the AC adapter is plugged in
.
Check both ends of the programming cable to ensure that they are firmly plugged into the PC and the PROG connector, not the DIAG connector , is plugged in to the program­ming port on the RCM3365/RCM3375 with the marked (colored) edge of the program­ming cable towards pin 1 of the programming header.
Ensure that the RCM3365/RCM3375 module is firmly and correctly installed in its connectors on the Prototyping Board.
Dynamic C uses the COM port specified during installation. Select a different COM port within Dynamic C. From the Options menu, select Project Options, then select
Communications. Select another COM port from the lis t, the n cl ick OK. Press <Ctrl-Y> t o f o rce Dynamic C to r ecompil e the BI OS . I f Dynamic C still reports it is
unable to locate the target system, repeat the above steps until you locate the COM port used by the programming cable.
If Dynamic C appears to compile the BIOS successfully, but you then receive a communi­cation error message when you compile and load the 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 O ptions > 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 O ptions > Project Options > Communications menu. Choose a lower debug baud rate.
User’s Manual 15

2.3.2 Running Dynamic C via Ethernet Cables

The firmware needed to run RabbitSys has been preloaded on RCM3365 RabbitCore modules sold for use with Dynamic C RabbitSys. The software from the Dynamic C and the Dynamic C RabbitSys CDs must be installed on your PC. A system running RabbitSys can be connected to a DHCP network using straight-through Ethernet cables, or it can be connected directly to the PC via an Ethernet crossover cable.
If you are connecting to a network with a DHCP server, use a CAT 5/6 straight-through Ethernet cable to connect the PC or workstation to the network, and connect the Ethernet jack on the RCM3365 to the network using a second CAT 5/6 straight-through Ethernet cable.
If your PC or workstation is running a DHCP server, connect the CAT 5/6 Ethernet crossover cable from the PC or workstation directly to the Ethernet jack on the RCM3365. Follow the instructions below for a straight-through Ethernet cable.
TIP: It is recommended that you use one of the above options for a PC/workstation or
network with a DHCP server or the serial cable programming option when you are using the RCM3365 for the first time since these options are easier to set up and run.
If your PC/workstation does not have a DHCP server , you will have to enter the TCP/IP parameters into the RCM3365 module and on to the PC, notebook, or workstation. See Appendix E for more information on this option.
Using DHCP Network with Straight-Through Ethernet Cables
Enable separate instruction and data spaces and select “Compile program in RabbitSys user mode” from the Dynamic C Options > Project Options > Compiler menu.
Before you compile and run a program via the Ethernet for the first time via a DHCP net­work, you must run the rdiscover utility by double-clicking it on your PC desktop. Your PC must be connected to the same DHCP network as the RCM3365. The utility will open a window and list the MAC addresses for any RabbitSys boards connected to the network.
Select a board from the list to display additional information such as the board’s Internet address. This is the IP address to enter when you access the Dynamic C Options > Project
Options > Communications
menu to select “Use TCP/IP Connection.” You must also enter “32023” for the Control Port and the default login values of “admin” and “pass­word.”
2.3.2.1 Run a Sample Program
Use the File menu to open the sample program PONG.C, which is in the Dynamic C
SAMPLES folder. Press function key F9 to compile and run the program. The STDIO
window will open on your PC and will display a small square bouncing around in a box. This program shows that the CPU is working. The sample program described in
Section 6.5, “Run the PINGME.C Sample Program,” tests the TCP/IP portion of the board.
16 RabbitCore RCM3365/RCM3375
2.3.2.2 Troubleshooting
If the rdiscover utility could not find your RCM3365:
Check that your network has a DHCP server, and that the RCM3365 and your PC are connected to the same network.
If you compiled and ran a sample program with the RabbitSys project option disabled, you may have overwritten the RabbitSys binary file. Use the serial programming cable to connect programming header J1 on the RCM3365 to your PC COM port to reload the RabbitSys binary file via the Dynamic C Compile > Reload RabbitSys binary menu.
If the rdiscover utility could not find your RCM3365, and you were unable to reload the RabbitSys binary file, your RCM3365 does not have the firmware to support Dynamic C RabbitSys and cannot be used with Dynamic C RabbitSys.
If Dynamic C returns an error message, check that the RCM3365 is powered correctly. The red CORE LED on the Pr ototypi ng B oard s hould be lit when the RCM3365 is mounted on the Prototyping Board and the AC adapter is plugged in. Ensure that the RCM3365 mod­ule is firmly and correctly installed in its connectors on the Prototyping Board.

2.4 Where Do I Go From Here?

If the sample program ran fine, you are now ready to go on to other sample programs and to develop your own applications. The source code for the sample programs is provided to allow you to modify them for your own use. The RCM3365/RCM3375 User’s Manual also provides complete hardware reference information and describes the software func­tion calls for the RCM3365 and the RCM3375, the Prototyping Board, and the optional LCD/keypad module.
For advanced development topics, refer to the Dynami c C User’ s Ma nual, the Dynamic C RabbitSys User’s Manual, and the Dynamic C TCP/IP User’ s Manual, also in the online documentation set.

2.4.1 Technical Support

NOTE: If you purchased your RCM3365/RCM3375 through a distributor or thr ough a
Rabbit partner, contact the distributor or partner first for te c hnic al support.
User’s Manual 17
18 RabbitCore RCM3365/RCM3375

3. RUNNING SAMPLE PROGRAMS

To develop and debug programs for the RCM3365/RCM3375 (and for all other Rabbit hardware), you must install and use Dynamic C.

3.1 Introduction

To help familiarize you with the RCM3365 and RCM3375 modules, Dynamic C includes several sample programs. Loading, executing and studying these programs will give you a solid hands-on overview of the RCM3365/RCM3375’s capabilities, as well as a quick start using Dynamic C as an application development tool.
NOTE: The sample programs assume that you have at least an elementary g ras p of the C
programming language. If you do not, see the introductory pages of the Dynamic C User’s Manual for a suggested reading list.
More complete information on Dynamic C is provided in the Dynamic C User’s Manual. In order to run the sample programs discussed in this chapter and elsewhere in this manual,
1. Your RCM3365/RCM3375 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 RCM3365/RCM3375 module must be connected to your PC either through the serial programming cable or through an Ethernet cable/network if you have a RabbitSys-enabled RCM3365.
4. Power must be applied to the RCM3365/RCM3375 through the Prototyping Board.
Refer to Chapter 2, “Getting Started,” if you need further information on these steps. Since the RCM3365 and the RCM3375 run at 44.2 MHz and are equipped with a fast pro-
gram execution SRAM, remember to allow the compiler to run the application in the fast program execution SRAM by selecting Code and BIOS in Flash, Run in RAM from the Dynamic C Options > Project Options > Compiler menu.
To run a sample program, open it with the File menu, then press function key F9 to com­pile and run the program.
User’s Manual 19

3.2 Sample Programs

Of the many sample programs included with Dynamic C, several are specific to the RCM3365 and the RCM3375. Sample programs illustrating the general operation of the RCM3365/RCM3375, serial communication, and the NAND flash are provided in the
SAMPLES\RCM3360 folder. Each sample program has comments that describe the purpose
and function of the program. Follow the instructions at the beginning of the sample pro­gram. Note that the RCM3365/RCM3375 must be installed on the Prototyping Board when using the sample programs described in this chapter.
CONTROLLED.c—Demonstrates use of the digital inputs by having you turn the LEDs on the Prototyping Board on or off from the STDIO window on your PC.
Once you compile and run CONTROLLED.C, the following display will appear in the Dynamic C STDIO window.
Press “2” or “3” or “4”or “5”on your keyboard to select LED DS3 or DS4 or DS5 or DS6 on the Prototyping Board. Then follow the prompt in the Dynamic C STDIO win­dow to turn the LED on or off.
FLASHLED.c—Demonstrates assembly-language program by flashing the USR LED on the RCM3365/RCM3375 and LEDs DS3, DS4, DS5, and DS6 on the Prototyping Board.
SWRELAY.c—Demonstrates the relay-switching function call using the relay installed on the Prototyping Board through screw-terminal header J17.
TOGGLESWITCH.c—Uses costatements to detect switches S2 and S3 using debounc­ing. The corresponding LEDs (DS3 and DS4) will turn on or off.
Once you have loaded and executed these four programs and have an understanding of how Dynamic C and the RCM3365/RCM3375 modules interact, you can move on and try the other sample programs, or begin building your own.
20 RabbitCore RCM3365/RCM3375

3.2.1 Use of NAND Flash

The following sample programs can be found in the SAMPLES\RCM3360\NANDFlash folder. As you run most of these sample programs, you will be prompted in the Dynamic C dow to select either the
soldered-in NAND flash (RCM3365 model only) or the socketed
STDIO win-
xD-Picture Card (0 = soldered, 1 = socketed).
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 communi­cate 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 zer o) all the bytes in a specified pa ge, erase (s et to FF), or wri te to specifie d pages.
CAUTION: When you run this sample program, enabling the #define NFLASH_
CANERASEBADBLOCKS macro makes it possible to write t o bad bloc ks. The first two
blocks on the xD-Picture Card are mark ed bad to prot ec t the configuration data needed to use the card in a digital camera or a PC. You will only be able to use the xD-Picture Card in Rabbit-based systems if either of the first two blocks is written to.
NFLASH_LOG.c—This program runs a simple Web server and stores a log of hits in the NAND flash. As long as the xD-Picture Card is plugged in to its connector J6, this sample program will log hits to the xD-Picture Card. Remove the xD-Picture Card if you wish to log hits on the soldered-in NAND flash (RCM3365 model only).
This log can be viewed and cleared from a browser by connecting the RJ-45 jack on the RCM3365 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.
User’s Manual 21
Follow these instructions to set up your PC or notebook. Check with your administra­tor if you are unable to change the settings as described here since you may need administrator privileges. The instructions are specifically for Windows 2000, but the interface is similar for other versions of Windows.
TIP: If you are using a PC that is already on a network, you will disconnect the PC
from that network to run these sample programs. Write down the existing settings before changing them to facilitate restoring them when you are finished with the sample programs and reconnect your PC to the network.
1. Go to the control panel (Start > Settings > Control Panel), and then double-click the Network icon.
2. Select the network interface card used for the Ethernet interface you intend to use (e.g., TCP/IP Xircom Credit Card Network Adapter) and click on the “Proper­ties” button. Depending on which version of Windows your PC is running, you may have to select the “Local Area Connection” first, and then click on the “Propertie s” button to bring up the Ethernet interface dialog. Then “Configure” your interface card for a “10Base-T Half-Duplex” or an “Auto-Negotiation” connection on the “Advanced” tab.
NOTE: Your network interface card will likely have a different name.
3. Now select the IP Address tab, and check Specify an IP Address, or select TCP/IP and click on “Properties” to assign an IP address to your computer (this will disable “obtain an IP address automatically”):
IP Address : 10.10.6.101 Netmask : 255.255.255.0 Default gateway : 10.10.6.1
4. Click <OK> or <Close> to exit the various dialog boxes.
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.
22 RabbitCore RCM3365/RCM3375

3.2.2 Hot-Swapping xD-Picture Card

The sample programs in this section require that you have installed the Dynamic C FAT File System module, which is included with the RCM3365/RCM3375 Development Kit.
NOTE: Versions of the Dynamic C FAT File System prior to 2.10 did not use unique
volume labels, so hot-swapping two xD-Picture Card that were both formatted with older versions of the FAT File System may cause cache recovery errors
The following sample program can be found in the SAMPLES\RCM3360\NANDFlash folder. Since Rabbit-based systems do not implement the xD-Picture Car d™ specification for data storage, hot-swap only xD-Picture Cards that you plan to have formatted for use in Rabbit-based systems.
FAT_HOT_SWAP_3365_75.c—This program demonstrates how to hot-swap the xD- Picture Card on the RCM3365/RCM3375. Once you have compiled the sample
program and it is running, press switch SW3 on the Prototyping Board or press any keyboard key on your PC to signal your intent to do a hot-swap. Remove the xD- Picture Card and insert a new xD-Picture Card (or replace the original one) when prompted to do so in the Dynamic C STDIO window or when the green LED (DS4) on the Prototyping Board lights up. Do not remove the xD-Picture Card until you are prompted or signaled by the LED!
The the xD-Picture Card can only be hot-swapped when the xD-Picture Card is “unmounted.” This sample program “unmounts” the xD-Picture Card when it detects a keyboard hit or SW3 press. Then it waits for a new xD-Picture Card to be inserted.
The following sample program can be found in the SAMPLES\FileSystem\ folder.
FAT_HOT_SWAP.c—This program demonstrates how to hot-swap the xD-Picture Card on boards that support the xD-Picture Card and have their data bus buffered.
Once you have compiled the sample program and it is running, press any keyboard key on your PC to signal your intent to do a hot-swap. Remove the xD-Picture Card and insert a new xD-Picture Card (or replace the original one) when prompted to do so in the Dynamic C STDIO window. Do not remove the xD-Picture Card until you are prompted!
The xD-Picture Card can only be hot-swapped when the xD-Picture Card is “unmounted.” This sample program “unmounts” the xD-Picture Card when it detects a keyboard press. Then it waits for a new xD-Picture Card to be inserted.
User’s Manual 23

3.2.3 Serial Co mmunication

The following sample programs can be found in the SAMPLES\RCM3360\SERIAL folder.
FLOWCONTROL.C—This program demonstrates hardware flow control by configuring
Serial Port F for CTS /RTS with serial data coming from TxE (Ser ial P ort E) a t 115,200 bps. One character at a time is received and is displayed in the
STDIO window.
To set up the Prototyping Board, you will need to tie TxE and RxE together on the RS-232 header at J14, and you will also tie TxF and RxF together as shown in the diagram.
J14
TxE RxE GND TxF RxF 485+ GND 485
A repeating triangular pattern should print out in the
STDIO window . The program periodically switches R TS (TxF) flow control on or off to
demonstrate the effect of hardware flow control.
PARITY.C—This program demonstrates the use of parity modes by repeatedly sending byte values 0–127 from Serial Port E to Serial Port F. The program will switch between generating parity or not on Serial Port E. Serial Port F will always be checking parity, so parity errors should occur during every other sequence.
To set up the Prototyping Board, you will need to tie TxE and RxF together on the RS-232 header at J14 as shown in the diagram.
The Dynamic C STDIO window will display the error
J14
TxE RxE GND TxF RxF 485+ GND 485
sequence.
SIMPLE3WIRE.C—This program demonstrates basic RS-232 serial communication. Lower case characters are sent by TxE, and are received by RxF. The characters are converted to upper case and are sent out by TxF , are received by RxE, and are displayed in the Dynamic C STDIO window.
To set up the Prototyping Board, you will need to tie TxE and RxF together on the RS-232 header at J14, and you will also tie RxE and TxF together as shown in the diagram.
J14
TxE RxE GND TxF RxF 485+ GND 485
SIMPLE5WIRE.C—This program demonstrates 5-wire RS-232 serial communication by providing flow control (RTS/CTS) on Serial Port F and data flow on Serial Port E.
To set up the Prototyping Board, you will need to tie TxE and RxE together on the RS-232 header at J14, and you will also tie TxF and RxF together as shown in the diagram.
J14
TxE RxE GND TxF RxF 485+ GND 485
Once you have compiled and run this program, you can test flow control by disconnecting TxF from RxF while the program is running. Char­acters will no longer appear in the STDIO window, and will display again once TxF is connected back to RxF. (Do not disconnect the data path between TxE and RxE.)
24 RabbitCore RCM3365/RCM3375
Loading...
+ 134 hidden pages