Can NanoCore12 vary the pulse-width of a square wave?
The duty cycle of the square wave can easily be varied to produce a PWM waveform. Varying the pulse-width can, for example, control the shaft position of a servo motor, the speed of a DC motor, the effective brightness of a light, or the temperature of a heater. While this can be accomplished via a general-purpose output port by a simple software loop, there is a powerful hardware subsystem that will do it for you without any software overhead. You just set up the desired PWM parameters and the PWM waveform will be automatically generated on the chosen PWM output pin (channel). There are several of these PWM channels on NanoCore12, and each is independently programmable and free-running!