Well the timer measuring the period is being clocked by something, it apperars you're using the main oscillator as the source for that. Then there's a prescaler that can divide the main clock but it appears you have that set to 1:1. So if the PIC runs at 20MHz one timer "tick" is 200nS.
If the timer value is captured (and then reset) on the rising edge and you get a timer value of 1234 then the persiod is 1234*200nS = 246.8uS.
/Henrik.
Bookmarks