Rtx51 Tiny
Rtx51 Tiny
RTX51 Tiny is a real-time operating system (RTOS) which allows you to create applications that
simultaneously perform multiple functions or tasks. This is often required in an embedded
application. While it is certainly possible to create real-time programs without an RTOS (by
executing one or more functions or tasks in a loop), there are numerous scheduling, maintenance,
and timing issues that an RTOS like RTX51 Tiny can solve for you.
A real-time operating system (RTOS) allows flexible scheduling of system resources, like the
CPU and memory, and offers communication between tasks. RTX51 Tiny is a powerful RTOS
that is easy to use and that works with all 8051 derivatives.
RTX51 Tiny programs are written using standard C constructs and compiled with the Keil C51 C
Compiler. Additions to the C language allow you to easily declare task functions without the
need for complex stack and variable frame configuration. RTX51 Tiny programs require only
that you include a special header file and link the RTX51 Tiny library into your program.
The following software applications are required to use RTX51 Tiny:
C51 Compiler:
The Cx51 Optimizing C Compiler is a complete implementation of the American
National Standards Institute (ANSI) standard for the C language. The Cx51 Compiler is
not a universal C compiler adapted for the 8051 target. It is a ground-up implementation,
dedicated to generating extremely fast and compact code for the 8051 microprocessor.
The Cx51 Compiler provides you with the flexibility of programming in C and the code
efficiency and speed of assembly language.
A51 Macro Assembler
Development Tools
A51 Macro Assembler
BL51 Linker/Locater
LIB51 Library Manager
while (1)
/* repeat forever */
{
check_serial_io ();
/* check for serial input */
process_serial_cmds (); /* process serial input */
check_kbd_io ();
/* check for keyboard input */
process_kbd_cmds (); /* process keyboard input */
adjust_ctrlr_parms (); /* adjust the controller */
counter++;
}
/* increment counter */
}
In this example, each function performs a separate operation or task. The functions (or tasks) are
executed in order, one after another.
Scheduling starts to become an issue as more tasks are added. For example, if the
process_kbd_cmds function executes for a long time, the main loop may take too long to get
back around to the check_serial_io function and serial data may be lost. Of course, the
check_serial_io function may be called more often in the main loop to correct this issue, but
eventually this technique will not work.