> The 'C' Function HWPWM contains 3 elements. The first is Cycle, the
> second is a count which points to one of 8 elements in a list, and the
> third is a pointer to an array of Values numbered 1 through 8. The
> values stored in the array are the values of the Duty Cycle of the PWM.
>
> Is the pulse output High for (Cycle - Value) for each Count?
>
> Or does the pulse output start low and go High for (Value) after
> (Cycle - Value)?
BASIC and C operate the same way. I had to look it up in the source
code and the User Manual myself (you think I remember all this stuff??)
Anyway, the Match registers are operating in PWM mode, so they are
cleared (LOW) at the beginning of a cycle, then go high when the count
is equal to the cycle time - high time.
You can operate them in different modes, by programming directly to
the registers.
C HWPWM
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: C HWPWM
So 'Cycle - Value' can be thought of as a delay before the pulse goes high, and
it will remain high for 'Value' time.
I did look at the C Source, but wanted to verify that's the operation of HWPWM.
I think that I can work with that operation.
it will remain high for 'Value' time.
I did look at the C Source, but wanted to verify that's the operation of HWPWM.
I think that I can work with that operation.