This FPGA code module provides PWM capture support. This allows a PWM device (e.g. rotary encoder or linear position sensor) to be measured.
The following pulse train durations or periods can be measured:
- Duration of high pulse
- Duration of how pulse
- Period between low to high transitions
- Period between high to low transitions
The outputs of the Simulink driver block are:
- High duration - total time the input is high between the last two triggers
- Low duration - total time the input is low between the last two triggers
- Period - time between the last two triggers
A PWM generation FPGA code module is also available.