2 Conclusion

There are six main methods that can be used to measure the pulse width of either a periodic or non-periodic waveforms and six main methods to calculate the duty cycle of a periodic waveform using an 8-bit PIC device. All of these methods can be achieved by using different combinations of peripherals available on the PIC microcontroller.

Working code examples for measuring the pulse and period and calculating the duty cycle available are at the GitHub repository link:

github.com/microchip-pic-avr-examples/pic16f18076-calculating-pulse-and-duty-cycle-mplab-melody