Hi Dwayne,
there's a simple way to get it.
Calculate first the period or your frequency.
1/2295=435 uSec half period 217 uSec
1/2125=470 uSec half period 235 uSec
use PULSIN to measure the half of period of High state
PULSIN PORTA.0,1,HalfPeriod
HalfPeriod period is a 10 uSec increment (@4MHZ crystal) so give aprox
21 - 22 for 217 uSec
23 - 24 for 235 uSec
you can connect your input signal directly to capacitor (.47 uF or higher) in serie with 4.7K resistor directly to an input PORT pin. Be sure that your signal input have at least close to 3.5 volt peak of amplitude for great result.
Hope this help.
regards
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks