O'Reilly logo

Microcontroller Programming and Interfacing Texas Instruments MSP430 by Daniel J. Pack, Steven F. Barrett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

173
CHAPTER 6
Timer Systems
Objectives: After reading this chapter, the reader should be able to
Explain clock signal generators available for the MSP430
Describe how each clock signal generator is selected as the signal source for the three main
MSP clock sources
Configure the MSP430 clocks to minimize power usage
Illustrate the use of the Watchdog timer
Explain the Real-time timer
Program capture and compare subsystems to interface with external devices
Write basic programs using the timer subsystems (Watchdog, real-time clock, and cap-
ture/compare subsystems) and their interrupt modules
6.1 INTRODUCTION
One of the main reasons for the proliferation of microcontrollers as the brain of embedded systems
is their ability to interface with multiple external devices such as sensors, actuators, and display units
among others. In order to communicate with such devices; however, microcontrollers must have
capabilities to meet time constraints enforced by those external devices. For example, an actuator
which is controlled by a servo motor requires what is called a pulse-width-modulated signal with
precise timing requirements as its input while a communication device may need a unique pulse with
a specified width to initiate its process. In other applications, microcontrollers need to capture the
time of an external event or distinguish periodic input signals by computing their frequencies and
periods. To meet these time constraints, embedded systems must have a fairly sophisticated timer
system to generate a variety of clock signals, capture external event capabilities, and produce desired
output time related signals. The goal of this chapter is to address these capabilities of MSP430. We
first present the clock systems of MSP430 followed by the watchdog clock, basic timer, real-time
clock, input capture, and output compare timer systems.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required