Time-Oriented Task Manager

…for 8-bit PIC Microcontrollers

For many new embedded applications, an 8-bit MCU is just right. Pedro
shows how to build a time-oriented task manager using Microchip’s PIC
16F628A 8-bit microcontroller.

By Pedro Bertoleti

Microcontrollers are everywhere. From a simple remote control to an advanced car embedded system, microcontrollers surround us all. But while an 8-bit microcontroller is a relatively simple device, the software on them can get more sophisticated as more functionality is added to embedded systems. One of the most interesting advances in software technique is managing tasks. That involves enabling a microcontroller to execute several scheduled tasks, ensuring periodic and precise time execution. Here, we will examine how to implement a time-oriented task manager for a simple microcontroller—in this case, a Microchip 8-bit PIC microcontroller.

A graphic representation of a time-oriented task manager and its tasks

A graphic representation of a time-oriented task manager and its tasks

A good place to start is to ask: What is a task? A task is a part of a software program that’s dedicated to do something exclusively. In other words, a task is a piece of software that can be implemented and executed as an independent software program. Take, for example, an embedded system that has to blink an LED, send something through the UART interface and check an input’s state. Each one of these activities can be defined as a task. In a general way, each function of an embedded system can be defined as a task. A time-oriented task manager is a piece of software that performs these three main activities:

  • Execute tasks periodically
  • Execute tasks in the amount of time specified for them
  • Ensure time-precision measurement for the execution of tasks

In terms of coding, the time-oriented task manager and the tasks are different parts of the same software program. ….

Read the full article in the September 326 issue of Circuit Cellar

Not a Subscriber yet? Become one today:


Or purchase the September 2017 issue at the  CC-Webshop