Instructions

390Libraries
© 2013 Conrad Electronic
To create the mode parameter, the bit values from the table are ORed (see PWM_Example).
For a more detailed description of PWMH_x, PWML_x and deadtime, please consult the
AT32UC3C data sheet.
Parameter
chan number of PWM channel (0 - 3)
PS prescaler
mode work mode of PWM channel
Table PS:
Prescaler
Tickduration
PWM_1(0)
15,15 ns
PWM_2(1)
30,30 ns
PWM_4(2)
60,60 ns
PWM_8(3)
121,21 ns
PWM_16(4)
242,42 ns
PWM_32(5)
484,84 ns
PWM_64(6)
969,69 ns
PWM_128(7)
1,939 µs
PWM_256(8)
3,878 µs
PWM_512(9)
7,757 µs
PWM_1024(10)
15,51 µs
Table mode:
mode
Description
PWM_ENAB_HIGH (1)
signal on Pin PWMH_x
PWM_ENAB_LOW (2)
signal on Pin PWML_x
PWM_ENAB_DEAD (4)
activate deadtime
PWM_CPOL (8)
negate polarity
5.26.2.6 PWM_Update
Timer Functions
Syntax
void PWM_Update(byte chan, dword period, dword duty, word dtl, word dth);
Sub PWM_Update(chan As Byte, period As ULong, duty As ULong, dtl As Word,
dth As Word)
Description