RabbitCore RCM3200 C-Programmable Module with Ethernet Getting Started Manual 019–0117 • 050205–F
RabbitCore RCM3200 Getting Started Manual Part Number 019-0117 • 050205–F • Printed in U.S.A. ©2002–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 3000 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 Rabbit 3000 Microprocessor ............................................................................................................... 1 1.2 RCM3200 RabbitCore Modules ......................................................................................................... 2 1.2.1 Physical & Electrical Specifications ........................................................................................... 3 1.3 Development Software.........
Chapter 4. Using the TCP/IP Features 25 4.1 TCP/IP Connections.......................................................................................................................... 25 4.2 TCP/IP Primer on IP Addresses ........................................................................................................ 27 4.2.1 IP Addresses Explained ............................................................................................................. 29 4.2.2 How IP Addresses are Used ......
1. INTRODUCTION & OVERVIEW The RCM3200 is an advanced module that incorporates the powerful Rabbit 3000® microprocessor, flash memory, static RAM, digital I/O ports, and a 10/100Base-T Ethernet port. This Development Kit has the essentials that you need to design your own microprocessor-based system, and includes a complete Dynamic C software development system.
1.2 RCM3200 RabbitCore Modules Throughout this manual, the term RCM3200 refers to the complete series of RCM3200 RabbitCore modules unless other production models are referred to specifically. The RCM3200 RabbitCore modules are designed for use on a customer-supplied motherboard that supplies power and interfaces to real-world I/O devices. Their two 34-pin connection headers provide 52 parallel user I/O lines, shared with five serial ports, along with control lines.
1.2.1 Physical & Electrical Specifications Table 2 lists the basic specifications for the RCM3200. Table 2. RCM3200 Specifications Specification Data Power Supply 3.15 – 3.45 V DC (255 mA at 44.2 MHz clock speed) Size 1.85" × 2.65" × 0.86" (47 mm × 67 mm × 22 mm) Environmental –40°C to 70°C, 5–95% humidity, noncondensing NOTE: For complete product specifications, see Appendix A in the RabbitCore RCM3200 User’s Manual.
1.3 Development Software The RCM3200 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.
1.4.2 Additional Reference Information In addition to the product-specific information contained in the RabbitCore RCM3200 User’s Manual, several higher level reference manuals are provided in HTML and PDF form on the accompanying CD-ROM. Advanced users will find these references valuable in developing systems based on the RCM3200 module: • Dynamic C User’s Manual • Dynamic C Function Reference Manual • An Introduction to TCP/IP • Dynamic C TCP/IP User’s Manual • Rabbit 3000 Microprocessor User’s Manual 1.
Printing Electronic Manuals We recognize that many users prefer printed manuals for some uses. Users can easily print all or parts of those manuals provided in electronic form. The following guidelines may be helpful: • Print from the Adobe PDF versions of the files, not the HTML versions. • If your printer supports duplex printing, print pages double-sided. • If you do not have a suitable printer or do not want to print the manual yourself, most retail copy shops (e.g. Kinkos, AlphaGraphics, etc.
2. HARDWARE SETUP This chapter describes the RCM3200 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 RCM3200 Development Kit. If you purchased an RCM3200 module by itself, you will have to adapt the information in this chapter and elsewhere to your test and development setup. 2.1 Development Kit Contents The RCM3200 Development Kit contains the following items: • RCM3200 module.
2.2 Prototyping Board The Prototyping Board included in the Development Kit makes it easy to connect an RCM3200 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 power-supply jack and a 3-pin header are provided for connection to the power supply. Note that the 3-pin header is symmetrical, with both outer pins connected to ground and the center pin connected to the raw V+ input. The cable of the AC adapter provided with the North American version of the Development Kit ends in a plug that connects to the power-supply jack.
• RS-232—Two 3-wire or one 5-wire RS-232 serial port are available on the Prototyping Board. Refer to the Prototyping Board schematic (090-0137) for additional details. A 10-pin 0.1-inch spacing header strip is installed at J5 to permit connection of a ribbon cable leading to a standard DE-9 serial connector. • Current Measurement Option—Jumpers across pins 1–2 and 5–6 on header JP1 can be removed and replaced with an ammeter across the pins to measure the current drawn from the +5 V or the +3.
2.3 Development Hardware Connections There are four steps to connecting the Prototyping Board for use with Dynamic C and the sample programs: 1. 2. 3. 4. Attach the RCM3200 module to the Prototyping Board. Connect the programming cable between the RCM3200 module and the workstation PC. Connect the module’s Ethernet port to a PC’s Ethernet port, or to an Ethernet network. Connect the power supply to the Prototyping Board. 2.3.
2.3.2 Connect Programming Cable The programming cable connects the RCM3200 to the PC running Dynamic C to download programs and to monitor the RCM3200 module during debugging. Connect the 10-pin connector of the programming cable labeled PROG to header J1 on the RCM3200 module 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.
2.3.3 Connect Power When all other connections have been made, you can connect power to the Prototyping Board. Connect the wall transformer to jack J11 on the Prototyping Board as shown in Figure 5 below.
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. The RCM3200 runs at 44.2 MHz, and has a fast program execution SRAM to ensure that the memory where any programs run can handle the higher clock speed.
2.5 Where Do I Go From Here? We recommend that you proceed to the next chapter and install Dynamic C (if you do not already have it installed), then run the PONG.C sample program to verify that the RCM3200 module and the Prototyping Board are set up and functioning correctly. If everything appears to be working, we recommend the following sequence of action: 1. Run all of the sample programs described in Section 3.3 to get a basic familiarity with Dynamic C and the RCM3200 module’s capabilities. 2.
16 RabbitCore RCM3200
3. SOFTWARE INSTALLATION & OVERVIEW Dynamic C is an integrated development system for writing embedded software. It runs on an IBM-compatible PC and is designed for use with Z-World controllers and other controllers based on the Rabbit microprocessor. Chapter 3 walks you through the sample programs associated with the RCM3200. 3.1 An Overview of Dynamic C Dynamic C has been in use worldwide since 1989.
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, encryption, file system.
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 RCM3200 modules, Dynamic C includes several sample programs in the Dynamic C SAMPLES\RCM3200 directory. Loading, executing and studying these programs will give you a solid hands-on overview of the RCM3200’s capabilities, as well as a quick start with Dynamic C as an application development tool. The SAMPLES\TCPIP directory has sample programs that demonstrate more advanced TCP/IP programming for Z-World’s Ethernet-enabled Rabbit-based boards.
• IR_DEMO.c—Demonstrates sending Modbus ASCII packets between two Prototyping Board assemblies via the IrDA transceivers with the IrDA transceivers facing each other. Note that this sample program will only work with the RCM30/31/32XX Prototyping Board. First, compile and run this program on one Prototyping Board assembly, then remove the programming cable and press the RESET button on the Prototyping Board so that the first RabbitCore module is operating in the Run mode.
• SIMPLE3WIRE.C—This program demonstrates basic RS-232 serial communication. Lower case characters are sent by TxC, and are received by RxB. The characters are converted to upper case and are sent out by TxB, are received by RxC, and are displayed in the Dynamic C STDIO window.
The RS-485 connections between the slave and master devices are as follows. • RS485+ to RS485+ • RS485– to RS485– • GND to GND • SIMPLE485MASTER.C—This program demonstrates a simple RS-485 transmission of lower case letters to a slave RCM3200. The slave will send back converted upper case letters back to the master RCM3200 and display them in the STDIO window. Use SIMPLE485SLAVE.C to program the slave RCM3200. • SIMPLE485SLAVE.
24 RabbitCore RCM3200
4. USING THE TCP/IP FEATURES 4.1 TCP/IP Connections Programming and development can be done with the RCM3200 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 RCM3200 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 RCM3200’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 TCP/IP Primer on IP Addresses Obtaining IP addresses to interact over an existing, operating, network can involve a number of complications, and must usually be done with cooperation from your ISP and/or network systems administrator. For this reason, it is suggested that the user begin instead by using a direct connection between a PC and the RCM3200 board using an Ethernet crossover cable or a simple arrangement with a hub.
Hub(s) T1 in Adapter Ethernet Firewall Proxy Server Network Ethernet Typical Corporate Network RCM3200 Board If your system administrator can give you an Ethernet cable along with its IP address, the netmask and the gateway address, then you may be able to run the sample programs without having to setup a direct connection between your computer and the RCM3200 board.
4.2.1 IP Addresses Explained IP (Internet Protocol) addresses are expressed as 4 decimal numbers separated by periods, for example: 216.103.126.155 10.1.1.6 Each decimal number must be between 0 and 255. The total IP address is a 32-bit number consisting of the 4 bytes expressed as shown above. A local network uses a group of adjacent IP addresses. There are always 2N IP addresses in a local network. The netmask (also called subnet mask) determines how many IP addresses belong to the local network.
4.2.2 How IP Addresses are Used The actual hardware connection via an Ethernet uses Ethernet adapter addresses (also called MAC addresses). These are 48-bit addresses and are unique for every Ethernet adapter manufactured. In order to send a packet to another computer, given the IP address of the other computer, it is first determined if the packet needs to be sent directly to the other computer or to the gateway. In either case, there is an IP address on the local network to which the packet must be sent.
4.2.3 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.3 Placing Your Device on the Network In many corporate settings, users are isolated from the Internet by a firewall and/or a proxy server. These devices attempt to secure the company from unauthorized network traffic, and usually work by disallowing traffic that did not originate from inside the network. If you want users on the Internet to communicate with your RCM3200, you have several options.
4.4 Running TCP/IP Sample Programs We have provided a number of sample programs demonstrating various uses of TCP/IP for networking embedded systems. These programs require you to connect your PC and the RCM3200 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.
4.4.1 How to Set IP Addresses in the Sample Programs With the introduction of Dynamic C 7.30 we have taken steps to make it easier to run many of our sample programs. Instead of the MY_IP_ADDRESS and other macros, you will see a TCPCONFIG macro. This macro tells Dynamic C to select your configuration from a list of default configurations. You will have three choices when you encounter a sample program with the TCPCONFIG macro. 1.
4.4.2 How to Set Up your Computer’s IP Address for Direct Connect When your computer is connected directly to the RCM3200 board via an Ethernet connection, you need to assign an IP address to your computer. To assign the PC the address 10.10.6.101 with the netmask 255.255.255.0, do the following. Click on Start > Settings > Control Panel to bring up the Control Panel, and then double-click the Network icon.
4.5 Run the PINGME.C Sample Program Connect the crossover cable from your computer’s Ethernet port to the RCM3200 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 RCM3200 board should be on to indicate an Ethernet connection is made.
• ENET_MENU.C—This program demonstrates how to implement a menu system using a highlight bar on a graphic LCD display and to communicate it to another single-board computer via Ethernet. Use ENET_AD.C to program the other single-board computer with analog inputs and outputs. • MBOXDEMO.C—Implements a Web server that allows e-mail messages to be entered and then shown on the LCD/keypad module. • SMTP.C—This program allows you to send an E-mail when a switch on the Prototyping Board is pressed.
38 RabbitCore RCM3200
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 RCM3200
INDEX A H S additional information online documentation .......... 5 references ............................ 5 compile options ..................... 17 hardware connections ........... 11 install RCM3200 on Prototyping Board ................. 11 power supply ..................... 13 programming cable ........... 12 hardware reset ....................... 13 D I Development Kit ..................... 7 Dynamic C ........................ 4, 17 compile options ................. 17 installing ............
42 RabbitCore RCM3200
SCHEMATICS 090-0152 RCM3200 Schematic www.zworld.com/documentation/schemat/090-0152.pdf 090-0137 Prototyping Board Schematic www.zworld.com/documentation/schemat/090-0137.pdf 090-0156 LCD/Keypad Module Schematic www.zworld.com/documentation/schemat/090-0156.pdf 090-0128 Programming Cable Schematic www.zworld.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.