Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Table of Contents
Introduction
What you must know
What you will need
Definitons
Sequential Execution
Cooperative Multitasking
NAOS Tasks
Finite State Machines
It's All About Timing
Multitasking = Tasks + Timing
kTimer's Math
A Second Task
Apendix A: Source Code
DJ_coop2.c
multiCompiler.h
Apendix B: Hardware
OK I could constantly poll the button, but I would prefer to implement it using a real time system.
I agree. But I am not sure it would buy him much more then polling.Connect your button to the interrupt pin and service it from the interrupt routine.
But I am using a 4*4 matrix keypad so this would be difficult
I agree. But I am not sure it would buy him much more then polling.
There is no need for an RTOS and the only interrupt I would implement would be for multiplexing a display (not required in this case) and for timing purposes. I would simply read the keyboard every 10mS and execute the required code. Why would any key require priority? The code execution should be faster than you can press keys and so the Clear button should get acted upon immediately.