Using ICs to make a clock and step down a crystal frequency

I don't know if this is the best place for this, but /diy/ probably aren't experts on digital logic. So I want to build a clock myself using logic ICs. I know how to use basic t/jk flip-flop counter ICs to step a clock down from minute frequencies to hour frequencies and such, but I have no clue on how to convert a multi kHz crystal frequency to a 1Hz/0.5Hz needed to feed into the first counter and the second indicator. As far as I an see, you can't buy modulo 70,000 counters, so will I have to chain a bunch of 4 flip-flop ICs until I get my wanted frequency? Or is there some other way of generating a sub-ELF? Help appreciated, thanks.

Other urls found in this thread:

en.wikipedia.org/wiki/Diode_logic
electroschematics.com/4843/1-hz-pulse-generator/
hackaday.com/tag/logic-noise/page/2/
twitter.com/SFWRedditImages

the quartz crystal resonator vibrates at 32,768 Hz. This frequency is equal to 215 cycles per second. A power of 2 is chosen so a simple chain of digital divide-by-2 stages can derive the 1 Hz signal needed to drive the watch's second counter.

>2^15

Use a Binary Counter IC like a 74HC4040. Each of those are 12 bit so you'll need to use two to get a count that goes up to 70,000: The first counter is clocked by the crystal osc and the second is clocked by the 12th bit of the first. AND together all the bits that will be high when the count is 70,000 and run that to the counter reset pins.

This is a VGA signal generator I designed using that approach to generate the sync pulse timing from a crystal. AND gates were implemented with diode logic.

overkill

Thanks for the replies!
Also why do you have ally hose diodes where the gate transistors should prevent backflow?

Diodes aren't there to prevent backflow. It's how I'm implementing most of the logic to get things to happen at the right binary counter values.

en.wikipedia.org/wiki/Diode_logic

never thought about it like that. Nice.

I'm confused about the VGA. Isn't this a simple clock? Why would a video connector be involved?

That's a circuit used for generating a video signal. I posted it because it uses the concept I was explaining of using binary counters to divide a crystal frequency by whatever number you want.

The clock is being divided by 2688 because the counter resets every time it reaches 101010000000.

logic gates make me cum in my pants

>I don't know if this is the best place for this, but /diy/ probably aren't experts on digital logic.
They are. There are a lot of actual engineers there.
Chain counters (you can buy a counter IC!) to divide the frequency.

>diodes and a pull up resistor

Absolutely disgusting.

I know about counter ICs, but my local electronics store only has 4bit counters, so I'd need to chain four together. The OP pic shows a watch without a large cluster of ICs, so I guess it uses a dedicated clock IC. The original point of the thread was to ask whether I have to chain all those counters together or not.

Keep in mind that if a counter divides by 16 and then you divide that signal by 16 then you will divide by 16*16=256. So you don't necessarily need many counters.

>> 8055720
> The original point of the thread was to ask whether I have to chain all those counters together or not
You do.

Of course, the sane way to build a digital clock nowadays is with an 8-bit microcontroller (PIC, Atmel, 8051, etc).

This. /diy/ is full of your more hands on people (think: maker community) whereas Veeky Forums has your more theory/academia people (think: university clubs and communities).

Ya that guy's circuit is retarded. Imagine the hours these guys spend toiling.

You'll have more counter bits than you need so you're going to need a little counter reset logic as well.

Clearly he's using diode logic to OR those signals, it's actually pretty cheap to do it that way.

I don't know why you're shitting on the guy, especially if you're not going to elaborate how you would do it. Makes you look like an idiot desu senpai.

>i dont understand the application therefore the designer is dumb

no, you're a retard. please leave designing to the grown ups, kid.

Well, if you only want to use an IC you can probably use an attiny and program it to get a 1Hz trigger.
Maybe not what you want, but surely easy and cheap

That's another way of doing it.

Besides that there are a few RTCs with 1Hz TTL/CMOS outputs. Some RTCs actually come with the 32kHz watch crystal inside which simplifies it even more.

The impression I got from OP is they wanted a mostly discreet implementation though.

Why are you using a kHz crystal. Couldn't you make a square wave generator from an OP AMP?

well you could do it from transistors, or an LC tank circuit if you wanted. The advantage of the crystal is stability and ease of implementation.

I recently was using a wienbridge to generate a cal signal for a signal conditioning board, the THD was phenomenal but the frequency drift with temperature was awful.

Well, tell me something, i wanna build something that, turning a knob, could generate a trigger signal from 0.1 Hz to 10kHz as smoothly as possible.
Can you give me some tips to start to learn to this project?

There's like a million ways to make this sort of thing, a lot of it depends on whether you want to do analog, or digital, and how discrete you want to get.

Basically you want to look into oscillators. It's better to pick something and try it than to sit around debating what the best implementation is, you'll learn a ton more that way. You'll also learn more about which domain you enjoy playing in: analog or digital.

So just build any oscillator, pick a simple one off a search engine, then play around with it enough so you can predict a specific frequency and create it.

The most important thing is to just build and test something, there are an awful lot of people getting into EE who've literally done nothing but whatever their coursework entails and its flooding the market with shitty engineers like the idiots above complaining about the diode logic. Do something, do anything, just physically build and try something.

Yeah, I'm just a civil engineer student and an electronic musician. I don't have so much electronic knowledge, but i have quite a bit of practice. :)

I need something stable, well, not really stable, just enought for the human ear.

My bigger concern is bout the wide frequency range i need...

This is for the op
electroschematics.com/4843/1-hz-pulse-generator/

Just as an aside HackaDay had a pretty decent series on using logic circuits to make noise/music. I stopped going there after the long slide into the modern "buy stuff off the shelf, use microcontorllers for everything" movement, but the "Logic Noise" series was pretty decent:

hackaday.com/tag/logic-noise/page/2/

They start with a simple oscliator and go into sequencers, it's worth checking out.

Thanks! I will check!
I love microcontrollers, they allow me to do very complex things with just an IC and some line of code, but really, you can't do everything. For example my smooth pot controlled wide frequencis range clock generator.

I have found this ( pic related ) with f=1/(1.4*R*C).
With a 100k pot and 100uF cap i should be perfectly ok

Yeah the 555 Timer is a staple of oscillators :P

I don't have a problem with micros or people using them to do stuff, I just got tired of seeing every article about people building kits on a site that was originally about hacking stuff.

LC and RC based oscillators aren't good for applications like this. A watch's oscillator needs to be extremely accurate and stable or you're going to need to correct it all the time. Run of the mill capacitors, resistors, and inductors can be up to 10% off from their specified value. You can find 1% or even 0.1% ones, but that can still lose or gain you a few minutes every day. They're also effected by temperature, so even if you do get a perfectly timed oscillator it won't stay that way.

A crystal oscillator is going to be almost exactly the frequency it says on the case, and the effects of temperature is much less than RC or LC oscillators.

I originally designed the circuit using logic chips like a normal person, but then I realized I could get the circuit board to a quarter of the size if I implemented most of the logic with diodes. I know that's counter-intuitive. This project had to be built on a single sided perfboard (100 mil grid). I needed a lot more space and jumper wires to connect the logic chips than I did with diodes because those could be dropped wherever was most convenient.

/diy/ is full of arduino retards that can't design circuits or code properly

You did a good job, I was the one pointing out the diode logic. It's much cheaper to slap a few diodes in there than a couple of ICs.

The people who were bitching about it clearly didn't understand the design, and should have refrained from shitting all over their keyboards.

but you can't just MAKE your own ICs.....thats impossibel