Pictron,
Ofcourse you can do the counter without using asm but consider the followings;
- it is not so easy to arrange 1000 ms delay by using pbp codes. Ofcourse if you write PAUSE 1000 the program will wait 1000 ms (with 4 MHz cyristal). The program commands creates also some delays and you have to take out that delays from your main 1000 ms delay. I mean, if you want to make a precision counting you open the TMR1 first and immediatly after you have to wait exactly 1000 ms without doing anything or doing something but knowing the period exactly.
But you can do some trial counting. Let say you found one frequency source ( I was using TCXO - temperature compensated xstal oscillator) and make some measurements. Compare the result with the frequency of source and if not close change the your PAUSE xxx ms figure until you found closest value.
This is my suggestion.
On the other hand, the most difficult part is the pre-amplificator of the frequency counter. The good ones having the following specifications;
- input signal level 5 - 10 mv. for the signals up to 1 MHz.
- input signal level 30 mv. for the signals between 1 Mhz 6 Mhz.
- signal level should be arround 50 mv after 6 MHz.
The pic can measure only if the signal level is TTL it means about 0-1,6 V for LOW level, and 1,8V -5 V for HIGH level.
I made also my own preampli. If you want I can give you the schema of the circuit later.
If you want to make a good frequency counter I give you my program (as Hex file) and the circuit PCB everything. JUst let me know your e-mail.
I upload all necessary files to the following link and will be available there for 5 days. Pls. be quick to load them.
http://s11.yousendit.com/d.aspx?id=2...M1XGZOED2LGO45
ERO
Bookmarks