m. Frequency and impulse width measurement

There are many ways of accurate measuring of frequency and impulse width with microcontrollers. PIC18FxxJ50 has specialized hardware to support these measurements. A digital impulse width can be measured for the whole length of the impulse or just during when the impulse represents logical “1” or logical “0”. The latter enables reading the analog information from a pulse width modulated signal. Please, go to Downloads section and explore: FreqPWMeterExample.zip or 64-bit FreqPWMeterExample x64.zip to learn how to write your own application to measure frequency and impulse width. The sample application also allows you to assign an arbitrate RP pin on PIC18F2xJ50 microcontroller for frequency and impulse width measurement. It is also possible to select one for four frequency divider options: 1:1, 1:2, 1:4 or 1:8, also known as prescalers. The programming guide is in subsection 5.a.