-
I need to generate crystal accurate 152 kHz square (cmos logic) signal. MHz range oscillator followed by divider was the obvious solution. For example 4.864 Mhz / 32 = 152 kHz and internet search told me that such crystal is used for stereo transmitters. Should be easily available. Far from that.
Then I tried to match other division ratios with crystals available from Mouser/Digikey. No luck.
Maybe two divide-by-n dividers in series?
The last stage should probably be divide-by-two to make sure that the high and low periods are equal which is important in this case.
A custom made crystal is far too expensive for this project. Any ideas?
-
A country flag would help. I had a quick look and I can buy them locally for 3 euro.
http://www.hf-electronics.nl/Webwinkel-Product-3621698/Kristal-4.864-Mhz.html
-
Is it exactly 152kHz? What's the purpose of it so we can gauge any other specs such as jitter.
My first thought is to use a cheap low pin count micro controller and use its PWM/NCO/REFCLK/Timer output.
PIC10F320 for example with a cheap canned oscillator if frequency accuracy is important, or the internal oscillator if not.
-
If you already have an MCU on your board, or some way of generating I2C, the SI5351 is pretty darned excellent, don't know why I didn't mention it before, I use it in a couple of my products.
-
An AD9850 DDS chip driven with a 10 MHz source will give you 152.0000002346933 KHz, is that close enough? At least 10 MHz crystals are easy to find.
-
Digikey can custom program a 'programmable oscillator' for your desired frequency.
e.g.
http://www.digikey.com/product-search/en?pv254=82&FV=fff4000d%2Cfff8004f&k=crystal+oscillator&mnonly=0&newproducts=0&ColumnSort=0&page=1&quantity=0&ptm=0&fid=0&pageSize=25
Less than $5 + shipping etc.
There's lots of solutions versus having to build your own divider circuit... All depends on your actual needs (accuracy, voltage range, etc).
cheers,
george. -
Good ideas. Thanks for everyone.What's the purpose of it so we can gauge any other specs such as jitter.
Vibration exciter driver in an old scientific instrument. Currently it has free running oscillator phase locked to an external reference. The instability of the oscillator is causing problems especially when starting the system.My first thought is to use a cheap low pin count micro controller and use its PWM/NCO/REFCLK/Timer output.
Interesting, that came in to my mind too. My plan B was to use the existing PLL circuitry and simply fine adjust the n of the counter according to the PIC ADC input voltage. Not elegant but probably works.
Or it could be possible to use the PIC for the whole phase locking.
-
Good ideas. Thanks for everyone.What's the purpose of it so we can gauge any other specs such as jitter.
Vibration exciter driver in an old scientific instrument. Currently it has free running oscillator phase locked to an external reference. The instability of the oscillator is causing problems especially when starting the system.My first thought is to use a cheap low pin count micro controller and use its PWM/NCO/REFCLK/Timer output.
Interesting, that came in to my mind too. My plan B was to use the existing PLL circuitry and simply fine adjust the n of the counter according to the PIC ADC input voltage. Not elegant but probably works.
Or it could be possible to use the PIC for the whole phase locking.
I made one yesterday with a PIC10F322 using its NCO, plus a canned 10MHz oscillator for the reference. Note the sidebands, due to the way the NCO works, there's a bit of FMing on there shown as spikes at about 24kHz intervals. It's very slightly off due to the resolution of the NCO, at 152,001Hz.
Canned oscillator alone takes 10mA, PIC only about 2mA, and much less if slowed down, it's running at full speed.
BOM cost about £1.20 / $1.80.
An SI5351 would give far better performance, but it's a bit of a bugger to program.Code: [Select]#include <xc.h>
#include <stdint.h>
#pragma config FOSC=INTOSC
#pragma config WDTE=OFF
#pragma config PWRTE=OFF
#pragma config MCLRE=ON
#define NCO1CLK_FREQ (10000000UL)
#define NCO_FREQ (152000UL)
#define NCO_INC (65536.0-(512.0*NCO1CLK_FREQ/NCO_FREQ)) // Needs to be double to maintain precision
int main(void)
{
OSCCONbits.IRCF=0b111; // 16MHz
ANSELA=0; // Digital I/O
TRISAbits.TRISA2=0;
NCO1CON = 0xC0; // Enable module and output, fixed duty cycle mode
NCO1CLK = 0x00; // NCO1CLK pin/RA1
NCO1INCH = (int8_t)(NCO_INC/256);
NCO1INCL = (int8_t)(NCO_INC);
while (1)
{
NOP();
}
return 0;
} -
using its NCO
I wasn't aware of the NCO. Makes things a little bit easier...