RTOS

RTOS Task switching based on priority using LCD – CodesExplorer

Prerequisites:-

The prerequisite for this program you should have knowledge of Simple LCD interfacing on ARM LPC2148. You can visit this post to get the program, algorithm about LCD interfacing.

 

Introduction:-

In this post, We will be dealing with RTOS(Real-time Operating System) Program to switch the tasks based on the priorities.At first the OS is initialised with Task1 as highest priority and later task2 is created. For simplicity only two taskes are used in this program.Before completion of Task1 the priority of task2 is increased.Similarily in task2 before completion the priority of task1 is set to high.It continues like this  Task1 —->  Task2  —-> Task1 —> Task2 and so on.Task1 will display the message on first line of LCD and Task2 will display message om second line of LCD.

Algorithm:-

  1. Start.
  2. Declare Task1,Task2.
  3. Call the task1.
  4. Assign highest priority to task1,next priority to task2.
  5. Wait till the completion and jump to task2.
  6. Loop continues.
  7. End.

 

Code:-

 

Download the Code:
 To Download the Complete Project click on the link below:
Tasking switching LCD Program Download

One thought on “RTOS Task switching based on priority using LCD – CodesExplorer”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.