Rabbit Semiconductor RCM3200

an article added by: Daniel R. at 12062007


In: Categories » Computers and technology » Ethernet » Rabbit Semiconductor RCM3200

Rabbit Semiconductor RCM3200. When you’re ready to begin designing an embedded system for networking, you’ll need to make some decisions about the device hardware and the programming code that will control the hardware. At one extreme, you can do it all yourself, interfacing an Ethernet controller chip to a CPU and writing code to support Ethernet communications and the Internet protocols the device uses. Or you can save a lot of time by starting with a module that contains a CPU, Ethernet interface, and software support for Ethernet communications and Internet protocols. Or you can choose a middle path, such as using a provided software library but designing your own circuits. This networking tutorial begins by introducing a sampling of products available for networking embedded systems. Whether or not you ultimately select one of the products described, reviewing the options can help in determining how to approach a project. Every computer in an Ethernet network must have an Ethernet controller, and there are choices here as well. This networking tutorial’s In Depth discussion describes the capabilities and operation of popular Ethernet controllers.

Selecting Components

As with any project, familiarity can make a big difference in how easy it is to get something up and running. On the software side, both C and Java are popular languages for programming networked embedded systems. If you have experience in one of these languages, it makes sense to stick with it. On the hardware side, if you have experience with a particular CPU family, it often makes sense to stay with it if possible as well. At the same time, if there is a product that suits your purpose perfectly but will take some time to master, it may be worthwhile to dig in and learn something new, especially if you can use the knowledge in additional projects in the future. This book doesn’t have room to describe every possibility, and new and updated products continually become available. For links to the latest information about the products described and others, visit Lakeview Research’s Embedded Ethernet page at www.Lvr.com.

Complete Solutions

Some products are complete solutions that provide both the hardware and program code for Ethernet and Internet communications. The hardware typically includes a circuit board with a CPU, Ethernet controller, and related components. The program code includes support for Ethernet, TCP/IP, and other Internet protocols. Beyond these basics, the options vary. Different products use different CPUs, and the type and amount of memory and I/O options vary. A product may support programming in assembler, C, Java, or a combination of languages. Some circuit boards are suitable for use in projects as-is, while others are designed mainly as development systems for projects that will eventually be moved to a project-specific circuit board. Some products may require additional investments in programming hardware and debugging tools, while others include these or enable using free software tools. The documentation and other sources of help and examples provided by a vendor or other parties can make a big difference in how easy it is to get a project up and running. For the hardware, complete schematic diagrams help in interfacing to the module and troubleshooting. For programming, some vendors make the source code available so you can examine and change or adapt the code if you wish. Others offer only the rights to use provided code in executable form. In this networking tutorial, I’ve included example programs for two popular modules that provide complete solutions: Rabbit Semiconductor’s RCM3200 RabbitCore C-programmable Module with Ethernet and Dallas Semiconductor’s DSTINIm400 Networked Microcontroller Evaluation Kit. The capabilities of the modules are similar in many ways, but each takes a different approach both in the included hardware components and in programming. The following descriptions summarize the features and capabilities of these and a selection of additional modules.

Rabbit Semiconductor RCM3200

At a glance: A fast Z80-derivative CPU with plenty of I/O, low EMI, and a complete development system, including a C compiler. Ethernet support: 10BASE-T and 100BASE-TX. Source: Rabbit Semiconductor (www.rabbitsemiconductor.com). Hardware. The RCM3200 RabbitCore C-programmable Module with Ethernet (Network article 3-1) is a circuit board that contains Rabbit Semiconductor’s Rabbit 3000 microprocessor, which is a much improved and enhanced derivative of ZiLOG, Inc.’s venerable Z80 microprocessor. The circuit board is smaller than a business card and supports a variety of I/O interfaces. The Rabbit 3000 microprocessor has seven 8-bit I/O ports. Many of the bits can have special functions, including six serial ports for asynchronous and synchronous communications and Infrared Data Association (IrDA) protocols, a bidirectional parallel port, two input-capture channels, four pulse-width-modulation (PWM) outputs, and two quadrature decoder units with inputs for optical incremental encoder modules. In addition to the I/O ports, there is an external memory bus with 8 data bits and 20 address lines. The power supply can range from +3.6V to as low as +1.8V. A counter that functions as a real-time clock has a separate power pin to make it easy to provide battery backup. The chip is available in a 128-pin LQFP (low profile quad flat pack) or 128-ball TFBGA (thin-profile fine-pitch ball grid array) package.

The Rabbit 3000 is an obvious choice for systems that must obtain Federal Communications Commission (FCC) certification or comply with other regulations that limit electromagnetic interference (EMI). The chip’s designers have gone to great lengths to create a CPU whose internal architecture and external interfaces make it easy to design systems that pass EMI tests. An article on Rabbit Semiconductor’s Web site has details. The Rabbit 3000 also has several features for applications that must conserve power. Lowering the supply voltage can reduce power consumption by 75 percent. Slowing the clock reduces power consumption as well. The CPU can switch between a fast clock (up to 54 Megahertz) and a second clock that can run at 32 kilohertz. The CPU can use the slow clock while waiting for a specified time to elapse or an event to occur, then switch to the faster clock when processing power is needed. With a low supply voltage and a slow clock, current consumption can be as low as a few hundredths of a milliampere. The RCM3200 module contains a Rabbit 3000 clocked at 44.2 Megahertz along with memory and components to support Ethernet communications. There are 512 kilobytes of Flash memory for storing programs, 512 kilobytes of fast RAM for loading code for execution, and 256 kilobytes of RAM for storing data. One of the serial ports uses a special programming cable to load firmware from a PC into RAM or Flash memory. The module’s Ethernet controller is an ASIX AS88796 3-in-1 Local Bus Fast Ethernet Controller, which interfaces to the CPU’s external data bus. The module has an RJ-45 connector for 10BASE-T and 100BASE-TX Ethernet media systems. Two headers on the bottom of the board provide access to the I/O bits and other signals. The RCM3200’s development kit includes an RCM3200 module and a prototyping board with a power-supply connector, a voltage regulator, a prototyping area, and switches and LEDs for experimenting. The RCM3200’s headers plug into sockets on the board.

The RCM3200 is one of several modules offered by Rabbit Semiconductor. If you don’t need the speed of 100BASE-TX, take a look at the RCM2100 module, which supports only 10BASE-T Ethernet. The RCM2100 contains a Rabbit 2000 microprocessor, a slower but still very serviceable CPU with the same instruction set at the Rabbit 3000. The module’s Ethernet controller is a Realtek RTL8019AS Full Duplex Ethernet Controller. The Rabbit 3000 and 2000 microprocessors are also available for use on circuit boards of your own design. Software. Rabbit Semiconductor’s Dynamic C is a complete environment for writing and editing code, compiling and linking, loading compiled code into the RCM3200’s RAM or Flash memory, and debugging (Network article 3-3). The compiler also supports in-line assembly code. For networking, Dynamic C includes drivers for the Ethernet controller and libraries that support TCP/IP communications and other networking protocols. The libraries provide support for an HTTP server, an FTP client and server, and sending and receiving e-mail with SMTP and POP3. A file system supports storing information in files in Flash memory or battery-backed RAM. Additional library modules are available, including a module that implements the open-source, real-time MicroC/OS-II operating system. An Advanced Encryption Standard (AES) module supports encrypting network data using the Rijndael Advanced Encryption Standard cipher. (See Chapter 10 for more about encryption.) Other modules support the Point-to-Point protocol (PPP) and Simple Network Management Protocol (SNMP). Source code for all of the libraries is provided. Dozens of short, well-commented example programs illustrate how to use the functions in the libraries. Two code modules perform basic functions for all Dynamic C programs. Compiled code automatically includes the Virtual Driver module, which performs initialization and timer functions. The Rabbit BIOS is compiled separately and handles startup, shutdown, debugging communications, and other basic tasks. Dynamic C loads the BIOS into the RCM3200’s memory automatically using the Rabbit 3000’s bootstrap mode and programming cable. The Virtual Driver and Rabbit BIOS are fully documented, with source code available. Dynamic C has built-in support for multitasking for tasks that each require CPU time on a regular basis.

A system may use cooperative or preemptive multitasking. In cooperative multitasking, the tasks must agree to cooperate to not use more than their share of processor time. Dynamic C achieves cooperative multitasking through the use of costatements and cofunctions. A costatement is a list of statements with a pointer that keeps track of which statement to execute next. A costatement typically functions as one statement in a list of statements that execute in sequence in a loop. Within a costatement, a waitfor control statement can test to find out if a function has completed or a timeout has occurred. If waitfor returns true, the costatement continues with the next statement in the list. If waitfor returns false, the costatement jumps to its closing brace. The next time the costatement executes, the costatement begins at the waitfor that previously returned false. In this way, the code can make its way through a series of statements without being blocked by a statement that takes a long time to execute. A waitfor statement can call any function that returns a value. In the example below, an endless for loop alternates between calling the tcp_tick() function, which performs background processing for TCP and UDP communications, and a costatement whose function is to send a datagram once per second.

   for(;;) {
   tcp_tick(NULL);
   costate {
   //wait DelaySec seconds between sends.
   waitfor(DelaySec(1));
   //send a datagram to the remote host.
   send_datagram();
   }
   }

The first time the costatement executes, the waitfor(DelaySec(1)) statement executes and saves a value that indicates the current time. The statement returns false and execution jumps to the costatement’s closing brace, then to the top of the for loop. Each time through the loop, waitfor(DelaySec(1)) executes, returning False until one second has elapsed. On returning true, execution continues with the send_datagram() statement. This statement calls the application’s send_datagram() function, which sends a datagram to a remote host. Program execution then loops back to the waitfor() statement, which restarts the delay timing. Dynamic C’s cofunctions are similar to costatements, but can accept and return arguments. Costatements and cofunctions are convenient for many applications, but it’s also possible to achieve cooperative multitasking with state-machine based programming. State machines can be useful when the program code repeatedly performs a series of tasks, but not always in the same order. A C switch statement can implement a state machine. For example, a TCP server can use a switch statement to decide what code to execute depending on the current state of a connection. Possible states might be initializing a socket, waiting for a connection, receiving a request, receiving headers, sending a response, and waiting to close a connection. Rabbit Semiconductor’s state.c example illustrates this approach.

In preemptive multitasking, each task is guaranteed processor time. There’s no need to depend on the other tasks to yield. Dynamic C’s slice statement enables preemptive multitasking by running a task for a time slice, or period, measured in units of 1/1024 second. At the end of the slice, the task suspends. If all of the tasks in a program’s main loop use slice statements, you can determine how often each task receives its slice from the total number of slices. A limitation to using slices with TCP/IP communications in Dynamic C is that all TCP/IP functionality must take place in a single slice. The MicroC/OS-II library module provides another way to achieve preemptive multitasking. The documentation for Dynamic C and the hardware modules includes an extensive series of detailed manuals. Rabbit Semiconductor’s Web site hosts a tech-support Bulletin Board. In addition, a rabbit-semi e-mail discussion list for developers is available at www.groups.yahoo.com. Another programming option for Rabbit modules is the WinIDE Integrated Development Environment from Softools, Inc. (www.softools.com). Like Dynamic C, WinIDE includes an editor, a compiler and linker, the ability to load compiled code into RAM or Flash memory, and a debugger. The Control Cross C compiler is a full Standard C compiler. Compiled code is smaller and faster than code compiled with Dynamic C.

legal notice

Our website is not responsible for the information contained by this article. Web-articles is a free articles resource.
Suggestion: If you need fresh, daily updated content for your website, feel free to use our service. Click here for more information.

Useful tools and features

Link to this article from your page    Send this article to you or to a friend
If you like this article (tutorial), please link to it from your web page using the information above.

related articles

