Using a 4pin crystal with an old 6502
Using a 4pin crystal with an old 6502
I have an old Rockwell chip with label "R6502-13" that i'd like to do the "Free Run" test. I'm guessing it's an NMOS chip?
I've read the 6502 Primer: Clock Generation but I do not have the parts yet as mentioned for the NMOS chip. What I have is this 4pin crystal. Will this work?
Last edited by M0001 on Wed Jan 22, 2020 2:21 pm, edited 1 time in total.
// tinkerBOY
Re: Using a 4pin crystal with an old 6502
Yes. Not only will that work, it's the preferred method.
And yes, I believe that is an old NMOS chip which has a minimum frequency to run (IIRC, something like 100KHz).
A modern WDC 65C02 would be better but the NMOS version can certainly be used (assuming it works).
And yes, I believe that is an old NMOS chip which has a minimum frequency to run (IIRC, something like 100KHz).
A modern WDC 65C02 would be better but the NMOS version can certainly be used (assuming it works).
Cat; the other white meat.
Re: Using a 4pin crystal with an old 6502
cbmeeks wrote:
Yes. Not only will that work, it's the preferred method.
And yes, I believe that is an old NMOS chip which has a minimum frequency to run (IIRC, something like 100KHz).
A modern WDC 65C02 would be better but the NMOS version can certainly be used (assuming it works).
And yes, I believe that is an old NMOS chip which has a minimum frequency to run (IIRC, something like 100KHz).
A modern WDC 65C02 would be better but the NMOS version can certainly be used (assuming it works).
// tinkerBOY
Re: Using a 4pin crystal with an old 6502
So I tried it on a breadboard and connected all the necessary pins including the data bus pins to run the NOP code "ea". I' ve also connected one LED to one of the address bus. Powered it with a 5v power supply but I don't see to get any activity from the led. Anything I missed?
// tinkerBOY
Re: Using a 4pin crystal with an old 6502
M0001 wrote:
So I tried it on a breadboard and connected all the necessary pins including the data bus pins to run the NOP code "ea". I' ve also connected one LED to one of the address bus. Powered it with a 5v power supply but I don't see to get any activity from the led. Anything I missed?
And make sure the can oscillator is the right way round.
This is where an oscilloscope, even a cheap one, can be really handy just to check a few things.
There is also the possibility of a fake/broken chip - if this is something you bought off ebay. Do you have anything with a real working 6502 in it that you could use to check?
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Re: Using a 4pin crystal with an old 6502
I have tested the led to be working fine. For the 6502, it’s also tested to work just fine with a clone replica of Apple I i assembled. For the crystal i have no way of testing it though. I will definitely get an Oscilloscope in the near future.
I tried several nmos 6502 chips i have laying around but but couldn’t seem to do the “free run”.
I tried several nmos 6502 chips i have laying around but but couldn’t seem to do the “free run”.
// tinkerBOY
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: Using a 4pin crystal with an old 6502
Was Rockwell still manufacturing NMOS on the 45th week of 2011? Or am I reading something incorrectly ...
I also noticed on first glance that your reset circuit might possibly be cause for concern.
I also noticed on first glance that your reset circuit might possibly be cause for concern.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!
Mike B. (about me) (learning how to github)
Mike B. (about me) (learning how to github)
Re: Using a 4pin crystal with an old 6502
It looks like the jumper wire for the VCC is not intact so i pressed it down and made sure there’s 5v on that pin. Sure thing, now it’s working. 
Now I just need to find a way to slow down the 1mhz clock so I can clearly see what’s happening. Is it possible to slow it down to maybe the minimum 100khz clock?
Now I just need to find a way to slow down the 1mhz clock so I can clearly see what’s happening. Is it possible to slow it down to maybe the minimum 100khz clock?
// tinkerBOY
Re: Using a 4pin crystal with an old 6502
You can divide by 2 with a Flip Flop, so a single 74xx74 dual flip flip would give you options of 500khz and 250khz, chain 2 together and you'd have 125khz and 62.5khz too.
Or use a counter, something like a 74xx93 would give you the same 4 clock rate options as pair of 74s.
(I wonder about that date code too)
Or use a counter, something like a 74xx93 would give you the same 4 clock rate options as pair of 74s.
(I wonder about that date code too)
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Using a 4pin crystal with an old 6502
Welcome.
As Drogon said, put the LED (with series resistor) on A15 which will change states the most slowly so you can actually see it flashing.
As cbmeeks said, the oscillator can you have is the preferred method. That's not just a crystal. I just now edited that page of the 6502 primer to clarify that. A crystal by itself will not oscillate, any more than a bell just sitting there will ring if it's not being struck. It has to have the other circuit components around it to produce a signal. The oscillator can has the entire circuit to do that.
Like barrym95838, I doubt Rockwell was making any 65xx parts in 2011 (which the date code on yours says). I'm all the more sure they weren't making any NMOS 6502's anymore by then, so you definitely have a counterfeit there. There's quite a counterfeiting industry in China, with such parts showing up on eBay all the time. They pull parts out of old circuit boards, clean them up, sand the tops, and re-mark them. See https://www.youtube.com/watch?v=5vN_7NJ4qYA . I don't know why they don't just put the same markings back on, or just leave the markings alone. According to this pie chart from Wikipedia, China produces nearly twice as many counterfeit products as all other countries combined:
Anyway, it's best to just buy from authorized distributors. We try to keep our sticky topic "65xx parts sources" up to date.
As Drogon said, put the LED (with series resistor) on A15 which will change states the most slowly so you can actually see it flashing.
As cbmeeks said, the oscillator can you have is the preferred method. That's not just a crystal. I just now edited that page of the 6502 primer to clarify that. A crystal by itself will not oscillate, any more than a bell just sitting there will ring if it's not being struck. It has to have the other circuit components around it to produce a signal. The oscillator can has the entire circuit to do that.
Like barrym95838, I doubt Rockwell was making any 65xx parts in 2011 (which the date code on yours says). I'm all the more sure they weren't making any NMOS 6502's anymore by then, so you definitely have a counterfeit there. There's quite a counterfeiting industry in China, with such parts showing up on eBay all the time. They pull parts out of old circuit boards, clean them up, sand the tops, and re-mark them. See https://www.youtube.com/watch?v=5vN_7NJ4qYA . I don't know why they don't just put the same markings back on, or just leave the markings alone. According to this pie chart from Wikipedia, China produces nearly twice as many counterfeit products as all other countries combined:
Anyway, it's best to just buy from authorized distributors. We try to keep our sticky topic "65xx parts sources" up to date.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Using a 4pin crystal with an old 6502
Martin A wrote:
You can divide by 2 with a Flip Flop, so a single 74xx74 dual flip flip would give you options of 500khz and 250khz, chain 2 together and you'd have 125khz and 62.5khz too.
Or use a counter, something like a 74xx93 would give you the same 4 clock rate options as pair of 74s.
(I wonder about that date code too)
Or use a counter, something like a 74xx93 would give you the same 4 clock rate options as pair of 74s.
(I wonder about that date code too)
If the chip i have is an old NMOS, is it possible to single pulse it or slow down the oscillator to about 100khz? I think it's mentioned in the 6502 Primer: Clock Generation that it's not possible.
// tinkerBOY
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Using a 4pin crystal with an old 6502
M0001 wrote:
If the chip i have is an old NMOS, is it possible to single pulse it or slow down the oscillator to about 100khz? I think it's mentioned in the 6502 Primer: Clock Generation that it's not possible.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Using a 4pin crystal with an old 6502
GARTHWILSON wrote:
M0001 wrote:
If the chip i have is an old NMOS, is it possible to single pulse it or slow down the oscillator to about 100khz? I think it's mentioned in the 6502 Primer: Clock Generation that it's not possible.
So I built a clock on a breadboard that I can adjust and one that I can single pulse which both use a 555 timer. Both clocks work on this particular 6502 chip including the single-pulse. One thing I noticed though if I use the single-pulse clock when I leave it off for a while and single pulse it again, the outputs from the address bus do not seem to continue from where it stopped. It works fine though as long as I keep single-pulsing it and not stopping for maybe a while.
// tinkerBOY
Re: Using a 4pin crystal with an old 6502
M0001 wrote:
One thing I noticed though if I use the single-pulse clock when I leave it off for a while and single pulse it again, the outputs from the address bus do not seem to continue from where it stopped. It works fine though as long as I keep single-pulsing it and not stopping for maybe a while.
FWIW, I do remember that the 6800 was spec'd to run down to about 160 KHz, or something like that.
If you want to single-step these CPUs, you can do it by bringing the RDY low (while continuing to give it a full-speed clock), which will stop processing either immediately or, if a write cycle is in progress, at the end of that write cycle.
Last edited by cjs on Sat Jan 25, 2020 7:18 am, edited 2 times in total.
Curt J. Sampson - github.com/0cjs
Re: Using a 4pin crystal with an old 6502
It's all true - but note that it's the max cycle time which is the constraint here. The general advice is to go no slower than 100kHz for reliable operation. In practice you've probably got some tens of milliseconds before charge leakage starts to flip values, maybe more: for manual experimentation this is no big deal, but reliable operation in the field is another matter. And if you're trying to debug something, you don't want an extra source of uncertainty!