In Chapter 2, some of the fundamental concepts of real-time computing were introduced, including tasks, deadlines, precedence, priority, and scheduling. We are now prepared to discuss real-time operating systems and kernels in Section 6.1. In Section 6.2, we consider a more detailed view of real-time task scheduling. Having used a simple "waiting" approachWait-based timing to scheduling periodic tasks for open-loop motor control in Chapter 5, we are now ready to understand and appreciate some of the methods that can more reliably implement real-time task scheduling: threads (Section 6.1) and interrupts (Section 6.4). The programming interface for threads and interrupts in our T1 target system is described in ie,5x.
In this chapter, we will also look more closely at the characteristics of digital circuits. In l9,ka, important ideas from digital circuits will be explored. We will then apply these to the debouncing of mechanical switches.
Mechanical switches (Section 6.7) can be used as basic sensors or as user interfaces. They present us with a challenge called switch bounce, which can be addressed via a digital circuit. We will use this as an opportunity to deepen our understanding of digital circuits in Section 6.8.
mr explores how to implement and apply threads and external interrupts on the target computer. During the development stage of our motion controller design, we will use a mechanical switch to trigger a task via an interrupt, so we will also implement a switch debouncing circuit in Lab Exercise 6.