DLPU018J October 2014 – June 2024 DLPC900
The PWM Setup command sets the clock period and duty cycle of the specified PWM channel. The PWM frequency and duty cycle is derived from an internal 18.67 MHz clock. To calculate the desired PWM period, divide the desired clock frequency from the internal 18.67 MHz clock. For example, a PWM frequency of 2 kHz, requires a 18666667 / 2000 = 9333 or 0x2475.
I2C | USB | |
---|---|---|
Read | Write | 0x1A11 |
0x41 | 0xC1 |
BYTE | BITS | DESCRIPTION | RESET | TYPE |
---|---|---|---|---|
0 | 1:0 | PWM Channel Output Select | d0 | wr |
0 - PWM channel 0 (GPIO_PWM_00) | ||||
1 - PWM channel 1 (GPIO_PWM_01) | ||||
2 - PWM channel 2 (GPIO_PWM_02) | ||||
3 - PWM channel 3 (GPIO_PWM_03) | ||||
7:2 | Reserved | d0 | r | |
4:1 | 31:0 | Clock Period in increments of 53.57 ns. Clock Period = (value + 1) × 53.5 ns | d0 | wr |
5 | 6:0 | Duty Cycle = (value + 1)% Value range is 1% to 99% | d0 | wr |
7 | Reserved | d0 | r |