&nbsp &nbsp &nbsp The sCo-Pilot project was completed in May 1999. It
was awarded 1st place in Circuit Cellar's Design99 contest.

sCo-Pilot Project Abstract

&nbsp &nbsp &nbsp The unprecedented functionality of modern digital oscilloscopes (as well as other test equipment) is unquestionable. Many of the modern digital scopes are eclipsing their analog counterparts in applications ranging from digital systems debug to RF design. However, the advantages of many of these advanced capabilities can be somewhat negated by cumbersome user interfaces. Sometimes there are not enough buttons (function keys) on the scope, or quantities intuitively associated with knobs require multiple keystrokes to adjust.

&nbsp &nbsp &nbsp As the name implies, the sCo-Pilot is a device intended to function as a "copilot" for operating an oscilloscope. Targeted at the Tektronix THS series of handheld digital oscilloscopes, the sCo-Pilot functions as a "copilot" between the user and the scope. In this capacity, the sCo-Pilot provides the following features:

Non-invasive human interface enhancement. All interfacing is accomplished via the scope's RS-232 port. No modification to the scope is necessary to use the sCo-Pilot.

At-a-glance LED indication of current instrument status. This supplements the lack of screen indication on the THS series.

&nbsp &nbsp &nbsp Although the sCo-Pilot project was designed specifically for use with the Tektronix THS series, it is important to emphasize that the sCo-Pilot concept could be applied to many other digitally controlled instruments.

&nbsp &nbsp &nbsp The sCo-Pilot utilizes the RS-232 instruction set of the THS series to translate user actions into scope commands. On the surface, this task may appear to be fairly trivial. However, the command structure (syntax) of the THS series is not very conducive to embedded control. It requires floating point capability and unique handling for almost every different command. Additionally, the command processor needs to be fast enough to perform rudimentary floating point operations while providing the user with instant operational feedback. These obstacles were surmounted through the use of the Motorola 68HC908GP20 (herein after referred to as the 'GP20). With its high operating speed (203ns instruction cycle @ 19.660MHz) and vast FLASH program space (20K bytes), the 'GP20 made implementation of the sCo-Pilot practical.

&nbsp &nbsp &nbsp The sCo-Pilot system consists of two major components...namely the 'GP20 and an EEPROM based CPLD - the Vantis MACH211 64 macrocell CPLD. The 'GP20 handles all of the user interface and command processing while the CPLD functions strictly as an SPI-based I/O expander to drive 29 of the sCo-Pilot's 31 status LEDs. The firmware for the CPLD was written in ABEL and compiled using the Vantis starter software. This component was selected based on the availability of sample parts and development tools (the starter kit was already on hand). Likewise, all 'GP20 software was written in assembly, using P&E Micro's free 'GP20 utilities, to minimize the cost of development tools. There was no budget (or time) for a C compiler in this project.

&nbsp &nbsp &nbsp Most of the development effort went into the 'GP20 software. As mentioned earlier, interfacing an embedded CPU to the THS scope is not straight forward. To address this issue, the software was written in a "state machine" style in which the CPU continuously executes a main loop whose functions are state machines based on user commands. This style of code structure enables each different action (button press or knob turn) to have its own custom state machine which is independent of any others - thus eliminating many if-then comparisons and exceptions to rules.

&nbsp &nbsp &nbsp When the user presses a button, a state machine handler for that button becomes part of the main loop. The execution of the state machine "locks-out" the execution of all others until the currently running state machine is finished. This prevents multiple state machines from running simultaneously and confusing the scope. However, multiple button presses are "queued" and executed when the previous button handler is complete.

&nbsp &nbsp &nbsp The main loop runs continuously with a nominal loop time of about 250µs. This high speed loop allows the incoming 9600BPS serial data to be polled (through the SCI) rather than interrupt driven. The only active interrupt is the timer interrupt - which is used to keep real time by providing a "tick" every millisecond. Other activities performed as part of the main loop include updating LEDs, debouncing keys, reading knobs, and counting idle time. If the sCo-Pilot is idle for a given amount of time, it automatically polls the scope for current status information. This effectively re-synchronizes the sCo-Pilot with the scope in case the user changed something on the scope's front panel.

&nbsp &nbsp &nbsp Operationally, the sCo-Pilot project was successful in providing human interface enhancement to the THS scope. The sCo-Pilot has eliminated the frustration and confusion of using the scope's native "soft keys" to cycle through hierarchical menus. Single button access to commonly used features, knobs (with acceleration) for adjusting analog quantities, and LED status indication have dramatically increased user efficiency and usability of the THS scopes.