Uses of the Timer Subsytem on the HC12
The timer subsytem can be used for the following functions:
- Periodic interrupts (Timer Overflow Interrupt or Real Time Interrupt
- Determining the time difference between two events (Input Capture)
- Making event happen at a regular rate (generating a square wave of a
particular frequency) Output Compare
- Generating a Pulse Width Modulated signal using Output Compare
- Can use a single Output Compare function - requires two interrupts per
PWM period
- Can use Output Compare function OC0 - OC6 together with OC7 -
no interrupts required, but need to adjust TCNT rollover time to length of PWM
period. Can configure up to 7 PWM channels, but all PWM channels will have
same frequency.
Bill Rison
2000-02-28