Professional Documents
Culture Documents
MSP430 Clock Timers PDF
MSP430 Clock Timers PDF
z MSP430 Timer A
z Timer A examples
MSP430 Basic Clock Module
z Clock Sources:
z LFXT1CLK : Low-frequency/high-frequency oscillator
z XT2CLK : Optional high-frequency oscillator
z DCOCLK : Internal digitally controlled oscillator (DCO)
z A 16-bit counter
z 4 modes of operation – Stop, Up, Continuous, Up/Down
z 3 capture/compare registers (CCRx)
z 2 interrupt vectors – TACCR0 and TAIV
Modes of Operation: Up Mode
Modes of Operation:
Continuous Mode
Modes of Operation:
Up/Down Mode
Timer_A Interrupt Vectors
z TACCR0 interrupt vector for CCIFG of CCR0
z TAIV interrupt vector for TAIFG and CCIFGs of CCR1,CCR2
CCIE0
CCIFG0 TACCR0
CCR0
Interrupt Vector
CCIE1
CCR1 CCIFG1
TAIV
CCIE2
CCIFG2 TACCR0
CCR2
Interrupt Vector
TAIE
TAR Overflow
TAIFG
Timer_A Registers
z TACTL, Timer_A Control Register (PART 1)
z TACTL, Timer_A Control Register (PART 2)
z TACCTLx, Capture/Compare Control Register
z TAIV, Timer_A Interrupt Vector Register
Example 1
Continuous Mode
Output pin P6.0 with toggle rate = 32768/(2*50) = 328Hz
#include "include/include.h"
#include "include/hardware.h"