Chapter 8 – Timers
暂无分享,去创建一个
Publisher Summary
MSP430, like all other microcontrollers provide a range of timers. All devices contain two types of timers and some have five. Each type of timer module works in essentially the same way in all devices. Timer_A is identical in almost all MSP430s, for instance, except that a few have a different number of capture/compare channels. This chapter deals with various such kinds of timers. The watchdog timer is included in all devices (newer ones have the enhanced watchdog timer+). Its main function is to protect the system against malfunctions but it can instead be used as an interval timer if this protection is not needed. Basic timer1 is present in the MSP430x4xx family only. It provides the clock for the LCD and acts as an interval timer. Real-time clock is the timer in which the basic timer has been extended to provide a real-time clock in the most recent MSP430x4xx devices. Subsequently, Timer_A is provided in all the devices. It can handle external inputs and outputs directly to measure frequency, time-stamp inputs, and drive outputs at precisely specified times, either once or periodically. Finally, Timer_B is included in larger devices of all families. It is similar to Timer_A with some extensions that make it more suitable for driving outputs such as pulse-width modulation. Against this, it lacks a feature of sampling inputs in Timer_A that is useful in communication.