Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: In this example code, why does the TACCR register is added a value? It's is the coutinuous mode.

$
0
0
1) The TAIFG (TIMER0_A1) interrupt fires when TAR rolls over. The CCR0:CCIFG (TIMER0_A0) interrupt fires when TAR==CCR0. 2) Two separate functions: The CCR0 interrupt always fires when TAR==CCR0. If running in Up mode, it also resets TAR. 3) but the difference between these values is always 50000 clocks, which gives a fixed span between (CCR0) interrupts. Doing this allows using the timer for multiple things. If you need Continuous mode for other reasons, this technique provides a semblance of the Up mode behavior.

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>