It is time to get a good hands-on your electronic and programming skills, in parallel. Try this new venture as your hobby project. FreeRTOS is known as Real time operating system. This is rather a real time scheduler where applications can be split in to independent tasks that share full processor resources by switching them rapidly it looks like all tasks are executed in parallel. This feature is called multitasking. FreeRTOS can be downloaded from www.freertos.org/. The downloaded package contains freetos source code files, ports to specific microcontrollers and lots of sample programs.
Running RTOS on a microcontroller sounds a little wayward. And yes it is! As the task consumes a lot of memory and power, it is recommended to try this project with a large scale AVR say Atmega128 or Atmega256.
Here, the objective-of-concern is to run multiple RTOS tasks. To execute separate functions at exact timing would require separate timer or interrupt. But microcontroller cannot guarantee an interrupt for every task. But using RTOS is a good possible solution here because it allows each program to run in an endless loop. The scheduler looks after the fact that each program gets its own portion of time for processing keeping on-track the priority list.
The designer here takes up the following tasks for this project:
· Flashing Led that toggles every second
· Checking the button state
· Sending information to LCD.
The first step is to design a driver program to read button state. FreeRTOS uses semaphores to keep each task independent even if a button is pressed. Semaphore is a queue with length 1, data size 0 with which it simply stores binary data. After completing this, program for the task function is written.