Propeller osillaction and freqency testing
rwgast_logicdesign
Posts: 1,464
Im sort of unclear om a few things as far as frequency/osicillation type stuff goes. it all started with those 5mhz crystals not working and me thinking about all sorts of stuff.
first of all i looked online for simple crystal testing type circuts and they all seem abit rediculous compared to the diode/meter method jmg recommended. But they all do the same thing check for oscilation. is there a way you could output a wave to oscilate the crystal and then use another pin check and verify the xtal is oscilating.
the whole xtal thing has got me looking into frequency counters. most of the diy projects are fairly low freqency like 1mhz or something. i had found this 1ghz diy http://electronics-diy.com/electronic_schematic.php?id=508v its main problem is the supporting cpu doesnt seem like an easy buy.
I know theres a spin program on obex that lets you use your propeller as a frequency counter, i havent been near a computer for a few days to test it out.
this is where i start to get a bit confused and dunno where to keep researching. ok so lets say i wanted to use a frequency counter to find out what my prop chip was running at. and then lets say im running a 5mhz pll16x how big of a counter/scope or whatever test tool would i need, surely not something capable of 80mhz+ right? I mean my prop is layed out on a breadboard and appears to run fine well over 100mhz, since i know a breadboard cant really hit more than 10mhz that means the only thing runing at a high frequency is the prop internally. so im thinking if i had a counter to verify the props freq i would be testing to make sure it was running at 5mhz (i.e. the speed of xtal im using). and exactly where on a chip would i want to probe to find the exact external frequency, the vdd inputs? i mean you could test the xtal but that still only gives u the xtal speed. so ur still just trusting that everything is as fast as it should be. im not sure if this is making seanse it does in my head lol. i guess i just wanna know how you would find the frequency of the prop without just trusting xtall x pll, and exactly what frequency im measuring for, bexuase im pretty sure its not acually 80mhz.
i have alot of prop projects going on and one of them is just a multi purpose circut tester. i use my prop alot to test caps, and the next thing id like to add would be a freq counter. i understand freq is just pulses/time. what i am woundering is if i were to try to make a freq counter based on the prop what the theroretical maxium frequency is i could detect using the prop alone without a chip like the one i linked to in the schematic above. i know the max freq the prop will read has something to do with its own clock speed i just dont know how u would find it, and wether its based of the props external or interal clock speed.
first of all i looked online for simple crystal testing type circuts and they all seem abit rediculous compared to the diode/meter method jmg recommended. But they all do the same thing check for oscilation. is there a way you could output a wave to oscilate the crystal and then use another pin check and verify the xtal is oscilating.
the whole xtal thing has got me looking into frequency counters. most of the diy projects are fairly low freqency like 1mhz or something. i had found this 1ghz diy http://electronics-diy.com/electronic_schematic.php?id=508v its main problem is the supporting cpu doesnt seem like an easy buy.
I know theres a spin program on obex that lets you use your propeller as a frequency counter, i havent been near a computer for a few days to test it out.
this is where i start to get a bit confused and dunno where to keep researching. ok so lets say i wanted to use a frequency counter to find out what my prop chip was running at. and then lets say im running a 5mhz pll16x how big of a counter/scope or whatever test tool would i need, surely not something capable of 80mhz+ right? I mean my prop is layed out on a breadboard and appears to run fine well over 100mhz, since i know a breadboard cant really hit more than 10mhz that means the only thing runing at a high frequency is the prop internally. so im thinking if i had a counter to verify the props freq i would be testing to make sure it was running at 5mhz (i.e. the speed of xtal im using). and exactly where on a chip would i want to probe to find the exact external frequency, the vdd inputs? i mean you could test the xtal but that still only gives u the xtal speed. so ur still just trusting that everything is as fast as it should be. im not sure if this is making seanse it does in my head lol. i guess i just wanna know how you would find the frequency of the prop without just trusting xtall x pll, and exactly what frequency im measuring for, bexuase im pretty sure its not acually 80mhz.
i have alot of prop projects going on and one of them is just a multi purpose circut tester. i use my prop alot to test caps, and the next thing id like to add would be a freq counter. i understand freq is just pulses/time. what i am woundering is if i were to try to make a freq counter based on the prop what the theroretical maxium frequency is i could detect using the prop alone without a chip like the one i linked to in the schematic above. i know the max freq the prop will read has something to do with its own clock speed i just dont know how u would find it, and wether its based of the props external or interal clock speed.
Comments
To measure any Internal frequency, you need to first load a tiny pgm that toggles a pin, at some easy to check frequency.
Or you might toggle more than one pin, using different methods, so you can check both the Xtal, and your translated values..
eg
Pin1 : Set a counter as Adder on a /2^N value. - Pure HW so the COG that starts this can do :
Pin2 : Use WAITCNT and a defined delay
A easily available, low cost prescaler is the 74LV4060, or the more generic but slower 74HC4060, this can move any Prop frequency into the range of PC Sound Card Frequency counters, I linked to before.
For wider range, and some preamp, I like the look of the ADF4xxx series.
The ADi designers thought to include a test-mode mux, that can route any divider to a pin, and to allow full integer range on the Dividers.
Simplest is the ADF4001, thru to ADF4151 which would allow up to 3.5GHz counting
http://www.daqarta.com/dw_freq.htm
http://opend.co.za/hardware/freqmeter1/index.htm
These are reciprocal counters, so give good precision at lower frequencies.
They will be as good as your PC sound clocks, so some tens of parts per million absolute, and less than 1ppm relative.
Of course, the NEXT thing you want to know, is what your Crystal errors are to fractions of a part per million, so these Digikey parts can do that :
Oscillator Modules, with errors in Parts per billion (!) and Price
±20ppb $39.32 CW727-1-ND
±100ppb $31.13 CW700-1-ND
±250ppb $21.00 CW663-ND
The Prop can of course do Frequency counting, and the data sheet gives some ideas of possible limits.
Just simple counter toggling, needs to see a H then L on following SysClks, so that's a Count ceiling of ~40MHz (less a bit for skews)
If you simply wait 10 seconds and then read that timebase, you will have added 50,000,000 counts from a 5MHz signal, and added 200,000,000 counts from one of those 20MHz precision refs above.
The ideal test system would measure two frequencies at the same time : the precision ref, and the unknown, then any PLL issues can be removed from the error budget.
Such a system is fine for good precision > 1MHz, but if you want wide dynamic range, and faster readings for a given precision, you need to move to a Reciprocal Counter Design.
That delivers N digits per second, and does not care about 1MHz, 100KHz or even 1 second.
This ideally needs a Pin-Edge capture, of Two counters, and the Prop sadly lacks full support for that in hardware.
So some extra SW is needed, and the question is how that impacts the FMax, and resolution figures.
If we relax that to a (say) 100ns granularity or 2 opcodes, at high frequencies, that gives 7 decimal digits per second, or 100ppb/s and it can improve from there as the Fu drops to close to 8 decimal digits / second, or 12.5ppb/second ( 8 digits and 10ppb/s if you overclock @ 100MHz)
anyways your post was very detailed but i still would like to get a few straight forward answers to some of the basic questions. #1 if i were to just go buy a counter to use to test basically my prop would i need one equivalent to my internal prop clock speed or something that tests as high as my crystal frequency? #2 can the prop be used for a basic yes no type test for oscilation? if so what would be a good place to start researching how to detect it?
i looked into the sound card counters as you suggested and i plan on getting one set up to experiment with before i attempt a prop based one.
this is the link i posted im not sure what happend up there, http://electronics-diy.com/electronic_schematic.php?id=508 its basicaly a pic with a prescaler that can measure 1ghz looks pretty slick for a homeade counter, better than paying a grand
Only buy one if it comes either cheap, or fully spec'd. It only needs to count crystal speeds, you have to feed the PLL out a pin anyway, so just divide it as you do so.
A HC4060 + SoundCard meter, will be more than good enough to start with, and get you to some 10's of ppm.
Or, if you are spending money, look at a multi purpose model like this one - available on ebay from ~ $73
http://www.uni-trend.com/UT60H.html
or a little more gets this
http://www.uni-trend.com/UT71A.html
Sure, but that's a complex way to check a pulse. It also needs a working oscillator, to operate properly!
Cheaper pulse checker, would be a HC4060 (AC coupled into the preamp, linear biased) and a Piezo Speaker.
5e6/2^12 = 1220.703125Hz => a good squeal.
Check out ebay, there are about 900 to choose from.
Yes, I would like it to count to 1GHz or so, and have at least 8 digits in the display with many timebase options.
Duane J
Sure, provided you know the time interval.
A good example could be a 1 pps GPS Pulse, used to capture CNT every second.
Expected delta value is 80,000,000, and the numeric LSB here is 12.5ppb
GPS 1pps are often spec'd around 100ns, so your system LSB is closer to 100ppb, but you get the idea.
So you wouldn't have any calibrated independent reference.
The GPS 1 second tic is about the best reference the ordinary guy can get. You do need to average many thousands of these to obtain its full accuracy though.
Another method is to setup the counter to run at the carrier frequency of a local AM broadcast radio station. Then using a radio listen to the beat frequency. Adjust the counter until the beat is zero. OK, not all radio stations have precision master oscillators. But some do. I have a local station, KSTP, that is precision. Just talk to the stations engineer. They will tell you if they are precision or not.
Duane J
Never assume, always check the data
General Rule : It it does not actually specify a ppm, you can expect it to be un-corrected
http://para.maxim-ic.com/en/search.mvp?fam=rtc&374=I%3Csup%3E2%3C/sup%3EC&tree=timers
but even there, there are traps for the unwary, as a common method of RTC time-base fixup, is count skipping.
Only a few actually trim/adjust the Oscillator.
Added: I've checked the PCF2129A, and it is $2.65 at Mouser, for 3ppm, and they use a hybrid solution : they vary the OscCap, but in a time-modulated way, and also state the 1 second Divider choice, is the best to avoid the Cal-jitter effects.
Note they do not actually give a 1 second ppm error, but the (very) high crystal Q, and a time-modulation that repeats every 32768, (or factor of /2) should (hopefully) average the jitter down to their quantize level.
The 'better end' Maxim parts are also quite costly, you can get a FOX924B TCXO for less money;
Newark show them at a a promo price of $3.18 1+, for a 10.0000MHz, 1.5/2.5ppm rated part.
BTW, if you don't have a shortwave radio, you can also pick any broadcast station in the AM band (550 kHz .. 1610 kHz). It won't be as accurate as WWV's NIST-calibrated signal, but it will be close enough for most uses.
-Phil