This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PWM Generation with CAPCOM2 in Mode1

Hello

In the User Manual of C164CI is shown a way to use
CAPCOM2 in MODE 1 to create PWM like signal (at P1H.4).
(Two timer - Register(CC24) matches per period).

Therefore the value in register CC24 had to be updated while the
timer(T7) runs upwards.

This means, when the first match(Interrupt) is recognized, CC24 had do be reloaded quickly with a new value, witch should be bigger then the old one.
Then the timer runs upwards and the next match with
the new value in CC24 occurs.
And by this Interrupt(match) the value is set to the old value.
And then the timer overflows and starts from 0x0000h.

How is it possible to program the interrupt to do this
CC24 updates(switch of CC24 and an other register) ?

(use PEC?)

thanks.

Parents Reply Children
No data