
Originally Posted by
skimask
Gave up on trying to write one yourself?
You'll never get any fast counting done with a PIC and straight PBP (maybe 250khz), assembly might get you 10Mhz, if you use a 40Mhz PIC and you use one of the TMR inputs.
However, if you take my idea (from the other thread), and use a pre-divider, you'll count much higher.
And check this out....
http://members.cox.net/berniekm/super.html
Everything is around the sampling time and the accuracy you want not much. Depending of your PIC characteristic, 50MHZ is easy to do, 1500 MHZ??? i have some doubt, but with external hardware divider, there's no real problem.
For high frequency... who want to use 1Sec time base? Nobody... 100mSec, 10mSec, 1mSec is more than possible.
Nothing hard, nothing clever at all. Set a Timer as counter, Clear it, enable it, do you samppling time,m stop it, read it display it. 4 code line or so.
@Savnik, Which PIC you want to use?
Have a look to T0CKI, T1CKI. This will reveal tons of things.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks