Hi Darrel,
With both PICs running at 20MHz, CCPR1L & CCPR1H should have the same values - sinceCode:Start: If Capture = 0 then ' ignores 1st capture Goto Start endif T1CON.0=1 Capture = 0 CaptureLoop: If Capture = 0 then Goto CaptureLoop endif T1Con.0=0 period.LowByte=CCPR1L period.HighByte=CCPR1H
it's all done in hardware with the capture module capturing the value of timer1 after the
4 rising edges.
And the value being captured is before the multiply.
Bookmarks