Skip to content
campbellsan edited this page Jun 26, 2014 · 13 revisions

To control the PWM outputs, write the PWM number (0 - 3) to the SPI, then write a duty cycle value (0 - 255). To control the 8 ouputs, select the output register by writing 4 to the SPI, then follow with an 8 bit value to set the I/O. For a discussion about PWM operation see this wave page.

Note that as for the other cores with outputs, they are updated immediately as the bits come in. This results in a one serial clock (sclk) skew on each output bit.

.

Here is an oscilloscope trace for PWM 0 at two different duty cycle values.