Jump to content

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

Recommended Posts

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.








Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...