OS8 - RTOS for 68HC08 & 9S08
OS8 is a set of collaborating modules for the 68HC08 or 68HCS08 (HCS08 or 9S08) CPU that provides OS-called (or SWI / FCB for users of third-party assemblers) functions that allow, among other things, for simple to use pre-emptive (optionally settable as co-operative) multitasking. Full assembly-language source-code is available in case you want to modify for your needs. It is sold separately (check our pricelist) and is free of royalties for object code use for either personal or commercial projects. Not a fully blown operating system in the sense that rarely used "features" that many people find confusing yet unnecessary for most applications are not present saving precious memory. But make no mistake, this is a very powerful RTOS.
OS8 does provide most of the functionality of larger RTOS but with:
- Much less overhead (written entirely in optimized assembly language)
- A simpler interface
- A smaller memory footprint (both Flash and RAM).
OS8 is based on field-proven code, which is being used in real-world 24/7 applications with excellent results. It has been optimized for the HC08/9S08 CPU instruction set capabilities. (For those familiar with OS11, OS8 is now a superset of OS11 while lacking only those modules that require an external data bus that currently isnít available for HC08/9S08 MCUs.)
NOTE TO OUR CUSTOMERS: Current version is 1.25. Request your free update from email@example.com. You must include the registration name found in your copy of ASM8 that came with OS8 to verify your request.
Each function is fully documented and there is also example code in source form to demonstrate how to use the various system calls. OS8 continuously evolves and registered users will be eligible to receive free updates as they become available. To use with most systems all you have to do is #INCLUDE the needed modules near the beginning of your program, then use a set of simple rules for writing your code in such a way that it doesn't conflict with the RTOS.
OS8 includes the following functionality (and more):
- MTOS.MOD is a pre-emptive (optionally settable as cooperative) round-robin multitasker. You can add/run/restart/suspend/resume/kill/waitfor from 1 to 255 tasks. You can also give up remaining time slice. In pre-emptive mode, it uses whatever clock source is available for interrupts (or can be explicitly called by user-defined clock source) and optionally allows for delays based on them for better accuracy. Nested semaphore locks are available for tasks to gain exclusive access to resources without disabling interrupts. Message passing is available through a separate module. Up to 255 dynamically assigned concurrent tasks can be executing at any one time. Static and dynamic task slots (dynamic allows for an infinite number of thread-like tasks to share any available task slots).
- MESSAGES.MOD is a simple queued messaging module to provide simple IPC for MTOS based applications. Send byte message streams to a specific or any task. Receive message from specific or any task. Check if a message is waiting. Useful to implement pipes.
- BITS.MOD provides functions for setting/clearing bits by position in multi-byte variables, rotating multiple bytes a number of bit positions, etc.
- SCI_TX.MOD and SCI_RX.MOD provide an interrupt-driven buffered SCI with hardware bps accuracies using one IC (RX) and one OC (TX) pin and corresponding TIM interrupts. These modules allow you to:  Set the transmitter and receiver to different bps rates,  use truly any bps rate within the limits of the CPU speed, without needing to match a specific crystal frequency. Will also work on the lower-end SCI-less parts, like the JL/JK/QT/QY.
- SCI_INT.MOD with support for one or both SCIs of the MC9S08GB60 and compatibles (e.g., MC9S08QG8, MC9S08QE128). SCI_INT.MOD is capable of optionally recognizing hardware (RTS/CTS) and/or software flow control (X-On/X-Off).
- FLASH.MOD (QT/QY/JK/JL) and FLASH_GB.MOD (GB60/QG8/etc.) flash programming routines.
- QUEUE.MOD provides a queue data structure.
- STACK.MOD provides a stack data structure (not related to the hardware stack).
- CLOCK.MOD and DOW.MOD provide a software real-time clock with date, time, and day-of-week calculation.
- IO.MOD provides a unified Input / Output subsystem for SCI(s), LCD, A/D KEYBOARD or user-defined I/O.
- COMMAND.MOD Command Processor. This subsystem lets you write subroutines that are called automatically when the user gives the appropriate commands via the SCI. Commands are parsed and executed automatically. Commands may even ask for whatever command-line arguments they require. It is usually scheduled as a separate task to allow (even in parallel with other controls) unobtrusive terminal control of your application.
- MEMDUMP.MOD for display of (optionally page) memory dumps.
- LCD.MOD provides a full 1x8, 2x16, 2x20, 4x20 (etc) LCD driver (4-bit mode to save pins). Simple OS-call interface. Define a couple or so EQUs in your application to re-assign pins to your choice of MCU port(s).
- GLCD.SUB provides a full 128x64 monochrome (KS0108) Graphic LCD driver. It has functions for plot, line, rectangle, circle, area fill, normal font, double-height font, double-width font, double-height & double-width font (with optional auto smoothing -- no need to create separate large font). It also has several modes: NORMAL, ERASE, XOR, WIDE, TALL, SMOOTH, NOSPACES (can be used to load images faster than plotting them). Very simple (optionally, macro-based) interface. (Being written 100% in assembly, it is extremely fast.)
- READ.MOD/INTEGERS.MOD for reading or printing (ASCII or hex string) single or double-byte integers.
- S19_TINY.MOD for loading S19 files into Flash.
- MMC.MOD for reading/writing to MMC cards (no filesystem).
- STRINGS.MOD provides calls for basic string manipulation (e.g., Insert, Delete, Length, etc.)
- ADTEMP.MOD for reading internal temperature sensor (e.g., QG8) using 8/10-bit A/D and converting to Celsis/Fahrenheit degrees.
- CONFIG.MOD for saving/loading saved or default configuration from internal Flash.
- ADKEYS.MOD for reading from an A/D (single-pin) based keyboard.
- BIGMATH.MOD for minimum to very big length unsigned math operations (e.g., multiply from 1-byte to 127-byte long numbers), shift left/right, rotate left/right, copy, zero, test for zero, add, subtract, divide, compare, in-place multiply by any byte or the value 10, convert binary to ASCIZ, convert ASCIZ to binary (all these for up to 255-byte long numbers), replace leading zeros with spaces, trim leading zeros/spaces (unlimited). A very handy utility for 'serious' computations.
- Latest versions of many library modules (some of which are already freely available, such as the stack-based 8-bit to 64-bit math).
- Timer for queued timed event execution (can be used for one shot or repeated executions.)
- Practically all calls in all modules are coded fully re-entrant for safe use under the MTOS.
- Documentation in PDF.
- Example usage code.
- Modules are constantly improved and more modules are developed over time. Previous customers will be entitled to free updates as they become available.
- The ASM8 assembler (Dos, Win, Linux-386) registered to your name.
- One year 'unlimited' email/phone tech support (for contract customers only).
Design and Development of Electronics and Software Systems