Or you could just count the Overflows from timer0 and make it a 16-bit or larger counter.
DT
Or you could just count the Overflows from timer0 and make it a 16-bit or larger counter.
DT
Last edited by savnik; - 21st June 2008 at 12:10.
Savnik,
I understood that you already have a PCB and can not change it.
Then, if you are not using RB6, then just short it to RA4 manually with a tiny cable and use Timer1.
-----------------
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Hi, Savnik,
so, you want to use a ... 24 bits counter !!!
One more good reason to turn to 18F1320 AND use PBPL ... instead of PBPW !
But, once more ... will you tell us the PIC Osc frequency and the frequency range you intend to measure at PORTA.4
... as I smell something really interesting ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
And yet AGAIN!!!
PBP doesn't do fractional numbers by default!!!!! NEVER has, NEVER will!!!
You have to create your own method to extract any fractions you need.
Multiply the number your dealing with by 100, the 2 rightmost digits are your fraction....simple as that!
Or maybe not...
Last edited by skimask; - 21st June 2008 at 21:23.
Another question.
I use TMR0 as counter to measure the frequency at RA4
How i know, how many times the TMR0 overflow.
The maximum times is 3
For first overflow INTCON.2 = 1 , After;
pic16f88
xtal =4mhz
option_reg = %10110111
Last edited by savnik; - 23rd June 2008 at 12:59.
Last edited by savnik; - 23rd June 2008 at 16:07.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks