Encoder Front Page
SRS Home | Front Page | Monthly Issue | Index
Google
Search WWW Search seattlerobotics.org

The Prez Sez

Kevin Ross

This month, we are holding our Robothon event on May 17th, 1997. Check out the front page of the encoder for more information. I am looking forward to seeing lots of people and plenty of robots.

The ARC Development system

A small group of SRS members have been participating in a beta program for the ARC development system being offered by Newton Research Labs. This development system is currently targeted at the 68332 Microcontroller but plans are in the works for several other processors. ARC is a very feature rich development system that would require quite a write-up to explain in detail. Such a write-up exists in the online manual on The ARC C Development Environment webpage. I would like, however, to give a brief overview to the system.

Major features of the ARC system are the kernel, the ARC command line interface, and the ARC software libraries.

The ARC system provides a small operating system kernel that runs multiple programs at once. Having the ability to multi-task can make many software designs much more elegant and easier to manage. Integrated into this kernel are communications, memory management, download facilities, a program loader, and of course a scheduler for handling the multi-tasking of programs.

Running the ARC system consists of two major parts: The Host and the Target. The majority of the ARC system runs on your Host (Windows/NT, Windows/95, or Unix variations are available). ARC connects to the Target using a serial cable. It combines a command line interface allowing you to load, unload, and run programs as well as several functions that allow you to examine the current state of the target system. For example, you can list which processes are running, which communication channels exist, and you can kill or restart programs from RAM or EEPROM. The command line interpreter is a great feature because it makes it quite easy to query the status of your controller.

One really cool feature of the communications facility is the ability to have multiple I/O streams. The ARC kernel allows you to open a named device, which establishes a new channel to the ARC host program. Each channel to the host system creates its own terminal window. Therefore, if you have multiple programs running on the target system, each can have its own output screen on the host. This allows you to put in debugging statements in each process and for them to come out in a manageable form on the host side. All of this communication is multiplexed over the same serial line. This feature alone is worth its weight in gold.

The ARC system really aids the user who is trying to program the target system. The basic user process is to write a C based program on the host PC, compile it on the PC, download the object file to the target system, and run it. To make these steps easier, the ARC system automates many of these steps into a single command. You can tell the ARC command line interface to 'ramload myprog.c'. ARC will compile the program, and assuming no errors occurred, automatically download the code to the target systems RAM. Likewise, there is a romload command for burning EEPROM. Using the command line interface, you can download and run programs very quickly.

In addition to the basic operating environment, the ARC development system provides a full set of C runtime libraries. These routines can really knock development time off your project. Memory management, stream I/O, formatted I/O, and several other major packages are available in the standard ARC libraries. In addition, a new package for dealing with the 68332 Timer Processing Unit (TPU) makes many complex timing operations as easy as a subroutine call.

Using the ARC system

I have been using the ARC system in conjunction with a Vesta Technologies 68332 development board. I have been trying out several different features of the controller, and of course checking out the depth of the ARC development system. I have been running the ARC system on a Windows/NT based machine.

So far, I have been very impressed by the performance of the ARC system. It is pretty solid. I have yet to see it crash, although the GNU compiler did have a problem choking down some C++ code I threw at it. The library routines provided with ARC for dealing with the 68332 TPU have been working well. The TPU system is capable of generating nice variable length square wave signals without software overhead. Each of the 16 channels is independently addressed and setup, so you can control as many as 16 servo motors. Since the pulses are programmable independently, you can set the duration and frequency for each without relying on a main timer to wrap. You can also assign each channel as a timer output or a timer input. There are also functions for doing wheel encoders!

I have found that the ability to run the servos on a 20 ms cycle instead of the 32ms cycle that the 68HC11 provides has a noticable effect on the stability of the servos. I have always noticed that the servos 'twitch' a little bit when force is applied to them. At 20ms, the twitch is much less noticable. I can see this as being very useful with the robotic arm I am working on.

In another experiment, I found that the software for doing sonar timings with a Polariod ranging module was much easier to write using the ARC system. I was able to start a seperate process to handle the gathering of range information, using the TPU system. On the 68HC11, I had written a similar routine that required the use of two interrupt routines, and required a polling mechanism to watch for and restart the next reading. The new routines work much better, and will be easier to incorporate into my design.

By far the most impressive part is how well all the parts fit together. Having the compile/download steps be integrated is nice enough, but also having the command line ability to monitor the processes on the target system is really cool. The multiple communications channels are also extremely useful.

Conclusion

I think the ARC development system is well worth a look for anyone who is serious about trying to develop a complex project using a 68332. It is stable, has lots of features, and a very good value for what Newton Labs is charging for it. Have a look at their web site: Newton Research Labs