# Is there a small (6-pin) DIP I can use to generate multi-MHz squarewave clocks with an external crystal?

I'm building a circuit that I'd like to run at 8 MHz to begin with, but I want to be able to try it out at 10, 12, 16, 20, and, maybe, 25 MHz. I know that many microcontrollers have the ability to just plug a passive crystal into two pins and the µC will generate a square wave and pass it on to anything else it's connected to which needs a clock. What I'm wondering is if that functionality exists on its own in a nice, small package which will run at 5V. (I know I can build it using Schottky fast inverters and some capacitors and resistors, but I'd rather avoid all that external stuff if at all possible).

Alternatively, is there an easy way to generate a continuous range of frequencies of this magnitude (similar to what you can do with a 555 timer at lower frequencies)? I'm not too fussed about the frequency being particularly accurate, I'm pretty sure a 1% variability would be acceptable (2% seems like it's pushing it, but I'd certainly be willing to try it out)

Additionally, I've seen a suggestion to use a higher-frequency crystal and use a frequency divider to divide it by four. Is a T Flip-flop the best way to do that at these frequencies? (or, rather, two since one flip-flop is only going to halve the frequency). Does this advice make any sense given that I'm running this on a breadboard? (yes, I know, parasitic capacitance and all that, that's actually part of the reason I'm doing this experiment, I want to see the effect of this parasitic capacitance at the various frequencies and to see whether mounting the breadboard on a grounded copper plate makes any difference)

• are you talking about a pll? Jul 4, 2018 at 15:29
• All you need is an inverter and 2 small load caps. But for less stability a Schmitt Inverter and a 100k feedback trimpot with 10 pF on the input to gnd gives ~ 1MHz to max. Or use a CD4060 and <10pF caps or trim cap Jul 4, 2018 at 15:36
• Just take an 8-pin micro-controller than can run at the frequencies you want (but 25 MHz might be a problem) and tap its clock pin. Jul 4, 2018 at 16:56
• @immibis -- 6-DIP is a common package for optocouplers Jul 5, 2018 at 2:50
• Possibly you already know, but the most integrated version is just to use premade crystal oscillators (as opposed to crystal resonators). They usually have 4 pins and take in V+ and GND and output a nice square wave.
– jpa
Jul 5, 2018 at 6:10

The LTC1799 can be programmed by a resistor and a link to produce a vast array of frequencies.

Is there a small (6-pin) DIP I can use to generate multi-MHz squarewave clocks with an external crystal?

• It's certainly small
• It's 5 pins not 6
• It's not DIP but you want "small" and DIPs are not small in comparison to SM devices.
• It doesn't use a crystal
• I meant small as in not 8-or-more pins, not small as in surface mounted. the problem with surface mounted components is that they won't fit on a solderless breadboard. Jul 5, 2018 at 4:55
• That is, however, exactly what I need, so I guess what I'll do is grab a breakout board in addition to that chip Jul 5, 2018 at 5:17
• @StarkRG You can use a SOT23 break-out rather than look for TSOT23 Jul 5, 2018 at 9:23
• Or just solder single stranded wires straight on :) Jul 5, 2018 at 13:07
• @DaveBoltman I just noticed how small this chip is, I don't think soldering longer pins to it is going to be a viable option: circuitbenders.co.uk/forsale/LTC/LTCmain.jpg Jul 5, 2018 at 18:08

Yes, you can make a Pierce oscillator with one chip and a resistor and the two load capacitors, plus maybe a series resistor if the drive power is too great for your particular crystal.

The inverter must be an unbuffered type or it will likely do all kinds of undesirable things such as oscillating at two frequencies at once. Here is TI application note on doing just that. Some are indeed in '6 pin' or even 4 or 5-pin packages (eg. 0.8mm or 0.9mm square package so pretty darned small).

This is basically what is inside a microcontroller crystal circuit, though usually Rf is internal, and (rarely) the capacitors are inside, so it's essentially no more parts (or just a resistor, something like 1M). You should calculate the capacitors for the appropriate load capacitance of the crystal you have in mind, but if you're off a bit, it will usually just oscillate at a slightly less accurate frequency.

You can use something like an 74AC74 to divide down the output (up to about 125MHz), just connected the D input to /Q.

## If you want a more integrated solution...

I would look at a Si514 for this task. It's available in a fairly small (5x7mm) leadless 6-contact SMT package with a bypass capacitor for the only external component, and can be programmed to any frequency within its operating range over I2C. There is one caveat though, and that is that the I2C programming is volatile, although that may not matter for an experimental rig like yours.

Perhaps you could compromise and place a tiny FPGA onto a 6 pin carrier PCB.

The DIPSY project could point you in the correct direction. It might even be possible to program it to be a variable frequency generator. Best case scenario it could even handle all the system functionality in the logic code.