General Category    (This section is not monitored) > Free Topic

Frequency Counter

<< < (2/5) > >>

Jan:
Dear Sir, it is not clear from your posts what's your wish. The 1 GHz counter is a pretty old circuit based on a /256 divider. You cannot use it with decimal divider (/10, /20 etc.) without complete rewriting the firmware because 256/10 or 256/20 is not an integer. This is a fact that has nothing to do with documentation.

However if you need to correct the value showed by dividing by 2 or multiplying by 2, it can be done simply by changing the prescaler rate of the PIC. It seems you know programming very well so it should be a simple task for you. Change the line

--- Code: ---MOVLW   B'01110011' ;prescaler & pull-ups
--- End code ---
to

--- Code: ---MOVLW   B'01110010' ;prescaler & pull-ups
--- End code ---
or

--- Code: ---MOVLW   B'01110100' ;prescaler & pull-ups
--- End code ---
and compile the asm file again (for example using MPASMWIN).

Alternatively you may change the crystal value in the ratio required (but this may be increased only due to display refresh rate).

Heinz:
Dear Jan.

This is exactly the information I was after. I shall re-program the PIC in the next couple of days. I have to up-date the PICkit2 software as well. No, I'm not that experienced as yet. May be in due course? Many, many thanks for your assistance. Great ham spirit!

vy 73 de Heinz, VK4BZT

Heinz:
Dear Jan

After some initial euphoria I must admit things are not as simple as changing the pre-scaler rate only. The changes are much more involved. As you indicated earlier a large junk of the code would have to be rewritten. This is a bit beyond my abilities. Anyway many thanks again for your comments.

73s de Heinz, VK4BZT

Radium98:
dear juan

i am going to make the frequency counter but i have some dificulties on components side i need some help

i cant find the prescaler and no other equivalent that scale by 256 ,can i use prescaler u664b that scale by 64 and changing the xtal value from 4 to 16 mhz do that work.another thing can i use pic16lf84 because also cant find 16f84a.thanks

Jan:
I don't see any problem!  8)

For connection to the PIC you may use this picture http://www.datasheetarchive.com/dl/Datasheets-34/DSA-678559.pdf

Don't forget the PIC OSC must be set to HS in fuses. I think that the 16F84 has a maximum frequency of 10 MHz (the 16F84A has 20 MHz) but overclocking is possible. Let us know how it works...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Reply

Go to full version