Content originally posted in LPCWare by Ex-Zero on Thu Jan 26 04:06:00 MST 2012
Quote: ub3r
Therefore, if i want a falling edge interrupt, shouldn't i interrupt when TC = MR0??
The settings you gave me are for MR3, hence end of period, not falling edge.
No, reset (MR3) = low, MRx = high :) MR0 is your low time :rolleyes:
With MR3 = 100 and MR0 = [COLOR=Red]75[/COLOR] you're generating a [COLOR=Red]25[/COLOR]% high signal :eek:
User manual:
Quote:
15.8.13 Rules for single edge controlled PWM outputs
1. All single edge controlled PWM outputs go [COLOR=Red]LOW at the beginning of each PWM [/COLOR]cycle (timer is set to zero) unless their match value is equal to zero.
2. Each PWM output will go [COLOR=Red]HIGH when its match value is reached[/COLOR]. If no match occurs (i.e. the match value is greater than the PWM cycle length), the PWM output remains continuously LOW.