Clock generation for 6502

Building your first 6502-based project? We'll help you get started here.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Clock generation for 6502

Post by BigDumbDinosaur »

Nogard wrote:
I am experimenting a bit with direct crystal connection, but it does not work, could you please check my connection?
You need to post a schematic. BTW, when you say "crystal" are you referring to an actual crystal or a can oscillator?
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
ttlworks
Posts: 1464
Joined: 09 Nov 2012
Contact:

Re: Clock generation for 6502

Post by ttlworks »

Nogard wrote:
could you please check my connection?
Rockwell R6502 datasheet.

Pin 36 is NC, but it's tied to +5V. //it's NC for the R65C02, too.
Pin 1 is GND, but it's left open.

Pin 40 is /RES, the switch ties it to GND, that yes, but you better add a 4k7 pullup resistor from /RES to +5V.
Without that pullup resistor, I think that /RES won't be able to reach logic HIGH level, so the CPU won't come out of a RESET.

Would suggest to connect the two LEDs to A14 and A15 instead.
Then to use resistors (maybe 1k ?) for pulling the data bus Bits either to GND or +5V, for faking $EA on the data bus.
Resistors are to limit the current at the CPU data bus pins, just in case the CPU might try to write something on the data bus by accident.

$EA is the NOP instruction (which does nothing but incrementing PC to be placed on the address bus).

If the CPU comes out of a RESET, it first reads the RESET vector (which would be $EAEA),
then starts executing code at $EAEA, the code always will be $EA.

A NOP takes two machine cycles, at 2MHz PHI2 the 6502 is supposed to loop through the 64kB address range ca. 15 times per second,
might probably be slow enough to see the LED on A15 flickering.

Also, when building the computer later, please don't forget to add 100nF ceramic capacitors between GND and +5V at every chip
(including the metal can oscillator which actually is sort of a chip too).
User avatar
1024MAK
Posts: 155
Joined: 14 May 2015
Location: UK

Re: Clock generation for 6502

Post by 1024MAK »

ttlworks wrote:
(including the metal can oscillator which actually is sort of a chip too).
These definitely need a decoupling capacitor, as they do contain active semiconductor circuitry.

Mark
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: Clock generation for 6502

Post by BillO »

1024MAK wrote:
These definitely need a decoupling capacitor, as they do contain active semiconductor circuitry.
Mark
Some contain decoupling but it certainly can't hurt to add more if you are not sure.
Bill
Post Reply