Hi,
I wish to capture the width of a pulse, with some accuracy. I've set-up one N2HET:0 to use the PCNT instruction.
The return data field after a capture has occurred contains 25bits of "data" and 7 bits of "HR Data".
It is my understanding that the "data" field updates every LR clock with the LR clock count. Therefore reading only the 25bits of data gives me a resolution of LR clock's. The HR clock is 100MHZ, and should give me a resolution of 10ns.
The question is how to use the "HR Data" field. Do I add the amount of time in 25bit LR Clocks and the amount of time in 7 bits of HR clocks together to get a result accurate to the nearest 10ns?
Thanks
Stomp!