schlae / comix-35

The COMIX-35 is an improved clone of the COMX-35 1802 home computer
108 stars 15 forks source link

Crystal oscillator circuit and U4 #1

Closed Ian-May closed 4 years ago

Ian-May commented 4 years ago

You are correct that a specific component is needed for U4, but a 74HC04 is not what is required for the circuit you have chosen. Your oscillator circuit is for use with unbuffered inverters (like a 74HCU04) which typically have a voltage gain in the hundreds. A buffered inverter (like a 74HC04) has a voltage gain of over 10,000. See National Semiconductor application note AN-340 which is on pdf page 76 of this data book http://bitsavers.org/components/national/_dataBooks/1983_National_74HC_Databook.pdf . A crystal-controlled oscillator should not oscillate without a crystal. If you remove the crystal from your 74HC04 oscillator it will, in my experience, oscillate at around 40 MHz or higher. With the crystal in circuit, it may oscillate at the crystal frequency, or the frequency measured without the crystal, or both at the same time. With a 74HCU04 in use it will not oscillate without a crystal. The disadvantage of the 74HCU04 is higher power supply current, which is unlikely to be an issue in your design. Using the other inverters in the 74HCU04 as inverters isn't a problem, it is a few nS faster than a 74HC04. See 74HC data book pdf page 130 for the 74HCU04 data sheet, oscillator circuit page 132. Otherwise nice re-design, not using 4000 CMOS is a good idea and your keyboard is light years ahead of the original.

schlae commented 4 years ago

Ha, I knew someone would comment on that. I did a bunch of experiments with different inverters (even got it working with 74LS04 but with wildly different component values). You are correct, ideally it should be a 74HCU04. I've found that, with the resistor values in the BOM, it works fine with a 74HC04 and does not oscillate without a crystal in the circuit. The measured gain of the 'HC04 wasn't quite as high as you've quoted, but I'm sure it varies quite a bit part to part. The important part is that other folks should be able to get away with using an HC04 if they're not able to source the HCU04.

Regardless, I've updated the design and added some further comments to the readme to clarify this.

Ian-May commented 4 years ago

Glad to have fulfilled your expectations :) Thanks for making the changes. The gain figures came from the app. note, which is nearly 40 years old, so little wonder parts are different today. Can I ask a couple of questions? Who made your PCB (I may be able to avoid tooling charges if I use the same manufacturer) and what did it cost? Thanks.