RabbitCore RCM3000 C-Programmable Module with Ethernet Getting Started Manual 019–0109 • 030615–B
RabbitCore RCM3000 Getting Started Manual Part Number 019-0109 • 030615–B • Printed in U.S.A. ©2002–2003 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. 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 RCM3000 Series RabbitCore Modules............................................................................................... 2 1.2.1 Physical & Electrical Specifications ........................................................................................... 3 1.3 Development Software.............
Chapter 4: Using the TCP/IP Features 23 4.1 TCP/IP Connections.......................................................................................................................... 4.2 Running TCP/IP Sample Programs................................................................................................... 4.3 IP Addresses Explained..................................................................................................................... 4.4 How IP Addresses are Used .................
1. INTRODUCTION & OVERVIEW The Rabbit 3000 is a modern 8-bit microprocessor that is the central element of a complete and fully supported embedded design system that includes development tools, software libraries, core modules, sample designs, a parts store, and readily available expert, human support. 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 RCM3000 Series RabbitCore Modules The RCM3000 series RabbitCore modules are designed for use on a customer-supplied motherboard that supplies power and interfaces to real-world I/O devices. Their two 34pin connection headers provide 52 parallel user I/O lines, shared with five serial ports, along with control lines. A sixth serial port and one additional I/O line are available on the programming header. A fully enabled slave port permits glueless master-slave interface with another Rabbitbased system.
1.2.1 Physical & Electrical Specifications Table 2 lists the basic specifications for the RCM3000. Table 2. RCM3000 Specifications Specification Data Power Supply 3.15 – 3.45 V DC (145 mA at 29.5 MHz clock speed) Size 1.85" x 2.65"” x 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 RCM3000 User’s Manual.
1.3 Development Software The RCM3000 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.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.
6 RabbitCore RCM3000
2. HARDWARE SETUP This chapter describes the RCM3000 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 RCM3000 Development Kit. If you purchased an RCM3000 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 RCM3000 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.
• 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.3 V supplies, respectively. • Motor Encoder—A motor/encoder header is provided at header J6 for future use. • LCD/Keypad Module—Z-World’s LCD/keypad module (Z-World part number 101-0465) may be plugged in directly to headers J7, J8, and J10.
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 RCM3000 module to the Prototyping Board. Connect the programming cable between the RCM3000 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 RabbitCore module to the PC running Dynamic C to download programs and to monitor the RabbitCore module for debugging. Connect the 10-pin connector of the programming cable labeled PROG to header J1 on the RCM3000 series 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 RCM3000 Prototyping Board. Connect the wall transformer to jack J11 on the Prototyping Board as shown in Figure 6 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. Find the file PONG.C, which is in the Dynamic C SAMPLES folder. To run the program, open it with the File menu (if it is not still open), compile it using the Compile menu, and then run it by selecting Run in the Run menu. The STDIO window will open and will display a small square bouncing around in a box. This program shows that the CPU is working.
3. SOFTWARE INSTALLATION & OVERVIEW To develop and debug programs for the RCM3000 (and for all other Z-World and Rabbit Semiconductor hardware), you must install and use Dynamic C. This chapter takes you through the installation of Dynamic C, and then provides a tour of its major features with respect to the RCM3000. 3.
• Dynamic C provides extensions to the C language (such as shared and protected variables, costatements and cofunctions) that support real-world embedded system development. Interrupt service routines may be written in C. Dynamic C supports cooperative and preemptive multi-tasking. • Dynamic C comes with many function libraries, all in source code. These libraries support real-time programming, machine level I/O, and provide standard string and math functions. • Dynamic C compiles directly to memory.
3.2 Installing Dynamic C Insert the Dynamic C CD-ROM in the drive on your PC. If autorun is enabled, the CD installation will begin automatically. If autorun is disabled or the installation otherwise does not start, use the Windows Start | Run menu or Windows Disk Explorer to launch SETUP.EXE from the root folder of the CD-ROM. The installation program will guide you through the installation process. Most steps of the process are self-explanatory and not covered in this section.
3.2.2 Installation Type 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. The other component is the documentation library in HTML and PDF formats, which may be left uninstalled to save hard drive space or installed elsewhere (on a separate or network drive, for example). The installation type is selected in the installation menu shown above.
3.2.3 Select COM Port Dynamic C uses a COM (serial) port to communicate with the target development system. The installation allows you to choose the COM port that will be used. The default selection, as shown in the example above, is COM1. You may select any available port for Dynamic C’s use. If you are not certain which port is available, select COM1. This selection can be changed later within Dynamic C. NOTE: The installation utility does not check the selected COM port in any way.
3.3 Starting Dynamic C Once the RCM3000 is set up and connected as described in Chapter 2 and Dynamic C has been installed, start Dynamic C by double-clicking on the Dynamic C icon. Dynamic C should start, then look for the target system on the COM port you specified during installation (by default, COM1). Once detected, Dynamic C should go through a sequence of steps to cold-boot the module and compile the BIOS.
3.4 Sample Programs To help familiarize you with the RCM3000 modules, Dynamic C includes several sample programs. Loading, executing and studying these programs will give you a solid hands-on overview of the RabbitCore’s capabilities, as well as a quick start with Dynamic C as an application development tool. NOTE: The sample programs assume that you have at least an elementary grasp of ANSI C. If you do not, see the introductory pages of the Dynamic C User’s Manual for a suggested reading list.
22 RabbitCore RCM3000
4. USING THE TCP/IP FEATURES 4.1 TCP/IP Connections Programming and development can be done with the RCM3000 series 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 RCM3000 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 RCM3000’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 RCM3000 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 RCM3000 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, are except larger and have 8 contacts. An alternative to the direct connection using a crossover cable is a direct connection using a hub. The hub relays packets received on any port to all of the ports on the hub. Hubs are low in cost and are readily available.
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 RCM3000, you have several options.
4.7 How to Set IP Addresses in the Sample Programs Most of the sample programs such as shown in the example below use macros to define the IP address assigned to the board and the IP address of the gateway, if there is a gateway. #define MY_IP_ADDRESS "216.112.116.155" #define MY_NETMASK "255.255.255.248" #define MY_GATEWAY "216.112.116.153" In order to do a direct connection, the following IP addresses can be used for the RCM3000: #define MY_IP_ADDRESS "10.1.1.2" #define MY_NETMASK "255.255.255.
4.8 How to Set Up your Computer’s IP Address for Direct Connect When your computer is connected directly to the RCM3000 board via an Ethernet connection, you need to assign an IP address to your computer. To assign the PC the address 10.1.1.1 with the subnetmask 255.255.255.248 under Windows 98, do the following. Click on Start > Settings > Control Panel to bring up the Control Panel, and then double-click the Network icon. In the window find the line of the form TCP/IP > Ethernet adapter name.
4.9 Run the PINGME.C Demo In order to run this program, edit the IP address and netmask in the PINGME.C program (SAMPLES\TCPIP\ICMP) to the values 10.1.1.2 and 255.255.255.248 given above for a direct connection. Compile the program and start it running under Dynamic C. The crossover cable is connected from your computer’s Ethernet adapter to the RCM3000 board’s RJ-45 Ethernet connector.
4.11 Where Do I Go From Here? NOTE: If you purchased your RCM3000 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: • 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/support_submit.html. If the sample programs ran fine, you are now ready to go on.
NOTICE TO USERS ZWORLD PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE-SUPPORT DEVICES OR SYSTEMS UNLESS A SPECIFIC WRITTEN AGREEMENT REGARDING SUCH INTENDED USE IS ENTERED INTO BETWEEN THE CUSTOMER AND Z-WORLD PRIOR TO USE.
36 RabbitCore RCM3000
INDEX A F R additional information online documentation .......... 5 references ............................ 4 features Prototyping Board ........... 8, 9 RCM3000 ............................ 2 C H C language ...................... 15, 16 hardware connections ........... 11 install RCM3000 on Prototyping Board ...................... 11 power supply ..................... 13 programming cable ........... 12 hardware reset ....................... 13 RCM3000 mounting on Prototyping Board ..............
38 RabbitCore RCM3000
SCHEMATICS 090-0136 RCM3000 Schematic www.zworld.com/documentation/schemat/090-0136.pdf 090-0137 RCM3000 Series 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.