0% found this document useful (0 votes)
432 views

Rtx51 Tiny

RTX51 Tiny is a real-time operating system (RTOS) for 8051 microcontrollers that allows programs to perform multiple tasks simultaneously through flexible scheduling of CPU and memory resources. It uses standard C programming with additions to easily declare task functions. Programs are compiled with a C compiler and linked with RTX51 Tiny's library. RTX51 Tiny solves scheduling, maintenance, and timing issues that can occur when trying to perform multitasking without an RTOS.

Uploaded by

Shraddha Saran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
432 views

Rtx51 Tiny

RTX51 Tiny is a real-time operating system (RTOS) for 8051 microcontrollers that allows programs to perform multiple tasks simultaneously through flexible scheduling of CPU and memory resources. It uses standard C programming with additions to easily declare task functions. Programs are compiled with a C compiler and linked with RTX51 Tiny's library. RTX51 Tiny solves scheduling, maintenance, and timing issues that can occur when trying to perform multitasking without an RTOS.

Uploaded by

Shraddha Saran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

INTRODUCTION

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

Support Microcontrollers Description


Development Tools for classic 8051.
Includes support for 32 x 64KB code banks.

AX51 Macro Assembler


Development Tools for classic and extended 8051 versions (NXP
LX51 Extended Linker/Locater
80C51MX, Dallas 390, etc.) Supports up to 16MB code and xdata
LIBX51 Library Manager
memory.
A251 Macro Assembler
L251 Linker/Locater
LIB251 Library Manager

Development Tools for the 251.

BL51 Linker or LX51 Linker


The BL51 Linker/Locator creates an absolute object module by linking together object
modules created using the Keil A51 Assembler, C51 Compiler, Intel ASM-51 Assembler,
and Intel PL/M-51 Compiler. Object modules created by these tools are relocatable and
cannot be directly executed (even if they consist of only one source module). They must
be linked and converted into an absolute object modules using the linker.

REAL TIME EXAMPLE


void check_serial_io_task (void) _task_ 1
{
/* This task checks for serial I/O */
}
void process_serial_cmds_task (void) _task_ 2
{
/* This task processes serial commands */
}
void check_kbd_io_task (void) _task_ 3
{
/* This task checks for keyboard I/O */
}
void process_kbd_cmds_task (void) _task_ 4
{
/* This task processes keyboard commands */
}
void startup_task (void) _task_ 0
{
os_create_task (1); /* Create serial_io Task */
os_create_task (2); /* Create serial_cmds Task */
os_create_task (3); /* Create kbd_io Task */
os_create_task (4); /* Create kbd_cmds Task */
os_delete_task (0); /* Delete the Startup Task */
}
MULTI TASKING EXAMPLE
void main (void)
{
int counter = 0;

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.

You might also like