Project 1—Using Cooperative Multitasking
This is a simple project demonstrating how cooperative multitasking can be implemented easily using the C language. This is an example of an event counter with two-digit seven-segment LEDs. The project counts external events and displays the count on the LEDs. The following tasks are used in this project:
Task 1 (REFRESH_COUNT): This task refreshes the seven-segment LEDs every 3 ms and displays the current count.
Task 2 (EVENT): This is the event counter task. An event is assumed to occur when a push-button switch goes from logic 1 to logic 0.
Task 3 (CLEAR_COUNT): ...
Get PIC Microcontroller Projects in C, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.