# 1-2MHz square wave generator

#### gamecoder.nz

Joined Apr 13, 2022
6
Hi everyone,

I am building a breadboard computer and I want a relatively high frequency clock, no more than 2MHz. I have a LMC555, which has a max of 3MHz, and put it into an a-stable configuration with two 27ohm resistors and a 0.01uF capacitor. But I put an LED on the output and it doesn't light up

Now this is the first time doing it by my own design so I probably have it wrong. What would be the best way of doing this?

#### dl324

Joined Mar 30, 2015
14,462
Welcome to AAC!
Now this is the first time doing it by my own design so I probably have it wrong.
It would be helpful if you confirmed that you're using the astable circuit from the datasheet and, since you have some uncertainty regarding your ability, show us how you have things wired.

#### ronsimpson

Joined Oct 7, 2019
2,067
This crystal oscillator is powered by 5 volts and makes a good square wave at the frequency written on the top. You can often find them in old junk PCBs.

#### k1ng 1337

Joined Sep 11, 2020
538
Unofficial sources say minimum resistor values are 1k (I'd like an official answer myself on this). Try changing the resistors to 2.7k and the capacitor to 0.1nF for a frequency of 1.7MHz.

#### Papabravo

Joined Feb 24, 2006
18,422
Hi everyone,

I am building a breadboard computer and I want a relatively high frequency clock, no more than 2MHz. I have a LMC555, which has a max of 3MHz, and put it into an a-stable configuration with two 27ohm resistors and a 0.01uF capacitor. But I put an LED on the output and it doesn't light up

Now this is the first time doing it by my own design, so I probably have it wrong. What would be the best way of doing this?
A 555 is not really what you want to use for such a project since the frequency stability is much worse than a crystal oscillator. If you find one similar to the picture in post #3 with a higher frequency than you want to use, you can use flip-flops or a counter to divide the frequency down to something more useable. As soon as you want to do something, like serial communications, that depends on a stable timebase you will abandon the 555 in a hot minute.

#### DickCappels

Joined Aug 21, 2008
8,710
...two 27ohm resistors and a 0.01uF capacitor.

Multiply the resistors by 100 and divide the capacitor by the same factor.

From memory, if both resistors are the same value you will not get a square wave. It will be rectangular but not a 50% duty cycle. Consult the datasheet for specifics.

#### Papabravo

Joined Feb 24, 2006
18,422
...two 27ohm resistors and a 0.01uF capacitor.

Multiply the resistors by 100 and divide the capacitor by the same factor.

From memory, if both resistors are the same value you will not get a square wave. It will be rectangular but not a 50% duty cycle. Consult the datasheet for specifics.
This is another reason why you might want to start with a higher frequency and run it through a flip-flop to get the nice 50% duty cycle that processors are so fond of.

#### ci139

Joined Jul 11, 2016
1,819

#### MrChips

Joined Oct 2, 2009
26,103
Here is your basic 555-timer circuit.

Don't use NE555 IC. It only goes to 2MHz.
Use TLC555 or LMC555 IC which will work to 3MHz.
Start off with:
R1 = 220Ω
R2 = 10kΩ

and no capacitor C.

Add C with values 10pF to 25pF for lower frequency.

#### gamecoder.nz

Joined Apr 13, 2022
6
Thank you very much for your quick responses everyone. I'm going to use a crystal oscillator

#### dl324

Joined Mar 30, 2015
14,462
Thank you very much for your quick responses everyone. I'm going to use a crystal oscillator
If the computer you're going to bread board is Ben Eaters, I'm pretty sure he used a 555 timer for the clock.

Not that I endorse any of his designs. He's done some questionable things like trying to source 8ma from a 74LS output while still using it to drive other logic:

I fan of colored schematics or the retarded 555 timer symbol he used either...

#### gamecoder.nz

Joined Apr 13, 2022
6
Not that I endorse any of his designs. He's done some questionable things like trying to source 8ma from a 74LS output while still using it to drive other logic:
How would you improve on his design?

#### MrChips

Joined Oct 2, 2009
26,103
How would you improve on his design?
Don't drive an LED from a logic output and use the same logic output elsewhere.
Use a buffer or inverter to drive the LED by itself.

#### ronsimpson

Joined Oct 7, 2019
2,067
Why do you want a LED on a clock? The LED glowing does not tell you if the clock is oscillating.

#### gamecoder.nz

Joined Apr 13, 2022
6
Why do you want a LED on a clock? The LED glowing does not tell you if the clock is oscillating.
To check that it was working, which it clearly wasn't

#### ronsimpson

Joined Oct 7, 2019
2,067
It only tells of the line is low some or all of the time.

#### gamecoder.nz

Joined Apr 13, 2022
6
It only tells of the line is low some or all of the time.
Yes, but at 1.7MHz it should be lighting up but it wasn't so that tells me I did something wrong

#### dl324

Joined Mar 30, 2015
14,462
How would you improve on his design?
For CLK, I'd add a gate dedicated to driving the LED as shown in post 13.

There have been other screwy things I've seen in what little of his videos I've seen. I don't even know if the architecture is of his own design, but he's managed to make money from it.

#### dl324

Joined Mar 30, 2015
14,462
To check that it was working, which it clearly wasn't
Get yourself an oscilloscope (DSO138 is only \$20), or a logic probe. A decent logic probe would have a way to indicate frequencies that are too fast for you to see.

#### k1ng 1337

Joined Sep 11, 2020
538
For CLK, I'd add a gate dedicated to driving the LED as shown in post 13.

There have been other screwy things I've seen in what little of his videos I've seen. I don't even know if the architecture is of his own design, but he's managed to make money from it.
I discovered on his website that he failed first year computer science. Needless to say I'm highly suspicious of some things. On the other hand, his videos laid foundations for furthering my interest. Win / win?

Edit: Most of the architecture came out of a book with minor modifications. He does reference the book if you are curious.