Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

Code examples for timer A up count mode, with output mode 6 then 7?

$
0
0

I have been looking for some code snippets of the timer A up count mode

 

Setting TA0CCR0 = 512 for 1 sec with the crystal hooked up and /8

 

 

Input low to start timer start timer in mode 6 toggle/set

 

count ++ to get two seconds

 

toggle output when condition reached

 

output to start timer again in mode 7 reset/set  (or use another timer if I have to)

 

count CCRO 60 times for 60 seconds

 

reset output

 

Or I think I might be able to use

 

output mode 2 toggle/reset,

 

count 2 periods

 

output high

 

count 60 periods

 

reset output

 

 

I can not seem to find the code to set the timer modes to try this.  I have dug through slap113 (timers in depth)  and slau144j  which helped me get to this line of thinking, but I can not find code snippets on the modes to get going on it.

 

 

 

THANKS!!!

 

 

 


Viewing all articles
Browse latest Browse all 2077

Trending Articles