32 kHz square wave circuit

Status
Not open for further replies.

ced

New Member
Hi,
I am looking for a simple square wave circuit with for instance a Nand chip and a 32kHz quartz plus a few components to get a signal with at least 4 V peak to peak .
I've seen a few circuits for higher frequency crystal .
Does someone have a scheme ?
Thanks,
Cédric
 
Hi Ken,
Thanks for your help .
Have you an idea about the way to choose the resistor and capacitors .
Up to now, as I didn't have a CD4011 , I've tried to do the circuit with a
74HCT04 .
The capacitors I use are 100 pF and I've tried several resistor values from 1MOhm to 10MOhm without getting any oscillations .
Is there another way to get these values than trying every (R,C) possible couple ?
There may be a few ones
Cédric
 
Your problem might be that you are using a 74HCT04 instead of a 74HC04 that has a more symmetrical input voltage threshold.
 
The crystal is ok as it oscillates nice with the prebuilt oscillator circuit inside the pic16F84 or pic16F628 .
The problem is that I'd like to use just one pin for the clock, that's why I need to do an external 32kHz clock .
I also had the idea that a CMOS inverter would be better.
As I only had 74HCT04 by hand at home, that's why I used it for my experiments .
I'll try to get a 74HC04 , that might be the clue with the circuits on the sci.electronics
link that Ken proposed. That's what I was looking for
Thanks guys for your help
 
Because of the price, the pic 16F676 is one of the cheapest but only has 12 I/O pins .
Anyway, I've seen some pic16F887 with a really good price , and switching to it would solve these problems .
In the closest electronics shop from my home , there's more or less 7 dollars difference, between 16F676 and the bigger pics, whereas a single 74HC04 costs 0,30 $ .
I am doing this clock as a project for a kid , thus it has to be cheap , a kind of introduction to micro-controllers and programmation .
 
can't tune the oscillator

Hi,
I've been trying to make a 32.768 kHz oscillator following this **broken link removed** .
It does oscillate, but the frequency is always slightly higher than 32768 Hertz .
I've tried several values 22 , 27, 33, 39, 47 pF without the frequency getting closer to 32768 than 32776 Hertz .
In order to tune I have put an adjustable capacitor of different values without success .
Is there a way to slow down a little bit the oscillator ?
Thanks
 
Last edited:
Make it on a compact pcb, not on a breadboard that has stray capacitance and stray inductance all over the place.
Use a 0.1uf ceramic supply bypass capacitor.
 
Ok, I'll try both of your advices .
In the scheme, the second capacitor is defined as 39 pF adjustable,
What do you think that means :
** ) is it an adjustable which max value is 39 pF
** ) or else the most likely correct value should be 39 pF , thus 39 pF should be within the range of the adjustable capacitor and not the upper limit of its capacitance .
Bye
 
Last edited:
Hi,
I thought my problems were done, but actually, I still have a problem.
The output of the 32768 kHz oscillator is fine, it goes from 0V to 5V, the edges are sharp . I would have liked to divide the frequency using a 74HCT4060 counter .
The input signal is fine on pin n° 11, pin 12 (MCLR) is tied to ground and I've put a 330nF capacitor between the power supply and ground, and the signal on the output is anything but a 32768 kHZ divided clock.
I can't get any stable view of it, even using the scope with level-triggered sweep , it's not periodic .
What is strange is that I've already changed the first 4060 and I get
exactly the same results with the second one .
If anyone has an idea about what's going wrong , thanks for your help
Cédric
 
Last edited:
You should use a symmetrical 74HC4060 and use its built-in oscillator.
The 74HCT4060 is not symmetrical.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…