Rabbit RabbitCore RCM4100 User Manual

RabbitCore RCM4100
C-Programmable Core Module
User’s Manual
019–0153 090508–G
RabbitCore RCM4100
Digi International Inc.
RabbitCore RCM4100 User’s Manual
Part Number 019-0153 • 090508–G • Printed in U .S.A.
©2006–2009 Digi International Inc. • All right s rese rved.
Digi International reserves the right to make changes and
improvements to its products without providing n otice.
T r ade mark s
Rabbit and Dynamic C are registered trademarks of Digi International Inc.
Rabbit 4000 and RabbitCore are trademarks of Digi International Inc.
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.
The latest revision of this manual is available on the Rabbit Web s ite, www.rabb it.com, for free, unregistered download.
User’s Manual
TABLE OF CONTENTS
Chapter 1. Introduction 1
1.1 RCM4100 Features...............................................................................................................................2
1.2 Advantages of the RCM4100 ...............................................................................................................4
1.3 Development and Evaluation Tools......................................................................................................5
1.3.1 RCM4110 Development Kit.........................................................................................................5
1.3.2 RCM4100 Analog Development Kit............................................................................................6
1.3.3 Software........................................................................................................................................6
1.3.4 Online Documentation..................................................................................................................6
Chapter 2. Getting Started 7
2.1 Install Dynamic C.................................................................................................................................7
2.2 Hardware Connections..........................................................................................................................8
2.2.1 Step 1 — Prepare the Prototyping Board for Development..........................................................8
2.2.2 Step 2 — Attach Module to Prototyping Board............................................................................9
2.2.3 Step 3 — Connect Programming Cable......................................................................................10
2.2.4 Step 4 — Connect Power............................................................................................................11
2.3 Run a Sample Program.......................................................................................................................12
2.3.1 Troubleshooting..........................................................................................................................12
2.4 Where Do I Go From Here? ...............................................................................................................13
2.4.1 Technical Support.......................................................................................................................13
Chapter 3. Running Sample Programs 15
3.1 Introduction.........................................................................................................................................15
3.2 Sample Programs................................................................................................................................16
3.2.1 Serial Communication.................................................................................................................18
3.2.2 A/D Converter Inputs (RCM4100 only).....................................................................................21
3.2.2.1 Downloading and Uploading Calibration Constants.......................................................... 22
3.2.3 Real-Time Clock.........................................................................................................................24
Chapter 4. Hardware Reference 25
4.1 RCM4100 Digital Inputs and Outputs................................................................................................26
4.1.1 Memory I/O Interface.................................................................................................................32
4.1.2 Other Inputs and Outputs............................................................................................................32
4.2 Serial Communication ........................................................................................................................33
4.2.1 Serial Ports..................................................................................................................................33
4.2.1.1 Using the Serial Ports......................................................................................................... 34
4.2.2 Programming Port.......................................................................................................................35
4.3 Programming Cable............................................................................................................................36
4.3.1 Changing Between Program Mode and Run Mode....................................................................36
4.3.2 Standalone Operation of the RCM4100......................................................................................37
4.4 A/D Converter (RCM4100 only)........................................................................................................38
4.4.1 A/D Converter Power Supply.....................................................................................................40
RabbitCore RCM4100
4.5 Other Hardware..................................................................................................................................41
4.5.1 Clock Doubler ............................................................................................................................41
4.5.2 Spectrum Spreader......................................................................................................................41
4.6 Memory..............................................................................................................................................42
4.6.1 SRAM.........................................................................................................................................42
4.6.2 Flash EPROM.............................................................................................................................42
Chapter 5. Software Reference 43
5.1 More About Dynamic C .....................................................................................................................43
5.2 Dynamic C Function Calls................................................................................................................45
5.2.1 Digital I/O...................................................................................................................................45
5.2.2 Serial Communication Drivers...................................................................................................45
5.2.3 SRAM Use..................................................................................................................................45
5.2.4 Prototyping Board Function Calls..............................................................................................47
5.2.4.1 Board Initialization............................................................................................................ 47
5.2.4.2 Alerts.................................................................................................................................. 48
5.2.5 Analog Inputs (RCM4100 only).................................................................................................49
5.3 Upgrading Dynamic C .......................................................................................................................66
5.3.1 Add-On Modules........................................................................................................................66
Appendix A. RCM4100 Specifications 67
A.1 Electrical and Mechanical Characteristics ........................................................................................68
A.1.1 A/D Converter...........................................................................................................................72
A.1.2 Headers......................................................................................................................................73
A.2 Rabbit 4000 DC Characteristics........................................................................................................74
A.3 I/O Buffer Sourcing and Sinking Limit.............................................................................................75
A.4 Bus Loading ......................................................................................................................................75
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
B.3 Power Supply.....................................................................................................................................86
B.4 Using the Prototyping Board.............................................................................................................87
B.4.1 Adding Other Components........................................................................................................89
B.4.2 Measuring Current Draw...........................................................................................................89
B.4.3 Analog Features (RCM4100 only)............................................................................................90
B.4.3.1 A/D Converter Inputs........................................................................................................ 90
B.4.3.2 Thermistor Input............................................................................................................... 92
B.4.3.3 A/D Converter Calibration................................................................................................ 92
B.4.4 Serial Communication...............................................................................................................93
B.4.4.1 RS-232 .............................................................................................................................. 94
B.5 Prototyping Board Jumper Configurations........................................................................................95
Appendix C. Power Supply 99
C.1 Power Supplies..................................................................................................................................99
C.1.1 Battery Backup ..........................................................................................................................99
C.1.2 Battery-Backup Circuit............................................................................................................100
C.1.3 Reset Generator........................................................................................................................100
Index 103
Schematics 107
User’s Manual 1
1. INTRODUCTION
The RCM4100 series is the first of the next-generation core modules that take advantage of new Rabbit
®
4000 features such as hardware DMA, clock speeds of up to 60 MHz, I/O lines shared with up to six serial ports and four levels of alternate pin functions that include variable-phase PWM, auxiliary I/O, quadrature decoder, and input capture. Coupled with more than 500 new opcode instructions that help to reduce code size and improve processing sp eed, this equates to a co re module that i s fast, efficient, and the ideal solution for a wide range of embed­ded applications.
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 Develop­ment Kit also contains a Prototyping Board that will al low you to evaluate the RCM4100 series and to prototype circuits that interface to the RCM4100 series of modules. You will also be able to write and test software for these modules.
Throughout this manual, the term RCM4100 series refers to the complete series of RCM4100 RabbitCore modules unless other production models are referred to specifically.
The RCM4100 has a Rabbit 4000 microprocessor operating at up to 58.98 MHz, static RAM, flash memory, an 8-channel A/D converter, two clocks (main oscillator and time­keeping), 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, and serial ports.
The RCM4100 series receives its +3.3 V power from the customer-supplied motherboard on which it is mounted. The RCM4100 series can interface with all kinds of CMOS­compatible digital devices through the motherboard.
2 RabbitCore RCM4100
1.1 RCM4100 Features
Small size: 1.41" × 1.88" × 0.49" (36 mm × 48 mm × 12 mm)
Microprocessor: Rabbit 4000 running
at up to 58.98 MHz
Up to 40 general-purpose I/O lines configurable with up to four alternate functions
3.3 V I/O lines with low-pow er mo des dow n to 2 kH z
Six CMOS-compatible serial ports — f
our ports are configurable as a clocked serial port
(SPI), and two ports are configurable as SDLC/HDLC serial ports.
Alternate I/O bus can be configured for 8 data lines and 6 address lines (shared with parallel I/O lines), I/O read/write
512K flash memory, 256K data SRAM
Real-time clock
Watchdog supervisor
User’s Manual 3
There are three RCM4100 production models. Table 1 summarizes their main features.
The RCM4100 series is programmed ove r a stand ard PC US B port t hrough a p rogra mming cable supplied with the Development Kit.
NOTE: The RabbitLink cannot be used to program RabbitCore modules based on the
Rabbit 4000 microprocessor.
Appendix A provides detailed specifications for the RCM4100 series.
Table 1. RCM4100 Features
Feature RCM4100 RCM4110 RCM4120
Microprocessor
Rabbit
®
4000
at 58.98 MHz
Rabbit® 4000 at 29.49 MHz
Rabbit® 4000
at 58.98 MHz Flash Memory 512K Data SRAM 512K 256K 512K Fast Program-Execution
SRAM
512K 512K
A/D Converter 12 bits
Serial Ports
6 high-speed, CMOS­compatible ports:
all 6 configurable as
asynchronous (with IrDA), 4 as clocked serial (SPI), and 2 as SDLC/HDLC
1 asynchronous
clocked serial port shared with program­ming port
1 clocked serial port
shared with A/D con­verter
6 high-speed, CMOS-compatible ports:
all 6 configurable as asynchronous (with IrDA),
4 as clocked serial (SPI), and 2 as SDLC/HDLC
1 asynchronous clocked serial port shar ed wit h
programming port
4 RabbitCore RCM4100
1.2 Advantages of the RCM4100
Fast time to market using a fully engineered, “ready-to-run/ready-to-program” micro­processor core.
Competitive pricing when co mpare d with the alte rnati v e of purcha sing a nd asse mbli ng individual components.
Easy C-language program development and debugging
Rabbit Field Utility to download compiled Dynamic C .bin files, and cloning board
options for rapid production loading of programs.
Generous memory size allows large programs with tens of thousands of lines of code, and substantial data storage.
User’s Manual 5
1.3 Development and Evaluation Tools
1.3.1 RCM4110 Development Kit
The RCM4110 Development Kit contains the hardware essentials you will need to use your RCM4110 module. The items in the Development Kit and their use are as follows.
RCM4110 module.
Prototyping Board.
Universal AC adapter, 12 V DC, 1 A (includes Canada/Japan/U.S., Australia/N.Z.,
U.K., and European style plugs). Development Kits sold in North America ma y contain an AC adapter with only a North American style plug.
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.
Figure 1. RCM4110 Development Kit
Rabbit and Dynamic C are registered trademarks of Rabbit Semiconductor Inc.
RabbitCore RCM4110
The RCM4110 RabbitCore module features 16-bit memory, allowing you to create a low-cost, low-power, control solution for your embedded application. These Getting Started instructions included with the Devel­opment Kit will help you get your RCM4100 up and running so that you can run the sample programs to explore its capabilities and develop your own applications.
Development Kit Contents
The RCM4110 Development Kit contains the following items:
RCM4110 module.
Prototyping Board.
Universal AC adapter, 12 V DC, 1 A (includes Canada/Japan/U.S., Australia/N.Z., U.K., and European
style plugs). Development Kits sold in North America may contain an AC adapter with only a North American style plug.
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.
Plastic and metal standoffs with 4-40 screws and washers.
A bag of accessory parts for use on the Prototyping
Board.
Rabbit 4000 Processor Easy Reference poster.
Registration card.
Visit our online Rabbit store at www.rabbit.com/store/ for the latest information on peripherals and accessories that are available for all RCM4100 RabbitCore module models.
Installing Dynamic C
®
Insert the CD from the Development Kit in your PC’s CD-ROM drive. If the installation does not auto-start, run the setup.exe pro- gram in the root directory of the Dynamic C CD. Install any Dynamic C modules after you install Dynamic C
.
Getting Started
Instructions
Prototyping Board
Accessory Parts for
Prototyping Board
Serial Cable
Programming
Cable
D
1
R 1
PWR
DS1
GND
J1
U1
C1
GND
C2
J
P
1
C
3
D
2
J
P
2
C
4
+
3
.
3
V
J2
R
2
BT1
1
S1
RESET
R
X
D
T
X
D
T
X
C
R
X
C
G
N
D
J
4
U
X
2
9
RX81
R
X
8
7
C
X
4
1
RX83
RX11
C
X
3
9
UX30
UX10
UX12
UX14
UX16
RX79
C
X
2
9
C
X
1
7
RX67
U
X
4
5
R
X
8
5
GND
GND
GND
1
R24
R22
R21
R23
CX23
RX77
1
R
2
7 R
2
8
JP25
CX25
RX75
RX73
CX27
DS3
S3S2
DS2
J3
UX49
UX4
UX47
+5 V
GND
+3.3 V
RCM1
U
2
/RST_OUT
/IOWR VBAT EXT
PA1
PA3
PA5
PA7
PB1
PB3
PB5
PB7
PC1
PC3
PC5
PC7
PE1
PE3
PE5
PE7
PD1
LN1 PD3 LN3
PD5
LN5 PD7 LN7
VREF
GND
/IORD
/RST_IN
PA0
PA2
PA4
PA6
PB0
PB2
PB4
PB6
PC0
PC2
PC4
PC6
PE0
PE2
PE4
PE6
PD0
LN0
PD2
LN2
PD4
LN4
PD6
LN6
CVT
AGND
J
P
2
4
J
P
2
3
C
1
4
C
1
2
C
1
0
C8C7C
9
C
1
1
C
1
3
R10
R8R6R4R3R5R
7
R20
R
1
8
R
1
6
R
1
4
R
1
3
R
1
5
R
1
7
R29
J
P
1
1
J
P
1
5
J
P
1
9
J
P
2
1
J
P
2
2
J
P
2
0
J
P
1
7
J
P
1
3
R19
R9
RX57
RX55
RX97
RX49
U
X
3
3
U
X
3
1
R
X
8
9
UX3
U
X
3
7
U
X
4
2
U
X
4
1
R
X
6
3
R
X
6
5
R
X
6
1
RX59
R
2
6
R25
Q1
C15
C
1
9
C
2
0
U3
C18
C
1
7
JP16 JP6
JP5
JP12
JP4
JP3
JP14
JP8
JP7 JP18 JP9
JP10
C16
L1
C6
C5
A
G
N
D
C
V
T
L
N
6
I
N
L
N
4
I
N
L
N
2
I
N
L
N
0
I
N
V
R
E
F
L
N
7
I
N
L
N
5
I
N
L
N
3
I
N
L
N
1
I
N
A
G
N
D
A
G
N
D
R
1
1
R
1
2
R
X
4
7
RX43
Universal
AC Adapter
with Plugs
C20
L1
C21
R5 R6 R7
R8
R9 R10 R11
R12
R13
C9 C10 C11 C12
C13
C14 C15 C16
RP1
JP6
JP5
R
20
JP4
C3
U4
TP2
J1
R38
R2
R1
U1
C8
C1
U2
C5
C4
R3
U3
R37 R21
U5
C17 C18 C52
C56
R23
R22
U6
JP3
R
41
C6C7R4
U9
C53
1
40
41
80
PROG
DIAG
6 RabbitCore RCM4100
1.3.2 RCM4100 Analog Development Kit
The RCM4100 Analog Development Kit contains the hardware essentials you will need to use the RCM4100 module. The RCM4100 Analog Development Kit contents are similar to those of the RCM4110 Development Kit, except that the RCM4100 module is included instead of the RCM4110 module.
1.3.3 Software
The RCM4100 series is programmed using version 10.01 or later of Dynamic C.
A compat-
ible version is included on the Developm ent Kit CD-RO M .
Starting with Dynamic C version 10.40, Dynamic C includes the popular µC/OS-II real­time operating system, point-to-point protocol (PPP), FAT file system, RabbitWeb, and other select libraries. Rabbit also offers for purchase the Rabbit Embedded Security Pack featuring the Secure Sockets Layer (SSL) and a specific Advanced Encryption Standard (AES) library.
In addition to the Web-based technical support included at no extra charge, a one-year telephone-based technical support module is also available for purchase. Visit our Web site at www.rabbit.com or contact your Rabbit sales representative or authorized distribu- tor for further information.
1.3.4 Online Documentation
The online documentation is installed along with Dynamic C, and an icon for the docu­mentation menu is placed on the workstation’s desktop. Double-click this icon to reach the menu. If the icon is missing, use your browser to find and load
default.htm in the docs
folder, found in the Dynamic C installation folder. The latest versions of all documents are always available for free, unregistered download
from our Web sites as well.
User’s Manual 7
2. GETTING S TARTED
This chapter de scribes the RC M4100 series in more detail, an d explains how to set up and use the accompanying Prototyping Board.
NOTE: This chapter (and thi s manual) assume that you have t he RCM4100 Development
Kit. If you purchased an RCM4100 module by itself, you will have to adapt the infor­mation in this chapter and elsewhere to your test and development setup.
2.1 Install Dynamic C
To develop and debug programs for the RCM4100 series (and for all other Rabbit hard­ware), you must install and use Dynamic C.
If you have not yet installed Dynamic C version 10.01 (or a later version), do so now by inserting the Dynamic C CD from the RCM4100 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 c ommunica te with the tar get developme nt syste m. 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 nother device (mouse, modem, etc.) may lead to a message such as "could not open serial port" when Dynamic C is started.
Once your installation is complete, you will have up to three new icons on your PC desk­top. 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.
8 RabbitCore RCM4100
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 RCM4100 module to the Prototyping Board.
3. Connect the programming cable between the RCM4100 and the PC.
4. Connect the power supply to the Prototyping Board.
2.2.1 Step 1 — Prepare the Prototyping Board for Development
Snap in four of the plastic standoffs supplied in the bag of accessory parts from the Devel­opment Kit in the holes at the corners as shown.
Figure 2. Insert Standoffs
D
1
R
1
PWR
DS1
GND
J1
U1
C1
GND
C2
JP
1
C
3
D
2
JP
2
C
4
+
3.3 V
J2
R
2
BT1
1
S1
RESET
R
XD
TX
D
TX
C
R
XC
G
N
D
J4
UX
29
RX81
R
X
87
C
X41
RX83
RX11
C
X
39
UX30
UX10
UX12
UX14
UX16
RX79
C
X
29
C
X17
RX67
U
X45
RX
85
GND
GND
GND
1
R24
R22
R21
R23
CX23
RX77
1
R27R
28
JP25
CX25
RX75
RX73
CX27
DS3
S3S2
DS2
J3
UX49
UX4
UX47
+5 V
GND
+3.3 V
RCM1
U
2
/RST_OUT
/IOWR
VBAT EXT
PA1
PA3
PA5
PA7
PB1
PB3
PB5
PB7
PC1
PC3
PC5
PC7
PE1
PE3
PE5
PE7
PD1
LN1
PD3
LN3 PD5 LN5
PD7 LN7
VREF
GND
/IORD
/RST_IN
PA0
PA2
PA4
PA6
PB0
PB2
PB4
PB6
PC0
PC2
PC4
PC6
PE0
PE2
PE4
PE6
PD0
LN0
PD2 LN2 PD4
LN4
PD6
LN6
CVT
AGND
JP24JP
23
C14C12C
10
C8C7C
9
C
11
C
13
R10
R8R6R4R3R5R
7
R20
R18R16R14R13R15R
17
R29
JP11JP15JP19JP21JP22
JP20
JP17
JP
13
R19
R9
RX57
RX55
RX97
RX49
U
X33U
X
31
R
X
89
UX3
U
X
37
U
X
42
U
X
41
R
X
63
R
X
65
R
X
61
RX59
R
26
R25
Q1
C15
C
19
C
20
U3
C18
C
17
JP16 JP6
JP5
JP12
JP4
JP3
JP14
JP8 JP7
JP18
JP9
JP10
C16
L1
C6
C5
AG
N
D
C
V
T
LN
6INLN4INLN2INLN0IN
V
R
E
F
LN
7INLN5INLN3INLN1IN
A
G
N
D
A
G
N
D
R
11
R
12
R
X
47
RX43
User’s Manual 9
2.2.2 Step 2 — Attach Module to Prototyping Board
Turn the RCM4100 module so that the mounting holes line up with the corresponding holes on the Prototyping Board. Insert the m et al st an d offs as shown, secure them from the bottom using two screws and washers, then insert the module’s header J2 on the bottom side into socket RCM1 on the Prototyping Board.
Figure 3. Install the Module on the Prototyping Board
NOTE: It is important that you line up the pins on header J2 of the module exactly with
socket RCM1 on the Pr ototyp ing Boa rd. The header pins may bec ome b ent or da maged if the pin alignment is offset, and the module will not work. Permanent electrical dam­age to the module may also result if a misaligned module is powered up.
Press the module’s pins gently into the Prototyping Board socket—press down in the area above the header pins. For additional integrity, you may secure the RCM4100 to the stand­offs from the top using the remaining two screws and washers.
D1
R1
PWR
DS1
GND
J1
U1
C1
GND
C2
JP1
C3
D2
JP2
C4
+3.3 V
J2
R2
BT1
1
S1 RESET
RXD TXD
TXC RXC
GND
J4
UX29
RX81
RX87
CX41
RX83
RX11
CX39
UX30
UX10
UX12
UX14
UX16
RX79
CX29
CX17
RX67
UX45
RX85
GND
GND
GND
1
R24
R22
R21
R23
CX23
RX77
1
R27
R28
JP25
CX25
RX75
RX73
CX27
DS3
S3S2
DS2
J3
UX49
UX4
UX47
+5 V
GND
+3.3 V
RCM1
U2
/RST_OUT
/IOWR
VBAT
EXT
PA1
PA3
PA5
PA7
PB1
PB3
PB5
PB7
PC1
PC3
PC5
PC7
PE1
PE3
PE5
PE7
PD1 LN1
PD3 LN3
PD5 LN5
PD7 LN7
VREF
GND
/IORD
/RST_IN
PA0
PA2
PA4
PA6
PB0
PB2
PB4
PB6
PC0
PC2
PC4
PC6
PE0
PE2
PE4
PE6
PD0 LN0
PD2 LN2
PD4 LN4
PD6 LN6
CVT
AGND
JP24
JP23
C14
C12
C10
C8C7C9
C11
C13
R10
R8R6R4R3R5
R7
R20
R18
R16
R14
R13
R15
R17
R29
JP11
JP15
JP19
JP21
JP22
JP20
JP17
JP13
R19
R9
RX57
RX55
RX97
RX49
UX33UX31
RX89
UX3
UX37 UX42
UX41
RX63
RX65
RX61
RX59
R26
R25
Q1
C15
C19 C20
U3
C18
C17
JP16
JP6 JP5
JP12
JP4 JP3
JP14
JP8 JP7
JP18
JP9
JP10
C16
L1
C6
C5
AGND
CVT
LN6IN
LN4IN
LN2IN
LN0IN
VREF
LN7IN
LN5IN
LN3IN
LN1IN
AGND
AGND
R11
R12
RX47
RX43
RCM4100
RCM1
R1
J1
R2
R5
R4
R3
JP1
JP2
JP9
JP6
JP7
JP3
JP5
JP4
C4
C3
C2
L1
C1
R7
R8
R6
R10
R9
U1
U2
R11
C15
RP2
C16 C17
D1
R27
RP1
R15
C23
R17
R16
C21
C14
U6
R19
R18
R22
R23
Y2
C27
U7
C28
R21
JP8
JP10
JP11
JP12
C5
Y1
Q1
C6 C7
C8
C9
C10 C11
U5
C12
C13
R12
C24
R14
C25 C26
C19 C20
U4
U3
C18
R13
C30 C31
C34 C35
C32
C33
C29
C38 C39
C37
C36
Line up mounting holes with holes on Prototyping Board.
Insert standoffs between mounting holes and Prototyping Board.
10 RabbitCore RCM4100
2.2.3 Step 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 RCM4100 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.)
Figure 4. Connect Programming Cable and Power Supply
NOTE: Never disconnect the programming cable by pulling on the ribbon cable.
Carefully pull on the connector to remove it from the header.
NOTE: Either a serial or a USB programmin g cab le was su pplie d with th is Developmen t
Kit. If you have a serial programming cable, an RS-232/USB converter (Rabbit Part No. 20-151-0178) is available to allow you to use the serial programming cable with a USB port.
Depending on the programming cable, connect the other end to a COM port or a USB port on your PC.
D1
R1
PWR
DS1
GND
J1
U1
C1
GND
C2
JP1
C3
D2
JP2
C4
+3.3 V
J2
R2
BT1
1
S1 RESET
RXD TXD
TXC RXC
GND
J4
UX29
RX81
RX87
CX41
RX83
RX11
CX39
UX30
UX10
UX12
UX14
UX16
RX79
CX29
CX17
RX67
UX45
RX85
GND
GND
GND
1
R24
R22
R21
R23
CX23
RX77
1
R27
R28
JP25
CX25
RX75
RX73
CX27
DS3
S3S2
DS2
J3
UX49
UX4
UX47
+5 V
GND
+3.3 V
RCM1
U2
/RST_OUT
/IOWR
VBAT
EXT
PA1
PA3
PA5
PA7
PB1
PB3
PB5
PB7
PC1
PC3
PC5
PC7
PE1
PE3
PE5
PE7
PD1 LN1
PD3 LN3
PD5 LN5
PD7 LN7
VREF
GND
/IORD
/RST_IN
PA0
PA2
PA4
PA6
PB0
PB2
PB4
PB6
PC0
PC2
PC4
PC6
PE0
PE2
PE4
PE6
PD0 LN0
PD2 LN2
PD4 LN4
PD6 LN6
CVT
AGND
JP24
JP23
C14
C12
C10
C8C7C9
C11
C13
R10
R8R6R4R3R5
R7
R20
R18
R16
R14
R13
R15
R17
R29
JP11
JP15
JP19
JP21
JP22
JP20
JP17
JP13
R19
R9
RX57
RX55
RX97
RX49
UX33UX31
RX89
UX3
UX37 UX42
UX41
RX63
RX65
RX61
RX59
R26
R25
Q1
C15
C19 C20
U3
C18
C17
JP16
JP6 JP5
JP12
JP4 JP3
JP14
JP8 JP7
JP18
JP9
JP10
C16
L1
C6
C5
AGND
CVT
LN6IN
LN4IN
LN2IN
LN0IN
VREF
LN7IN
LN5IN
LN3IN
LN1IN
AGND
AGND
R11
R12
RX47
RX43
R1
J1
R2
R5
R4
R3
JP1
JP2
JP9
JP6
JP7
JP3
JP5
JP4
C4
C3
C2
L1
C1
R7
R8
R6
R10
R9
U1
U2
R11
C15
RP2
C16 C17
D1
R27
RP1
R15
C23
R17
R16
C21
C14
U6
R19
R18
R22
R23
Y2
C27
U7
C28
R21
JP8
JP10
JP11
JP12
C5
Y1
Q1
C6 C7
C8
C9
C10 C11
U5
C12
C13
R12
C24
R14
C25 C26
C19 C20
U4
U3
C18
R13
C30
C31
C34 C35
C32
C33
C29
C38
C39
C37
C36
RESET
AC Adapter
Remove slot cover, insert tab into slot
Snap plug into place
2
1
Assemble
AC Adapter
3-pin
power connector
J1
Colored
edge
To
PC COM port
or USB port
PROG
DIAG
Programming
Cable
PROG
J1
User’s Manual 11
If you are using a USB programming cable, your PC should recognize the new USB hard­ware, and the LEDs in the shrink-wrapped area of the programming cable will flash — if you get an error message, you will have to install USB drivers. Drivers for Windows XP are available in the Dynamic C Drivers\Rabbit USB Programming Cable\
WinXP_2K
folder — double-click DPInst.exe to install the USB drivers. Drivers for
other operating systems are available online at www.ftdichip.com/Drivers/VCP .htm.
2.2.4 Step 4 — Connect Power
Once all the other connections have been made, you can connect power to the Prototyping Board.
If you have the universal AC adapter , prepare the AC adapter for the country where it will be used by selecting the appropriate plug. Insert the top of the plug assembly into the slot at the top of the AC adapter as shown in Figure 4, then press down on the plug until it clicks into place.
Connect the AC adapter to 3-pin header J1 on the Prototyping Board as shown in Figure 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 con­nector at J1 should light up. The RCM4100 and the Prototyping Board are now ready to be used.
NOTE: A RESET button is provided on the Pro totyping Boar d next to t he batter y holder
to allow a hardware reset without disconnecting power.
To power down the Prototyping Board, unplug the power connector from J1. You should disconnect power before making any circuit adjustments in the prototyping area, changing any connections to the board, or removing the RCM4100 from the Prototyping Board.
12 RabbitCore RCM4100
2.3 Run a Sample Program
Once the RCM4100/RCM4110 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. If you are using a USB port to connect your computer to the RCM4100/RCM4110, click
on the “Communications” tab and verify that
Use USB to Serial Converter is selected to
support the USB programming cable. Click
OK. You may have to determine which COM
port was assigned to the RS-232/USB converter. Open
Control Panel > System > Hard-
ware > Device Manager > Ports
and identify which COM port is used for the USB con-
nection. In Dynamic C, select
Options > Project Options, then select this COM port on
the
Communications tab, then click OK. You may type the COM port number followed by
Enter on your computer keyboard if the COM port number is outside the range on the drop-
down menu. Now find the file PONG.C, which is in the Dynamic C SAMPLES folder. To run the pro-
gram, open it with the
File menu, compile it usin g the Compile menu, and then run it by
selecting
Run in the Run menu. The STDIO window will open on your PC and will dis-
play a small square bouncing around in a box.
2.3.1 Troubleshooting
If Dynamic C appears to compile the BIOS successfully, but you then receive a communi­cation error message when you compile and load a sample program, it is possible that your PC cannot handle the higher program-loading baud rate. Try changing the maximum download rate to a slower baud rate as follows.
Locate the Serial Options dialog 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 sys­tem 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 header on the RCM4100 wi th the marked (colored) edge of the programming cable tow ards pin 1 of the programming header . 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 as explained for the USB port above. Press <Ctrl-Y> to force Dynamic C to r ecom pile the BIOS. If Dy n a mic C still reports it is unable to locate the target sys tem, repeat the above steps for another av ail able C OM po rt. You should receive a
Bios compiled success-
fully
message once this step is completed successfully.
User’s Manual 13
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 the RCM4100 User’s Manual (click the documentation icon on your PC) and to develop your own applications. The sa mple prog rams
can be easily modified for your own use. The user's
manual also provides complete hardware reference infor mation and software funct ion calls for the RCM4100 and the Prototyping Board.
For advanced development topics, refer to the Dynamic C User’s Manual, also in the online documentation set, which is on the Dynamic C CD in a docs folder..
2.4.1 Technical Support
NOTE: If you purchased your RCM4100 t hrough a di strib utor or thr ough a Rabbi t partn er,
contact the distrib utor or partner first for tec hnical support.
If there are any problems at this point:
Use the Dynamic C
Help menu to get further assistance with Dynamic C.
Check the Rabbit Technical Bulletin Board and forums at www.rabbit.com/support/bb/ and at www.rabbit.com/forums/.
Use the Technical Support e-mail form at www.rabbit.com/support/.
14 RabbitCore RCM4100
User’s Manual 15
3. RUNNING SAMPLE PROGRAMS
To develop and debug programs for the RCM4100 series (and for all other Rabbit hardware), you must install and use Dynamic C. This chapter provides a tour of its major features with respect to the RCM4100 series.
3.1 Introduction
T o help familiarize you with the RCM4100 series of modules, Dynamic C includes several sample programs. Loading, executing and studying these programs will give you a solid hands-on overview of the RCM4100 series’ capabilities, as well as a quick start with Dynamic C as an application development tool.
NOTE:
The sample progr ams assum e that you ha ve at lea st an e lemen tary gr asp of A NSI C.
If you do not, see the introductory pages of the Dynamic C User’s Manual for a sug- gested reading list.
In order to run the sample programs discussed in this chapter and elsewhere in this manual,
1. Your module must be plugged in to the Prototyping Board as described in Chapter 2, “Getting Started.”
2. Dynamic C must be installed and running on your PC.
3. The programming cable must connect the programming header on the module to your PC.
4. Power must be applied to the module through the Prototyping Board.
Refer to Chapter 2, “Getting Started,” if you need further information on these steps. To run a sample program, open it with the
File menu (if it is not still open), then compile
and run it by pressing F9. Each sample program has comments that describe the purpose and function of the 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.
16 RabbitCore RCM4100
3.2 Sample Programs
Of the many sample programs included with Dynamic C, several are specific to the RCM4100 series of modules. These programs will be found in the SAMPLES\RCM4100 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.
User’s Manual 17
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 low­est 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 flash­ing 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 Prototyp­ing Board.
You may press switch S2 again and repeat the last steps to watch the LEDs.
TOGGLESWITCH.C—demonstrates the use of costatements to detect switch presses
using the press-and-release method of debouncing. LEDs DS2 and DS3 on the Proto­typing Board are turned on and off when you press switches S2 and S3. S2 and S3 are controlled by PB4 and PB5 respectively.
Once you have loaded and executed these five programs and have an understanding of how Dynamic C and the RCM4100 series of modules interact, you can move on and try the other sample programs, or begin building your own.
18 RabbitCore RCM4100
3.2.1 Serial Communication
The following sample programs are found in the SAMPLES\RCM4100\SERIAL folder.
FLOWCONTROL.C—This program demonstrates how to configure Serial Port D for
CTS/RTS with serial data coming from Serial Port C (TxC) at 115,200 bps. The serial data received are displayed in the
STDIO window.
To set up the Prototyping Board, you will need to tie TxD and RxD together on the RS-232 header at J4, and you will also tie TxC and RxC together using the jumpers supplied in the Development Kit as shown in the diagram.
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 fec t of no flow control.
If you have two Prototyping Boards with modules, run this sample program on the sending board, then disconnect the programming cable and reset the sending board so that the module is operating in the Run mode. Connect TxC, TxD, and GND on the sending board to RxC, RxD, and GND on the other board, then, with the programming cable attached to the other module, run the sample program.
PARITY.C—This program demonstrates the use of parity modes by
repeatedly sending byte values 0–127 from Serial Port C to Serial Port D. The program will switch between generating parity or not on Serial Port C. Serial Port D will always be checking parity, so parity errors should occur during every other sequence.
To set up the Prototyping Board, you will need to tie TxC and RxD together on the RS-232 header at J4 using one of the jumpers supplied in the Development Kit as shown in the diagram.
The Dynamic C STDIO window will display the error sequence.
SERDMA.C—This program demonstrates using DMA to transfer data from the circular
buffer to the serial port and vice versa. The Dynamic C STDIO window is used to view or clear the buffer.
Before you compile and run the sample program, you will need to connect the RS-232 header at J4 to your PC as shown in the diagram using the serial to DB9 cable supplied in the Development Kit.
Once you have compiled and run the sample program,
start Tera Term or another terminal emulation program to connect to th e PC serial port using a baud rate of 115,200 bps. You can observe the output in the
Dynamic C STDIO window as you type in Tera Term, and you can also use the Dynamic C
STDIO window to clear the buffer.
The Tera Term serial utility can be downloaded from
hp.vector.co.jp/authors/VA002416/teraterm.html.
J4
RxC TxC
GND
TxD RxD
J4
RxC
RxD GND
TxD
TxC
J4
RxC
TxC
GND
TxD
RxD
Colored
edge
User’s Manual 19
SIMPLE3WIRE.C—This program demonstrates basic RS-232 serial communication. Lower case characters are sent by TxC, and are received by RxD. The characters are converted to upper case and are sent out by TxD, are received by RxC, and are displayed in the Dynamic C STDIO window.
To set up the Prototyping Board, you will need to tie TxD and RxC together on the RS-232 header at J4, and you will also tie RxD and TxC together using the jumpers supplied in the Development Kit as shown in the diagram.
SIMPLE5WIRE.C—This program demonstrates 5-wire RS-232 serial communication
with flow control on Serial Port D and data flow on Serial Port C. To set up the Prototyping Board, you will need to tie TxD and RxD
together on the RS-232 header at J4, and you will also tie TxC and RxC together using the jumpers supplied in the Development Kit as 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.
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.
J4
RxC TxC
GND
TxD RxD
J4
RxC TxC
GND
TxD RxD
J4
RxC TxC
GND
TxD RxD
20 RabbitCore RCM4100
IOCONFIG_SWITCHECHO.C—This program demonstrates how to set up Serial Ports E and F, which then transmit and then receive an ASCII string when switch S2 or S3 is pressed. The echoed serial data are displayed in the Dynamic C
STDIO window.
Note that the I/O lines that carry the Serial Port E and F signals are not the Rabbit 4000 defaults. The Serial Port E and F I/O lines are configured by calling the library function
serEFconfig() that was ge nerated by the Ra bbit 4000 IOCONFIG.EXE utility program.
Serial Port E is configured to use Parallel Port E bits PE6 and PE7. These signals are available on the Prototyping Board's Module Extension Header (header J2).
Serial Port F is configured to use Parallel Port C bits PC2 and PC3. These signals are available on the Prototyping Board's RS-232 connector (header J4).
Serial Port D is left in its default configuration, using Parallel Port C bits PC0 and PC1. These signals are available on the Prototyping Board's RS-232 connector (header J4). Serial Port D transmits and then receives an ASCII string with Serial Port F when switch S3 is pressed.
Also note that there are two libraries generated by IOCONFIG.EXE in the Dynamic C
SAMPLES\RCM4100\SERIAL folder for the 29 MHz RCM4110 and the 58 MHz
RCM4100 and RCM4120. T o set up the Prototypi ng Board, you will need to tie TxD
and RxC together on the RS-232 header at J4 using the jumpers supplied in the Development Kit; you will also tie TxE (PD6) and RxE (PD7) together with a soldered wire or with a wire jumper if you have soldered in the IDC header supplied with the accessory parts in the Development Kit.
Once you have compiled and run this program, press and release switches S2 or S3 on the Prototyping Board. The data echoed between the serial ports will be displayed in the
STDIO window.
J4
TxC
GND
RxD
TxD
RxC
J2
+3.3 V
/RST_OUT
PE5 PE7
PD1/LN1
PD3/LN3 PD5/LN5 PD7/LN7
VREF
GND /IORD
PE6
PD0/LN0 PD2/LN2 PD4/LN4 PD6/LN6 CVT AGND
User’s Manual 21
3.2.2 A/D Converter Inputs (RCM4100 only)
The following sample programs are found in the SAMPLES\RCM4100\ADC folder.
AD_CAL_ALL.C—Demonstrates how to recalibrate all the single-ended analog input
channels with one gain using two known voltages to generate the calibration constants for each channel. The constants will be written into the user block data area.
Connect a positive voltage from 0–20 V DC (for example, the power supply positive out­put) to analog input channels LN0IN–LN6IN on the Prototyping Board, and connect the ground to GND. Use a voltmeter to measure the voltage, and follow the instructions in the Dynamic C
STDIO window once you compile and run this sample program. Remember
that analog input LN7 on the Prototyping Board is used with the thermistor and is not be used with this sample program.
NOTE: The above sample program will overwrite the existing calibration constants.
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 from 0–20 V DC (for example, the power supply positive out­put) to an analog input cha nne l on the Prot otyping Board, and connect th e ground to GND. Use a voltmeter to measure the voltage , and follow the instruct ions in the Dynamic C
STDIO
window once you compile and run this sample program. Remember that analog input LN7 on the Prototyping Board is used with the thermistor and is not be used with this sample program.
NOTE: The above sample program will overwrite the existing calibration constants for
the selected channel.
AD_RDVOLT_ALL.C—Demonstrates how to read all single-ended A/D input channels
using previously defined calibration constants. The constants used to compute equivalent voltages are read from the user bl ock data area, so the sample program cannot be run usi ng the “Code and BIOS in RAM” compiler option.
Compile and run this sample program once you have connected a positive voltage from 0– 20 V DC (for example, the power supply positive output) to ana log input channels LN0IN– LN6IN on the Prototyping Board, and ground to GND. Follow the prompts in the Dynamic C
STDIO window. Raw data and the computed equivalent voltages will be displayed.
Remember that analog input LN7 on the Prototyping Boar d is used with the the rmistor and is not be used with this sample program.
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 an A/D converter channel (except LN7). The constants used to compute equivalent voltages are read from the use r block data area, so the sample program canno t be run using the “Code and BIOS in RAM” compiler option.
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. Raw data and the computed equiv-
alent 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.
22 RabbitCore RCM4100
THERMISTOR.C—Demonstrates how to use analog input LN7 to calculate temperature for display to the Dynamic C 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. Observe the temperature changes shown in the Dynamic C
STDIO
window as you apply heat or cold air to the thermistor.
3.2.2.1 Downloading and Uploading Calibration Constan ts
The Tera Term utility called for in these sample programs can be downloaded from
hp.vector.co.jp/authors/VA002416/teraterm.html.
These sample programs must be compiled to flash memory. To do so, select Options >
Project Options
in Dynamic C, then select the “Compiler” tab, and select “Code and
BIOS in Flash” for the
BIOS Memory Setting.
Before you compile and run these sample programs, you will also need to connect the RS-232 header at J4 to your PC as shown in the diagram using the serial to DB9 cable supplied in the Development Kit.
DNLOADCALIB.C—Demonstrates how to retrieve
analog calibration data to rewrite it back to the user block using a terminal emulation utility such as Tera Term.
Start T era Term or another terminal emulation program on your PC, and configure the serial parameters as follows.
Now compile and run this sample program. Verify that the message “Waiting, Please Send Data file” message is being display in the Tera Term display window before proceeding.
Within Tera Term, select
File-->Send File-->Path and filename, then select the
OPEN option within the dialog box. Once the data file has been downloaded, Tera
Term will indicate whether the calibration data were written successfully.
UPLOADCALIB.C—Demonstrates how to read the analog calibration constants from the user block using a terminal emulation utility such as Tera Term.
Start Tera Term or another terminal emulation program on your PC, and configure the serial parameters as follows.
Baud rate 19,200 bps, 8 bits, no parity, 1 stop bit
Enable Local Echo opt io n
Feed options — Receive = CR, Transmit = CR + LF
J4
RxC
TxC
GND
TxD
RxD
Colored
edge
User’s Manual 23
Follow the remaining steps carefully in Tera Term to avoid overwriting previously saved calibration data when using same the file name.
T era T erm is now ready to log all data received on the serial port to the file you specified. Y ou are now ready to compile and run this sample program. A message will be displayed
in the Tera Term display window once the sample program is running. Enter the serial number you assigned to your RabbitCore module in the Tera Term
display window, then press the ENTER key. The Tera Term display window will now display the calibration data.
Now select
CLOSE from within the Tera Term LOG window, which will likely be a
separate pop-up window minimized at the bottom of your PC screen. This finishes the logging and closes the file.
Open your data file and verify that the calibration data have been written properly. A sample is shown below.
Baud rate 19,200 bps, 8 bits, no parity, 1 stop bit
Enable Local Echo opt io n
Feed options — Receive = CR, Transmit = CR + LF
Enable the File APPEND option at the bottom of the dialog box
Select the OPEN option at the right-hand side of the dialog box
Serial port transmission ========================
Uploading calibration table . . .
Enter the serial number of your controller = 9MN234
SN9MN234
ADSE
0 float_gain,float_offset,float_gain,float_offset,float_gain,float_offset,float_gain,float_offset, float_gain,float_offset,float_gain,float_offset,float_gain,float_offset,float_gain,float_offset, 1 float_gain,float_offset,float_gain,float_offset,float_gain,float_offset,float_gain,float_offset, float_gain,float_offset,float_gain,float_offset,float_gain,float_offset,float_gain,float_offset, | |
ADDF
0 float_gain,float_offset,float_gain,float_offset,float_gain,float_offset,float_gain,float_offset, float_gain,float_offset,float_gain,float_offset,float_gain,float_offset,float_gain,float_offset, 2 float_gain,float_offset,float_gain,float_offset,float_gain,float_offset,float_gain,float_offset, float_gain,float_offset,float_gain,float_offset,float_gain,float_offset,float_gain,float_offset, | |
ADMA
3 float_gain,float_offset, 4 float_gain,float_offset, | |
END
24 RabbitCore RCM4100
3.2.3 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.
User’s Manual 25
4. HARDWARE REFERENCE
Chapter 4 describes the hardware components and principal hardware subsystems of the RCM4100 series. Appendix A, “RCM4100 Specifi­cations,” provides complete physical and electrical specifications.
Figure 5 shows the Rabbit-based subsystems designed into the RCM4100.
Figure 5. RCM4100 Subsystems
SRAM
Flash
RabbitCore Module
RABBIT
®
4000
RS-232 and other
serial drivers
on motherboard
logic-level serial signal
Level
converter
32 kHz
osc
29.49 MHz osc
A/D Converter
26 RabbitCore RCM4100
4.1 RCM4100 Digital Inputs and Outputs
Figure 6 shows the RCM4100 series pinouts for header J2.
Figure 6. RCM4100 Series Pinout
Headers J2 is a standard 2 × 25 IDC header with a nominal 1.27 mm pitch.
Note:
These pinouts are as seen on the Bottom Side of the module.
+3.3 V_IN
/RESET_OUT
/IOWR
VBAT_EXT
PA1 PA3 PA5
PA7 PB1 PB3 PB5 PB7 PC1 PC3 PC5 PC7 PE1 PE3
PE5/SMODE0
PE7/STATUS
PD1/LN1 PD3/LN3 PD5/LN5 PD7/LN7
n.c./VREF
GND /IORD /RESET_IN PA0 PA2 PA4 PA6 PB0 PB2 PB4 PB6 PC0 PC2 PC4 PC6 PE0 PE2 PE4 PE6/SMODE1 PD0/LN0 PD2/LN2 PD4/LN4 PD6/LN6 n.c./CONVERT GND
J2
n.c. = not connected
Loading...
+ 82 hidden pages