goofy frequencies

Back in CB days I'm tooling across I10 toward LA in my 280Z, heard some "traffic" about "smokey", broke in and asked where were the cops. Response, "We are the cops". Like you, I nearly peed my pants ;-)

And, oh, yes, I remember Comet?... the good old days when crystals were in holders with screws ;-)

...Jim Thompson

--
| James E.Thompson, P.E.                           |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
 I love to cook with wine     Sometimes I even put it in the food
Reply to
Jim Thompson
Loading thread data ...

I still have some of those. Brown bakelite, Philips screws, metal lid. And yeah, I did lap many crystals back when I was a kid. Never had much luck with the pencil trick though, didn't hold for long. I found one could not reliably "unlap" the crystal. Regular crystals were totally out of budget range.

Somewhere in S.F. there ought to be a shop that can still make custom crystals. Unless they taxed them all out of the city already.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

"Jim Thompson" wrote in message news: snipped-for-privacy@4ax.com...

Reduce? Understandable? I thought even obfuscated C was "self commenting"?

Wait, what? That isn't even C. It has to be #define; I don't know what auto is; none of the variables are initialized to a type; and "print" is completely undefined (printf???)!

Tim

--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms
Reply to
Tim Williams

Er, C has "auto", although it's seldom seen in the wild (any local variable not declared "static" is implicitly "auto", so there isn't much point in using it explicitly).

Reply to
Nobody

The outfit we used to deal with was C. R. Snelgrove in Toronto. It cost about $12 to get a crystal polished to any frequency you liked.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

I thought it was Greek ;-)

...Jim Thompson

--
| James E.Thompson, P.E.                           |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
 I love to cook with wine     Sometimes I even put it in the food
Reply to
Jim Thompson

They still around? I went to an auction of a crystal manufacturer somewhere in the GTA around 11 years ago-- can't remember the name. They had a big lapping machine about the size of a high school "birdbath" as well as hard vac deposition equipment.

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

The Si550 looks cool. It's a VCXO that can be factory-set to (they are a bit vague) some sliver of a PPM of any target frequency.

If we run open-loop, we can just FPGA-fake a delta-sigma dac into the VCO pin and set it close. When the customer gives us an external 10 MHz reference, we can DDS a local 10 MHz, based on the 122... MHz clock, phase-detect the two 10 MHz things, and close the loop into the VCO input. Turns out that doing that *exactly* hits our target frequency. As in "duh!"

It looks like we can just use the MSB of the 10 MHz DDS phase accumulator as one PLL input... no sine lookups/dacs/filters. It jitters about 8 ns p-p, but because the pull range of the VCXO is so small, we can loop-filter the heck out of it to keep the phase noise down. We wouldn't have gotten away with that using a regular VCO that had a much bigger Kvco factor.

John

Reply to
John Larkin

I searched for them this evening, and couldn't find them. Pity--they were a really great outfit. I used to get 5 ppm crystals in the 100 MHz range from them when I was a satcom designer (about 1982).

Cheers,

Phil Hobbs

Reply to
Phil Hobbs

Is 122.167958 the real number?

An old trick is based on dividing by two numbers and then mixing

1/N - 1/M = (M-N) / (N*M)

example:

1/7 - 1/11 = (11-7) / (11*7) = 4/77

This lets you get from one frequency to another without really taking the trip all the way down to 1/77th the frequency.

Reply to
MooseFET

First, you may want to read this paper:

formatting link

On the last page they define two recurrences, P(n) and Q(n), which are mimicked in the code as 'n' and 'd'. The difference is that the above authors permit a value other than 1 for the series b(n), while the code assumes that b(n)=1 for all n.

The code includes two basic parts. One to calculate successive continued fraction terms. The other is to follow the recurrences mentioned in the above paper in order to produce a continued fraction from the terms as they are generated in succession.

The first part is very easy to follow. Take your value, get the integer part of it, write that down as the next entry in a list of integers, then divide 1 by just the fractional part and replace the current number with that. Repeat as long as you like. For example, the value 2.45; write down 2 as the first value in the list, then divide 1 by .45 getting 2.2222222..., then write down 2 as the second entry in the list and divide 1 by .22222.... getting 4.5, then write down 4 as the third entry in the list, then divide 1 by .5 getting 2. Write down 2. That's it. The continued fraction is [2;2,4,2], which means 2+(1/(2+1/(4+1/2))), or 2.45.

The second part of the code keeps track of P(n) and Q(n), such that at any n the resulting fraction is P(n)/Q(n). From the cited paper, you find that the two recurrences are P(n)=a(n)*P(n-1)+b(n)*P(n-2) and Q(n)=a(n)*Q(n-1)+b(n)*Q(n-2), where P(0)=a(0), P(1)=a(1)*a(0)+b(1), Q(0)=1, and Q(1)=a(1). The recurrences are the same except for the starting point values.

In the program, b(n)=1 for all n, so keep that in mind. Also, they don't want two starting conditions that depend on already knowing some of the continued fraction terms (for each recurrence.) They prefer to take one step further back and define things this way: P(-2)=0, P(-1)=1, allowing the general recurrence of P(n)=a(n)*P(n-1)+P(n-2) to yield the P(0)=a(0) and P(1)=a(1)*a(0)+1 that the paper discusses from those prior values. Similarly, Q(-2)=1, Q(-1)=0, allowing then the general recurrence of Q(n)=a(n)*Q(n-1)+Q(n-2) to yield the Q(0)=1 and Q(1)=a(1) that the paper discusses.

The code "says:"