1. The MCF5282 supports a subset of the Motorola 68000
Ethernet support: 10BASE-T The MCF5282 supports a subset of the Motorola 68000. Typical use: Applications that use Java and require speed. Source: Systronix (www.systronix.com). Hardware. The TINI isn’t the only option for Java programmers. Systronix’s JStik board (Network article 3-8) contains aJ-100 microcontroller from aJile Systems Inc. The aJ-100’s native execution of Java bytecodes results in very fast performance. The chip is base...

2. Ubicom IP2022 Wireless Network Processor
Special-Purpose Modules Ubicom IP2022 Wireless Network Processor. In addition to products that provide a complete generic system for networking, a variety of modules and chips are available to handle specific tasks. Some products can interface to just about any CPU. If you have an existing product or a CPU that you want to use, one of these modules may provide a way to add networking capability. This section describes a selection of products. Lantronix Device Server At a glance: enables any device with an ...

3. EDTP Electronics Packet Whacker
EDTP Electronics Packet Whacker At a glance: An Ethernet interface on a circuit board with headers for connecting to a CPU. Typical use: adding Ethernet to any microcontroller circuit. Ethernet support: 10BASE-T Source: EDTP Electronics (www.edtp.com) Hardware. The Packet Whacker (Network article 3-11) from EDTP Electronics is an Ethernet interface only. The circuit board contains a Realtek RTL8019AS Ethernet controller, an RJ-45 connector, two headers that bring out the si...

4. NE2000 Compatibility
NE2000 Compatibility A term you’re likely to hear in reference to program code for network controllers is NE2000-compatible. The NE2000 was an early and popular PC network interface card from Novell. The card contained National Semiconductor’s DP8390 controller. Software for systems that use the ’8390 or a compatible chip has come to be known as NE2000-compatible code. A major feature of the ’8390 is its set of internal registers. By reading and writing to the registers, a CPU can c...

5. Using the Internet Protocol in Local and Internet Communications
The protocols in the IEEE 802.3 Ethernet standard enable the computers in a local network to exchange messages with each other. In practice, most Ethernet networks also use Internet protocols such as TCP or UDP and IP. These provide defined and well-supported methods for accomplishing common tasks such as flow control and flexible addressing and routing of messages. Messages that travel on the Internet must use IP. And because TCP and UDP are designed to work along with IP, local communications that use TCP or UDP also use...

6. There are several options for obtaining an Internet connection
Technologies for Connecting There are several options for obtaining an Internet connection. A long-popular way for home users to connect to the Internet is via dial-up connections on phone lines. For higher speeds, alternatives are a Digital Subscriber Line (DSL), an Integrated Services Digital Network (ISDN) line, or a cable modem. Satellite connections are also possible. Table 4-1 compares the capabilities of the different methods. Not every connection type is available in all locations. Depending on ...

7. Every computer that communicates over the Internet must have an IP address
Static and Dynamic IP Addresses Every computer that communicates over the Internet must have an IP address, which the computer typically receives from its ISP. The IP address may be static or dynamic. A static IP address stays the same until someone explicitly changes it, while a dynamic IP address can change on every boot up or network connect (though the address typically changes only occasionally). An embedded system may store a static IP address in non-volatile memory, either within an application...

8. Obtaining and Using a Domain Name
Obtaining and Using a Domain Name After you obtain Internet access, connect your embedded system to the Internet, and configure your firewall to enable the embedded system to communicate, the system is ready to send and receive messages on the Internet. Applications running on other computers on the Internet can access the embedded system by specifying its public IP address. For example, to view a server’s home page, in the Address text box of a Web browser, you enter http:// followed by the server&rsquo...

9. Inside the Internet Protocol
The Internet Protocol (IP) helps data find its way to its destination even if the data must travel through other networks, including the many and varied networks that make up the Internet. Although it’s called the Internet Protocol, local networks can use IP as well. Many communications in local networks use IP because they use its companion protocols, TCP and UDP. This section introduces IP, including how computers obtain IP addresses, the format of IP datagrams, how IP and the domain name system help in getti...