This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TIMER_A PROBLEM

I try to use timer_A to generate a PWM. And I choose Timer_A's OUTMOD7 to do this, when timer count to CCR1, it reset,my problem is ,which point is reset? is inside which register?How can I read and use the info to control other parts?

Thx.

  • You said you choose Timer_A's OUTMOD7 to do this. Why? Which point do you want to reset? Is that what OUTMOD7 does? If so, OUTMOD7 is the right choice. If not, you should not have chosen OUTMOD7.

     

     

  •  So u mean I should select the point to be set/reset, but how to select? using PxSEL ? Sorry I'm a completely green hand..

  • In a double-action output mode, the first action happens when TAR counts to the value in TACCRx, the second action happens when TAR counts to TACCR0 (timer in cont mode) or when it rolls over to 0 one tick after reaching TACCR0 (timer in up mode).

    PxSEL just activates teh output of the CCRx unit to a port pin (but the generated signal is available internally without that, e.g. for triggering the ADC by a timer signal)

    FU WEN said:
    I'm a completely green hand

    All of us once were :)

     

**Attention** This is a public forum