This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Timer2 in Capture Mode

I tried to use Timer2 in Capture Mode, I have to measure frequency from 8 to 10 KHz. I used the following code but no way to work.
To set Timer2
T2CON=9;
T2MOD=0;
TL2=0;
TH2=0;
RCAP2L=0;
RCAP2H=0;
TR2=1;

in the main loop

while(!EXF2);

now i suppose to fine value in RCAP2L e RCAP2H but nothing.
Frequency to measure arrives to P1.1 (T2EX).
Is it correct?
Thank you very much

Raffaele

0