RabbitCore RCM2200 C-Programmable Module with Ethernet Getting Started Manual 019–0096 • 050305–G
RabbitCore RCM2200 Getting Started Manual Part Number 019-0096 • 050305–G • Printed in U.S.A. ©2001–2005 Z-World Inc. • All rights reserved. Z-World reserves the right to make changes and improvements to its products without providing notice. Trademarks Rabbit and Rabbit 2000 are registered trademarks of Rabbit Semiconductor. RabbitCore is a trademark of Rabbit Semiconductor. Z-World is a registered trademark of Z-World Inc. Dynamic C is a registered trademark of Z-World Inc. Z-World, Inc.
TABLE OF CONTENTS Chapter 1. Introduction & Overview 1 1.1 RCM2200 Description .................................................................................................... 1 1.1.1 Physical & Electrical Specifications ........................................................................................... 2 1.2 Development Software .................................................................................................... 3 1.3 How to Use This Manual ...................................
Chapter 4. Using the TCP/IP Features 27 4.1 TCP/IP Connections ......................................................................................................27 4.2 Running TCP/IP Sample Programs ...................................................................................29 4.3 IP Addresses Explained ..................................................................................................31 4.4 How IP Addresses are Used ...............................................................
1. INTRODUCTION & OVERVIEW The RCM2200 is an advanced module that incorporates the powerful Rabbit 2000® microprocessor, flash memory, SRAM, digital I/O ports, and a 10/100-compatible Ethernet port with a 10Base-T interface, all on a PCB just half the size of a business card. Throughout this manual, the term RCM2200 refers to the complete series of RCM2200 RabbitCore modules unless other production models are referred to specifically. 1.
In addition, a variant of the RCM2200 is available. The RCM2300 omits the Ethernet connectivity but offers a much smaller footprint, one-half the size of the RCM2200. Another RabbitCore module can be used to reprogram an RCM2200. This reprogramming (and debugging) can be done via the Internet using Z-World’s RabbitLink network programming gateway. 1.1.1 Physical & Electrical Specifications Table 2 lists the basic specifications for the RCM2200. Table 2.
1.2 Development Software The RCM2200 module uses the Dynamic C development environment for rapid creation and debugging of runtime applications. Dynamic C provides a complete development environment with integrated editor, compiler and source-level debugger. It interfaces directly with the target system, eliminating the need for complex and unreliable in-circuit emulators. Dynamic C must be installed on a Windows workstation with at least one free serial (COM) port for communication with the target system.
1.3.3 Using Online Documentation We provide the bulk of our user and reference documentation in two electronic formats, HTML and Adobe PDF. We do this for several reasons. We believe that providing all users with our complete library of product and reference manuals is a useful convenience. However, printed manuals are expensive to print, stock and ship.
2. GETTING STARTED This chapter describes the RCM2200 hardware in more detail, and explains how to set up and use the accompanying Prototyping Board. NOTE: This chapter (and this manual) assume that you have the RCM2200 Development Kit. If you purchased an RCM2200 module by itself, you will have to adapt the information in this chapter and elsewhere to your test and development setup. 2.
2.2 Prototyping Board The Prototyping Board included in the Development Kit makes it easy to connect an RCM2200 module to a power supply and a PC workstation for development. It also provides some basic I/O peripherals (switches and LEDs), as well as a prototyping area for more advanced hardware development. For the most basic level of evaluation and development, the Prototyping Board can be used without modification.
2.2.1 Prototyping Board Features • Power Connection—A 3-pin header is provided for connection to the power supply. Note that it is symmetrical, with both outer pins connected to ground and the center pin connected to the raw V+ input. The cable of the wall transformer provided with the North American version of the development kit ends in a connector that is correctly connected in either orientation. Users providing their own power supply should ensure that it delivers 8–24 V DC at not less than 500 mA.
2.2.2 Prototyping Board Expansion The Prototyping Board comes with several unpopulated areas, which may be filled with components to suit the user’s development needs. After you have experimented with the sample programs in Section 3.3, you may wish to expand the board’s capabilities for further experimentation and development. Refer to the Prototyping Board schematic (090– 0122) for details as necessary.
2.3 Connections There are four steps to connecting the Prototyping Board for use with Dynamic C and the sample programs: 1. Attach the RCM2200 module to the Prototyping Board. 2. Connect the programming cable between the RCM2200 module and the workstation PC. 3. Connect the power supply to the Prototyping Board. 2.3.
Although you can install a single module into either the MASTER or the SLAVE position on the Prototyping Board, all the Prototyping Board features (switches, LEDs, serial port drivers, etc.) are connected to the MASTER position. We recommend you install the module in the MASTER position. NOTE: It is important that you line up the pins on headers J4 and J5 of the RCM2200 exactly with the corresponding pins of header sockets J1 and J2 on the Prototyping Board.
2.3.3 Connect Power When all other connections have been made, you can connect power to the RCM2200 Prototyping Board. Hook the connector from the wall transformer to header J5 on the Prototyping Board as shown in Figure 6 below. The connector may be attached either way as long as it is not offset to one side.
2.4 Run a Sample Program If you already have Dynamic C installed, you are now ready to test your programming connections by running a sample program. If you are using a USB port to connect your computer to the RCM2200 module, choose Options > Project Options and select “Use USB to Serial Converter” under the Communications tab. Find the file PONG.C, which is in the Dynamic C SAMPLES folder.
2.5 Where Do I Go From Here? If everything appears to be working, we recommend the following sequence of action: 1. Run all of the sample programs described in Chapter 3 to get a basic familiarity with Dynamic C and the RCM2200 module’s capabilities. 2. For further development, refer to the RabbitCore RCM2200 User’s Manual for details of the module’s hardware and software components. A documentation icon should have been installed on your workstation’s desktop; click on it to reach the documentation menu.
14 RabbitCore RCM2200
3. SOFTWARE INSTALLATION & OVERVIEW To develop and debug programs for the RCM2200 (and for all other Z-World and Rabbit Semiconductor hardware), you must install and use Dynamic C. Dynamic C is an integrated development system for writing embedded software. It runs on an IBMcompatible PC and is designed for use with Z-World singleboard computers and other single-board computers based on the Rabbit microprocessor.
Dynamic C has a number of standard features. • Full-feature source and/or assembly-level debugger, no in-circuit emulator required. • Royalty-free TCP/IP stack with source code and most common protocols. • Hundreds of functions in source-code libraries and sample programs: X Exceptionally fast support for floating-point arithmetic and transcendental functions. X RS-232 and RS-485 serial communication. X Analog and digital I/O drivers. X I2C, SPI, GPS, file system. X LCD display and keypad drivers.
3.2 Installing Dynamic C Insert the Dynamic C CD from the Development Kit in your PC’s CD-ROM drive. If the installation does not auto-start, run the setup.exe program in the root directory of the Dynamic C CD. Install any Dynamic C modules after you install Dynamic C. Dynamic C has two components that can be installed together or separately. One component is Dynamic C itself, with the development environment, support files and libraries.
3.3 Sample Programs To help familiarize you with the RCM2200 modules, several sample Dynamic C programs have been included. Loading, executing and studying these programs will give you a solid hands-on overview of the RC M2200’s capabilities, as well as a quick start with Dynamic C as an application development tool. These programs are intended to serve as tutorials, but then can also be used as starting points or building blocks for your own applications.
3.3.1 Getting to Know the RCM2200 The following sample programs can be found in the SAMPLES\RCM2200 folder. • EXTSRAM.C—demonstrates the setup and simple addressing to an external SRAM. This program first maps the external SRAM to the I/O Bank 7 register with a maximum of 15 wait states, chip select strobe (PE7), and allows writes. The first 256 bytes of SRAM are cleared and read back. Values are then written to the same area and are read back.
• KEYLCD.C—demonstrates a simple setup for a 2 × 6 keypad and a 2 × 20 LCD. Connect the keypad to Parallel Ports B, C, and D. PB0—Keypad Col 0 PC1—Keypad Col 1 PB2—Keypad Col 2 PB3—Keypad Col 3 PB4—Keypad Col 4 PB5—Keypad Col 5 PD3—Keypad Row 0 PD4—Keypad Row 1 RCM2200/RCM2300 Prototyping Board VCC 11 12 13 14 10 kW resistors PB0 PB2 PB3 PB4 PB5 4 PC1 10 PD3 PD4 J8 J7 10 Keypad Col 0 Col 2 Col 3 Col 4 Col 5 Col 1 Row 0 Row 1 NC NC 11 Connect the LCD to Parallel Port A.
3.3.2 Serial Communication The following sample programs can be found in the SAMPLES\RCM2200 folder. One sample programs, PUTS.C is available to illustrate RS-232 communication. To run this sample program, you will have to add an RS-232 transceiver such as the MAX232 at location U2 and five 100 nF capacitors at C3–C7 on the Prototyping Board. Also install a 2 × 5 IDC header with a pitch of 0.1" at J6 to interface the RS-232 signals. The diagram shows the connections.
Two sample programs, MASTER.C and SLAVE.C, are available to illustrate RS-485 master/ slave communication. To run these sample programs, you will need a second Rabbit-based system with RS-485, and you will also have to add an RS-485 transceiver such as the SP483E and bias resistors to the Prototyping Board. The diagram shows the connections.
3.3.4 Sample Program Descriptions 3.3.4.1 FLASHLED.C This program is about as simple as a Dynamic C application can get—the equivalent of the traditional “Hello, world!” program found in most basic programming tutorials. If you are familiar with ANSI C, you should have no trouble reading through the source code and understanding it. The only new element in this sample application should be Dynamic C’s handling of the Rabbit microprocessor’s parallel ports. The program: 4.
3.3.4.2 FLASHLEDS.C In addition to Dynamic C’s implementation of C-language programming for embedded systems, it supports assembly-language programming for very efficient processor-level control of the module hardware and program flow. This application is similar to FLASHLED.C and TOGGLELED.C, but uses assembly language for the low-level port control within cofunctions, another powerful multitasking tool. Dynamic C permits the use of assembly language statements within C code.
tion of how Dynamic C handles multitasking with costatements and cofunctions, see Chapter 5, “Multitasking with Dynamic C,” and Chapter 6, “The Virtual Driver,” in the Dynamic C User’s Manual. 3.3.4.3 TOGGLELED.C One of Dynamic C’s unique and powerful aspects is its ability to efficiently multitask using cofunctions and costatements. This simple application demonstrates how these program elements work. This sample program uses two costatements to set up and manage the two tasks.
3.4 Upgrading Dynamic C Dynamic C patches that focus on bug fixes are available from time to time. Check the Web sites • www.zworld.com/support/ or • www.rabbitsemiconductor.com/support/ for the latest patches, workarounds, and bug fixes. 3.4.1 Add-On Modules Dynamic C installations are designed for use with the board they are included with, and are included at no charge as part of our low-cost kits.
4. USING THE TCP/IP FEATURES 4.1 TCP/IP Connections Programming and development can be done with the RCM2200 RabbitCore modules without connecting the Ethernet port to a network. However, if you will be running the sample programs that use the Ethernet capability or will be doing Ethernet-enabled development, you should connect the RCM2200 module’s Ethernet port at this time. Before proceeding you will need to have the following items.
The following options require more care in address selection and testing actions, as conflicts with other users, servers and systems can occur: • LAN — Connect the RCM2200’s Ethernet port to an existing LAN, preferably one to which the development PC is already connected. You will need to obtain IP addressing information from your network administrator.
4.2 Running TCP/IP Sample Programs We have provided a number of sample programs demonstrating various uses of TCP/IP for networking embedded systems. These programs require that the user connect his PC and the RCM2200 board together on the same network. This network can be a local private network (preferred for initial experimentation and debugging), or a connection via the Internet.
The following IP addresses are set aside for local networks and are not allowed on the Internet: 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, and 192.168.0.0 to 192.168.255.255. The RCM2200 board uses a 10Base-T type of Ethernet connection, which is the most common scheme. The RJ-45 connectors are similar to U.S. style telephone connectors, except they are larger and have 8 contacts. An alternative to the direct connection using a crossover cable is a direct connection using a hub.
4.3 IP Addresses Explained IP (Internet Protocol) addresses are expressed as 4 decimal numbers separated by periods, for example: 216.103.126.155 10.1.1.6 Each decimal number must be between 0 and 255. The total IP address is a 32-bit number consisting of the 4 bytes expressed as shown above. A local network uses a group of adjacent IP addresses. There are always 2N IP addresses in a local network. The netmask (also called subnet mask) determines how many IP addresses belong to the local network.
4.4 How IP Addresses are Used The actual hardware connection via an Ethernet uses Ethernet adapter addresses (also called MAC addresses.) These are 48-bit addresses and are unique for every Ethernet adapter manufactured. In order to send a packet to another computer, given the IP address of the other computer, it is first determined if the packet needs to be sent directly to the other computer or to the gateway. In either case, there is an IP address on the local network to which the packet must be sent.
4.5 Dynamically Assigned Internet Addresses In many instances, there are no fixed IP addresses. This is the case when, for example, you are assigned an IP address dynamically by your dial-up Internet service provider (ISP) or when you have a device that provides your IP addresses using the Dynamic Host Configuration Protocol (DHCP).
4.6 Placing Your Device on the Internet In many corporate settings, users are isolated from the Internet by a firewall and/or a proxy server. These devices attempt to secure the company from unauthorized network traffic, and usually work by disallowing traffic that did not originate from inside the network. If you want users on the Internet to communicate with your RCM2200, you have several options.
4.7 How to Set IP Addresses in the Sample Programs We have provided a number of sample programs demonstrating various uses of TCP/IP for networking embedded systems. These programs require that you connect your PC and the Coyote together on the same network. This network can be a local private network (preferred for initial experimentation and debugging), or a connection via the Internet. With the introduction of Dynamic C 7.30 we have taken steps to make it easier to run many of our sample programs.
4.8 How to Set Up Your Computer for Direct Connect Follow these instructions to set up your PC or notebook. Check with your administrator if you are unable to change the settings as described here since you may need administrator privileges. The instructions are specifically for Windows 2000, but the interface is similar for other versions of Windows. TIP: If you are using a PC that is already on a network, you will disconnect the PC from that network to run these sample programs.
4.9 Run the PINGME.C Sample Programs Connect the crossover cable from your computer’s Ethernet port to the RCM2200 board’s RJ-45 Ethernet connector. Open this sample program from the SAMPLES\TCPIP\ICMP folder, compile the program, and start it running under Dynamic C. When the program starts running, the green LNK light on the RCM2200 board should be on to indicate an Ethernet connection is made.
4.11 Where Do I Go From Here? NOTE: If you purchased your RCM2200 through a distributor or through a Z-World or Rabbit Semiconductor partner, contact the distributor or Z-World partner first for technical support. If there are any problems at this point: • Use the Dynamic C Help menu to get further assistance with Dynamic C. • Check the Z-World/Rabbit Semiconductor Technical Bulletin Board at www.zworld.com/support/bb/. • Use the Technical Support e-mail form at www.zworld.com/support/questionSubmit.shtml.
NOTICE TO USERS Z-WORLD PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFESUPPORT DEVICES OR SYSTEMS UNLESS A SPECIFIC WRITTEN AGREEMENT REGARDING SUCH INTENDED USE IS ENTERED INTO BETWEEN THE CUSTOMER AND Z-WORLD PRIOR TO USE.
40 RabbitCore RCM2200
INDEX A H S additional information online documentation .......... 4 references ............................ 3 C language ............................ 15 hardware connections install RCM2200 on Prototyping Board ........................ 9 power supply ..................... 11 programming cable ........... 10 hardware reset ....................... 11 D I Development Kit ..................... 5 Dynamic C ........................ 3, 15 add-on modules ................. 26 installing ....................
42 RabbitCore RCM2200
SCHEMATICS 090-0120 RCM2200 Schematic www.rabbitsemiconductor.com/documentation/schemat/090-0120.pdf 090-0122 RCM2200 Prototyping Board Schematic www.rabbitsemiconductor.com/documentation/schemat/090-0122.pdf 090-0128 Programming Cable Schematic www.rabbitsemiconductor.com/documentation/schemat/090-0128.pdf The schematics included with the printed manual were the latest revisions available at the time the manual was last revised.