PDA

View Full Version : frequency prescaler using PIC



F1CHF
- 7th August 2014, 10:58
hello
I am not fluent to search on database, I try to reach some thead with the word "DIVIDER" or "frequency" without succes.
my question is :
Instead using a lot od 74LS390 dividers to have a 1 Hz output from a 10 Mhz oscillator
I try to find a solution using a PIC.
Is somebody has done such application ?

this will be use in the GPS solution (1pps output) to synchroniqze a 10 Mhz VCXO

thanks in advance

Francois F1CHF

richard
- 7th August 2014, 11:43
try a search for PLL

Archangel
- 7th August 2014, 18:39
You can use a 32.768 KHz clock crystal on timer 0 to get 1 Hz timer interrupt. Darrel did this for someone recently for a frequency counter or tachometer project. Nice thing is code runs in hardware.
EDIT: Found it
http://www.picbasic.co.uk/forum/showthread.php?t=18997&p=125647&highlight=#post125647

F1CHF
- 7th August 2014, 22:40
Thanks for your replies, I found some example using serach with "counter" and "frequency"
I must explain now with more details
I don't need to generate a 1hz signal

I need to divide the signal from a 10 mhz VCXO(variable oscillator depending a control voltage)
the well know solution is to use 4 IC like 74LS390 .. too big for me ...i term of placement

That why I am looking for a newer system (example OCXO signal will become the PIC crystal and
I must find "something" to count up to 10.000.000 pulses , I know that we are working with Words
each time the word register is full, I will add 1 in a second register (up to 152 times) remaining
is 38680 ....
may be I am "outside my shoes ...." French expression ...

this 1hz signal (from VCXO) will be compared with a GPS signal (called 1 pps) this GPS is one of
the best reference to get the lowest PPM deviation

output from the comparator will be injected to the VCXO, this is in fact a PLL system !

all the PLL integrated circuits I know, don't have the internal divider up to 10 millions
I know that I can put a prescaler between the OCXO to feed the PIC but if can avoid it
it will be great !

hope my "spannish writing" is enough clear

Francois

richard
- 8th August 2014, 05:06
if you used a 16bit timer interrupt (say the timer is preloaded with (65536 -7 -10000 )) and its clock source the 10mhz osc that would give you a 1khz signal .
if that was incremented into a word var and subtracted from 1000 on an edge signal of the pps you would then have a + or minus error signal .
but how you could use that error to vary the vco is another story and would the resolution be fine enough ?

Acetronics2
- 14th August 2014, 10:57
a pair of CD 4059 ???

... ooooops....

Alain

F1CHF
- 14th August 2014, 12:44
hello
I didn't answer to Richard, I must rere read the timer and interrupt story and make a test first ...
for the CD4059 it's an idea !
I have already said "the well know solution is to use 4 IC like 74LS390 .. too big for me ...i term of placement
there is also an other way, using FPGA item ... I have a good contact to test this solution (not easy to understand)
thanks
Francois