Timer_A, Toggle P1.0, CCR0 Up Mode ISR, DCO SMCLK

//  Description: Toggle P1.0 using software and TA_0 ISR. Timer_A is
//  configured for up mode, thus the timer overflows when TAR counts to CCR0.

1 void Timer0_Init(void)
2 {
3 
4       CCTL0 = CCIE;                             // CCR0 interrupt enabled
5       CCR0 = 5000;                              //frequency SMCLK/5000*2;
6       TACTL = TASSEL_2 + MC_1;                  // SMCLK, upmode
7 }
void Timer0_Init(void)

相关文章:

  • 2021-08-30
  • 2021-11-08
  • 2021-04-05
  • 2022-12-23
  • 2022-02-08
  • 2021-11-28
猜你喜欢
  • 2022-12-23
  • 2022-02-09
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2021-11-26
相关资源
相似解决方案