1: m=0; ' P(-2) 2: n=1; ' P(-1) 3: c=1; ' Q(-2) 4: d=0; ' Q(-1) 5: for (i=0;i10^10) break; 8: v=m; ' P(n-2)= P(n-1) 9: m=n; ' P(n-1)= P(n) 10: n=v+k*n; ' P(n) = P(n-2) + a(n) * P(n-1) 11: v=c; ' Q(n-2)= Q(n-1) 12: c=d; ' Q(n-1)= Q(n) 13: d=v+k*d; ' Q(n) = Q(n-2) + a(n) * Q(n-1) 14: print n,"/",d,"\\t",n/d-h,"\\n"; 15: t=1/(t-k) ' next iteration with t=1/(t-a(n)) 16: }

Lines 6 and 15 are the two lines generating a(n) and belong to the first part of the algorithm I described. Lines 8 to 13 belong to the second part of the algorithm, as discussed in the paper, and depends on the generation of successive a(n) values by the first part of the algorithm. Obviously, line 14 is for displaying the fraction and, it appears, an error value ('h' holds the actual number, forever.)

Good numerical methods experience should include a solid grounding in recurrences and generating functions. I'd heartily recommend "Concrete Mathematics" as an excellent segue.

I hadn't ever seen this application of recurrences to continued fractions before, but seeing the code it was obvious that a recurrence relation was being applied and it was then not difficult to find a paper discussing it. It's application to understanding the code was then instantly obvious.

Jon

Reply to
Jon Kirwan

I don't know enough to be able to do so, but won't let that stop me from giving some general-idea comments after the C procedure below. For more precise information, see the "Calculating continued fraction representations" and "Theorem 1" sections earlier in the wikipedia page, and reference mentioned in Jon Kirwan's post. (If interested in more info about the bc indefinite-precision calculator, see eg .) Jon's detailed exposition of the bc program looks good! C version follows, then my general-idea comments and an example.

// Display up to 'a' terms of continued fraction convergents of 'h' // Doesn't check for integer overflow and its zero check is flimsy. void showConv (double h, int a) { int c=1, d=0, i, k, m=0, n=1, v; double t=h;

for (i=0; i

Reply to
James Waldby

Sorry, that's

I edited too much. Apologies.

Jon

Reply to
Jon Kirwan

Well, over here in good'ol Germany, i can order custom-made crystals for IMHO reasonable 21 to ~50? depending on frequency and specials (short case, 10ppm, oven stuff). So given standard specs would suffice (i.e.

20ppm, 122.167958 MHz, HC25 case) would go for 21? plus shipping and handling (6? to Germany, 9,50? international). That would be about USD 42.50 based on todays exchange rate. Fairly reasonable for a single custom-made crystal IMHO. Supplier would be Germany-based company "Andy's Funkladen",
formatting link
Unfortunately, i haven't found an english website of them though.

HTH, Florian

Reply to
Florian Teply

Or 'extern'. Defining a variable's storage class as 'auto' means "do whatever you normally do", which is pretty darn redundant.

--
www.wescottdesign.com
Reply to
Tim Wescott

It's actually 2^40/9000.

We want to make a multi-channel DDS synthesizer that has precisely 1 mHz resolution, and a clock in the ballpark of 125 MHz.

If you do it the obvious way, phase accum lsb = 0.001 Hz, the clock has to be 2^N/1000, candidates being 137.438... and 68.719... MHz, neither acceptable. So some brilliant engineer observed that the phase accum input need not be "1" at 1 mHz, it could be any small integer. A bit of poking came up with "9", which resulted in the target frequency.

So the problem became how to generate that weird clock without grinding custom quartz (for, potentially, both cheap XOs and optional OCXOs) and how to lock it *precisely* to an external 10 MHz reference.

So if we use the SiLabs VCXO, we can have a nominal osc frequency close on-target. Then we can build a ninth DDS channel, program it to make 10 MHz, and close a loop on that, against an external input or a local 10 MHz OCXO. Since the extra channel is programmed to and locked to 10 MHz, obviously (as pointed out by a different brilliant engineer) any other channel can be programmed to make precisely 10 MHz too, and all are settable to exactly 1 mHz resolution, namely DDS settings that are multiples of 9.

It's one of those things that starts complicated and simplifies itself later on. Practically everything winds up inside the FPGA where it belongs.

John

Reply to
John Larkin

Cool, but sometimes it's easier to write a brute-force Basic program with a few intelligent constraints, and run it for a few minutes or hours. Most real problems won't have to run for days or centuries.

John

Reply to
John Larkin

Why didn't you _say_ so?

If you use a 128MHz time base, and implement each adder as a mod 5^9 stage (or nine mod 5 stages) followed by a mod 2^18 stage, then you'll have plenty of binary bits to feed your lookup table, and you'll be able to divide the clock down with nice even numbers of mHz.

(not to mention a fun job building the adder so that it meets timing -- that's left as an exercise to the reader).

Figuring the increment will be odd, but that's what software is for.

If you're only going to use nine bits into your look up table, you can have 9 digits of BCD with nine bits of straight binary on top, which might make the adder easier.

--
www.wescottdesign.com
Reply to
Tim Wescott

We already have a pipelined bidirectional 40-bit DDS design, and it's really tempting to leave it alone.

But I don't like being assaulted by FPGA designers who are younger and bigger than I am.

You're talking torches and pitchforks now.

John

Reply to
John Larkin

Back in Germany I've used another outfit that had better pricing. I believe it was located in the little village of Daun (Eifel Region). But that was very long ago, always under 20 Deutschmarks. Then some outfits in the Netherlands with sometimes even better prices, well under 20 Dutch Guilders back then. 1980's.

For super top notch crystals where price was not an objective we used KVG (Neckarbischoffsheim?).

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.