OS8 - RTOS for 68HC08 & 9S08
OS8 is a set of collaborating modules for the 68HC08 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:
- Less overhead
- A simpler interface
- A smaller memory footprint.
OS8 is based on field-proven code, which is being used in real-world applications with excellent results and has been optimized for the HC08/9S08 CPU instruction set capabilities. For those familiar with OS11, OS8 is a subset of OS11 lacking only those modules that require an external data bus that currently isn’t available for HC08/9S08 MCUs but the capabilities of the existing modules are equivalent in function and power to their OS11 counterparts.
NOTE TO OUR CUSTOMERS: Current version is 1.06. Request your free update from os8@aspisys.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 is expected to continuously evolve 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 a certain file in the beginning of your programs, then use a set of simple rules for writing your code in such a way that it doesn't conflict with the RTOS. Here's what you get:
- 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 MTIM (or TIM/TBM, if MTIM not available) interrupts and optionally allows for delays based on them for better accuracy. 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). With v1.06 you can use any interrupt of your choice (such as RTI, etc.)
- MESSAGES.MOD is a simple queued messaging module to provide simple IPC for MTOS based applications. Send one-byte messages to a specific or any task. Receive message from specific or any task. Check if a message is waiting.
- 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: [1] Set the transmitter and receiver to different bps rates, [2] 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). SCI_INT.MOD is capable of optionally recognizing 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.
- 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.
- MEMDUMP.MOD for display of memory dumps one page at a time.
- 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).
- 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 10-bit A/D and converting to 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.
- Practically all calls in all modules are coded fully re-entrant for safe use under the MTOS.
- Documentation in PDF.
- Example usage code.
- We expect more modules to be developed in time. Previous customers will be entitled to free updates as they become available.
- The ASM8 assembler (Dos, Win, Linux-386) registered to your name.
ASPiSYS
Design and Development of Electronics and Software Systems