Multitasking Real-Time Operating System

You wouldn't want to have to load an operating system into your desktop computer each time you turn it on, and the same holds true for embedded computers. Importantly, all of Mosaic's controllers incorporate a full-time, on-board operating system called QED-Forth. QED-Forth is an interactive programmable macro language encompassing a real-time operating system (RTOS), object oriented graphical user interface (GUI) toolkit, debugging environment, and a comprehensive set of pre-coded device drivers.

The RTOS implements cooperative and time-sliced multitasking, provides resource locking and mailbox services, implements an efficient paged memory manager, traps and reports errors, handles interrupts, and autostarts your application at system startup. By following some simple coding practices as shown in the documented coding examples, you can take advantage of these sophisticated features without having to worry about the implementation details.

These built-in functions make it easy for you to get the most out of your embedded controller's computational and I/O capabilities. You can fully program your controller using only the QED-Forth programming language, or you can program it using only the C language - all of the operating system's functions are accessible using either language.

Programming is a snap using the interactive debugger and multitasking executive. The multitasker allows conceptually different functions of your application to run independently in different tasks while accomplishing their duties in a timely fashion.

An instrument control program can typically be broken down into a number of tasks, each of which performs a distinct function. For example, many programs perform data acquisition, computation, communications, control, and user interface functions.

Grouping these functions as separate modularly coded tasks has two key advantages.

First, each task may have its own timing behavior. For example, you may want to collect data ten times per second, print out average readings once per second, and scan the touchpad for events as often as possible to provide a responsive front-panel user interface.

By coding separate tasks for data collection, printing, and user interface management, the RTOS ensures that each task uses a minimum of processor time without running inefficient timing loops.

Second, task-oriented coding results in clean modular source code that is easy to debug and maintain.

All Mosaic embedded controllers incorporate paged memory to greatly expand the available memory space beyond the 64K native address range of the processor. The IDE provides templates that set up ample memory maps for your code (in non-volatile flash memory) and data structures (in RAM). The real time operating system seamlessly handles page changes at runtime, so you can treat the memory as contiguous.