Harry The Bastard

For discussing the 65xx hardware itself or electronics projects.
kernal34
Posts: 27
Joined: 28 Jul 2006

Harry The Bastard

Post by kernal34 »

Can anyone explain how the clock circuit works. I can't seem to find Harry The Bastards website anywhere, which supposedly will explain it.

Thanks
fachat
Posts: 1123
Joined: 05 Jul 2005
Location: near Heidelberg, Germany
Contact:

Post by fachat »

ahmmm... which clock circuit? The 6502 takes a clock signal as input, and does not have a clock circuit itself.

Andre
Nightmaretony
In Memoriam
Posts: 618
Joined: 27 Jun 2003
Location: Meadowbrook
Contact:

Post by Nightmaretony »

www.archive.org has it on there, at least the code, dont know bout the rest....
"My biggest dream in life? Building black plywood Habitrails"
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

kernal34, I think we need to know a little more precisely what you're looking for. Do you want to know how an oscillator works, or how the 65xx processor and bus uses the clock, or how to use the on-board oscillator on a 65c02, or something else?
kernal34
Posts: 27
Joined: 28 Jul 2006

Post by kernal34 »

I guess nobody caught the title....

"Harry The Bastard's" clock circuit is used in several of the projects on this sight, but no one explains how it works. They point you to his web site, but it doesn't work.
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Post by BitWise »

He's referring to this circuit:
Image
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
fachat
Posts: 1123
Joined: 05 Jul 2005
Location: near Heidelberg, Germany
Contact:

Post by fachat »

Considering that it uses half a '04 and additional board space for a crystal, I'd rather stay with my approach of using a clock generator (available in various frequencies) in a DIL14 case (with only the 4 edge pins used).
That's probably why I didn't catch it...

Andre
Nightmaretony
In Memoriam
Posts: 618
Joined: 27 Jun 2003
Location: Meadowbrook
Contact:

Post by Nightmaretony »

That clock circuit is the standard crystal circuit. It is used on the arcade game Space Invaders. Stable and cheap to make. Basically, it is a simple loop with the signal inverting over one end of the loop to the other in a dynamic way. I dont pretend to understand exactly how it works, though.

http://www.hanssummers.com/radio/penning/index.htm
shows the schematic hand drawn
"My biggest dream in life? Building black plywood Habitrails"
blackadder
Posts: 24
Joined: 20 Mar 2006

Post by blackadder »

Here's a page with some info
http://www.gaby.de/z80/uexosc.htm
kc5tja
Posts: 1706
Joined: 04 Jan 2003

Post by kc5tja »

It is essentially a 180-degree phase-shift oscillator -- in this configuration, a Colpitts oscillator. The two inverters provide (over-)unity gain for the otherwise analog signal coming from the crystal. The fact that it's over-unity gain means that the signal is being clipped at the Vcc/GND rails -- thus, a digital output. Inside the circuit, however, the crystal acts as a band-pass filter, selecting only the frequency of the desired oscillation. The signal thus fed back to the initial inverter should approximate a real sine wave.
faybs
Posts: 106
Joined: 16 Oct 2006

Post by faybs »

fachat wrote:
Considering that it uses half a '04 and additional board space for a crystal, I'd rather stay with my approach of using a clock generator (available in various frequencies) in a DIL14 case (with only the 4 edge pins used).
That's probably why I didn't catch it...

Andre
Hi, I'm a newb :)

Long time C64 user, pro software developer, wanting to get into 6502 hardware as a hobby now that I have settled down a bit in life.

I've been looking at the 65816's datasheet from WDC, and it specifies that the maximum clock slew must be 5ns. Most of the TTL oscillators I see on web stores quote slews of 10ns for the kind of clock speeds the 65816 is normally used at (ie sub-20MHz). Are you using some sort of clock waveform shaping, am I looking at the wrong parts, or is the datasheet a bit too conservative?
fachat
Posts: 1123
Joined: 05 Jul 2005
Location: near Heidelberg, Germany
Contact:

Post by fachat »

I'm currently not using the 65816. But you made a good point, I shall have to look into that when I get to the 65816.

Andre
kc5tja
Posts: 1706
Joined: 04 Jan 2003

Post by kc5tja »

Don't bother -- I can already answer this one, since I have built a 65816-based system already.

The answer is, anything slower than 5ns slew on the clock input WILL cause the CPU to perform in a very flakey manner. Expect many crashes, and even memory locations being overwritten randomly. In short, unless you're driving the clock input with F-series logic, don't even think it will work. Because it won't.

It is best to drive the clock input with one of those pre-packaged CMOS clock oscillator cans; most of those already meet the 5ns slew rate requirement (though just barely).
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

There's more discussion of the 5ns stuff at:
viewtopic.php?t=646
viewtopic.php?p=5655
viewtopic.php?t=786

although the last one has links to two other discussions that it's now saying don't exist:
http://www.6502.org/forum/viewtopic.php?p=895
http://www.6502.org/forum/viewtopic.php?t=195
so I'd like to find out from Mike what's happening-- what the numbers at the end mean, and if they change.
faybs
Posts: 106
Joined: 16 Oct 2006

Post by faybs »

Thank you for the info! Sounds like the way to go then is a simple can TTL oscillator with say a 74F04 to shape the waveform? But then, except for the passives, we're sortof back to Harry's design...

One last question about Harry's design if I may. I'm a bit confused by the combination of digital and analog circuitry he uses so I can't tell - is the resulting clock frequency going to be that of the crystal, or half it? Also, I'm thinking of making my first board run at 4 MHz or below, so I don't have to worry about RF interference between circuit traces (or more likely wires in my wirewrap :)) Could his circuit handle that frequency as-is? I suspect so, but from reading this forum it seems like the clock is the 65xx's achilles heel (and linear electronics is not my forte right now) so I might as well save myself the headache and ask :)
Post Reply