Clock circuit for NMOS 6502 - Gate Delay on Phi2?

Building your first 6502-based project? We'll help you get started here.
User avatar
GaBuZoMeu
Posts: 660
Joined: 01 Mar 2017
Location: North-Germany

Re: Clock circuit for NMOS 6502 - Gate Delay on Phi2?

Post by GaBuZoMeu »

Rockwells circuit is the typical standalone TTL crystal oscillator. Completely independant of anything else. The same here:
(c)epac.jpg
(called (C)EPAC, a publication from the German monthly c't)

Using this autonomous oscillator circuit allows to insert a clock divider (which in turn permits the use of smaller and/or cheaper higher frequency crystals). They use LS14 or HC14 (schmitt-trigger) that performs a little better for the reset circuitry (upper right corner) and not worse within the oscillator.

I think the older MOS circuits are created to minimize the amount of glue logic. In 1975 each gate was valuable :)
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Clock circuit for NMOS 6502 - Gate Delay on Phi2?

Post by BigEd »

Might be worth noting that these days clock cans are much preferred - they are encapsulated oscillators, literally.

Also might be worth noting that a clock divider gives the possible advantage of a 50% duty cycle, and control over the edge rate and drive. (Clock can specs can be 40/60 or similar, IIRC.)
kazzie
Posts: 20
Joined: 27 Mar 2018

Re: Clock circuit for NMOS 6502 - Gate Delay on Phi2?

Post by kazzie »

1024MAK wrote:
First, just to say, I've been lurking here for far too long :oops: I'll try to make an effort to post more often... So hello to those who don't know me from other forums.
My first thought was "you're not lurking, I've read loads of your posts", then I realised I wasn't thinking of this forum!
1024MAK wrote:
Crystal oscillators using logic gates back then, was one of those areas of electronics that was known in some circles as a "black art" (hard to understand, so left to the people who were 'good' at it). So data sheet designs would often be copied.
GaBuZoMeu wrote:
I think the older MOS circuits are created to minimize the amount of glue logic. In 1975 each gate was valuable :)
Yes, I think we're on the money here.
BigEd wrote:
Might be worth noting that these days clock cans are much preferred - they are encapsulated oscillators, literally.
Which is what I've decided to use in my build (see first post). And the double inverter can stay where it is, so I hopefully won't be creating any new timing issues.
kazzie
Posts: 20
Joined: 27 Mar 2018

Re: Clock circuit for NMOS 6502 - Gate Delay on Phi2?

Post by kazzie »

For anyone who's interested, I've succeeded in getting my System 1 clone running. (Cassette interface is pending.) I've got a write-up of the build on the Acorn-oriented Stardot forums.

I now have a nice platform for playing around with some 6502 assembly in the future!
User avatar
GaBuZoMeu
Posts: 660
Joined: 01 Mar 2017
Location: North-Germany

Re: Clock circuit for NMOS 6502 - Gate Delay on Phi2?

Post by GaBuZoMeu »

Congratulations!

May I asked how many inverters/buffers you have left in your oscillator circuit?
kazzie
Posts: 20
Joined: 27 Mar 2018

Re: Clock circuit for NMOS 6502 - Gate Delay on Phi2?

Post by kazzie »

GaBuZoMeu wrote:
Congratulations!

May I asked how many inverters/buffers you have left in your oscillator circuit?
I used the two LS04 inverters that were used in the original circuit. Thus, except for the use of a can oscillator instead of a crystal and resistor, the whole board* is wire-for-wire equivalent to an original System 1.

*Except for the cassette interface, which I haven't built yet. There's space reserved for that to be added at a later date.
linker3000
Posts: 23
Joined: 02 May 2015

Re: Clock circuit for NMOS 6502 - Gate Delay on Phi2?

Post by linker3000 »

kazzie wrote:
Hello,

I'm working on a work-alike build of an Acorn System 1, which had an NMOS 6502 running at 1MHz. I've got a fistfull of Rockwell 6502s to hand, but the 1MHz crystal was a bit more bother. It seems they only exist in the big HC-51 package, which is too big for my board, so I'm planning on using an 8-pin DIP oscillator instead.

Attached is an extract of the System 1's circuit diagram:
system1clock.png
(As can be seen, the System 1 supported using a capacitor instead of a crystal for industrial applications where timing was not critical.)

I'll be connecting the DIP oscillator directly to Phi0in, and removing the resistor and crystal/capacitor. That'll leave me with Phi2out passing through a pair of inverters on its way to fee the rest of the board. Are the inverters needed? The only benefit I can foresee is that using the 74LS04 to drive the board's clock may be preferable to using the 6502, and that there are two extra gate delays on the Phi2 clock. If these weren't needed, why wouldn't the designers have taken Phi2 direct from the 6502 and foregone the second inverter? Or would this mean the other devices connected to Phi2 would affect the crystal's timing?

Looking at Garth Wilson's primer on clock generation, he suggests a different crystal-based circuit, where Phi2 goes directly to the board, and isn't used in the clock generation. (This is the style of circuit used by Acorn in their later BBC Microcomputer.) This suggests that the double-inversion isn't needed in my case.

If the two inverters are no longer necessary, I may repurpose them for something else.
Hi,

Did you ever complete the project? I have yet to start!!

viewtopic.php?f=12&t=3286&hilit=planning+build+acorn#
kazzie
Posts: 20
Joined: 27 Mar 2018

Re: Clock circuit for NMOS 6502 - Gate Delay on Phi2?

Post by kazzie »

linker3000 wrote:
Hi,

Did you ever complete the project? I have yet to start!!

viewtopic.php?f=12&t=3286&hilit=planning+build+acorn#
Just stumbled across this post while looking to reference what I'd learned about oscillator circuits; sorry for the late reply!

I made a build thread over on stardot.org, so all the gory details are there.

The machine is fully built and working, with the exception of the cassette circuitry, which needs more debugging: it can't save and load programs to cassette at the moment, but will run programs that are typed in or in ROM. I'll probably be attacking it again over the winter months...
Post Reply