Page 2 of 3
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Sun Jul 21, 2013 2:23 am
by smnanthny
If that is what is causing the problem, it seems strange that it is randomly 'glitching' in the way that it is even when the clock is held steady.
But thanks for pointing that out, I'll try a different way of single stepping the CPU and see if that fixes it

Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Sun Jul 21, 2013 2:34 am
by BigDumbDinosaur
If that is what is causing the problem, it seems strange that it is randomly 'glitching' in the way that it is even when the clock is held steady.
But thanks for pointing that out, I'll try a different way of single stepping the CPU and see if that fixes it

Single step circuits have been developed that utilize a combination of RDY and SYNC . I don't know if one exists around here. I unfortunately don't have one in my files that I can post for you to use. The basic principle is that when SYNC goes high RDY is asserted, which stops the MPU on the rise of Ø2. When RDY is released the MPU resumes. When SYNC goes high that indicates that the MPU is fetching an opcode.
The data sheet recommendations on Ø2 rise and fall time indirectly indicates that 74HC logic as a minimum should be used with these MPUs. I used 74AC in my POC units and can run them pretty fast.
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Sun Jul 21, 2013 2:39 am
by smnanthny
I just looked back over Garth's clock generation page and he has this circuit on there which approximately generates a 1uS pulse:
http://wilsonminesco.com/6502primer/SingleCyClk.jpg
This is just fed into the normal clock input though unlike what you're suggesting so would this be suitable? I've actually got some 74HC14's on their way in the mail
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Sun Jul 21, 2013 9:16 pm
by BigDumbDinosaur
I just looked back over Garth's clock generation page and he has this circuit on there which approximately generates a 1uS pulse:
http://wilsonminesco.com/6502primer/SingleCyClk.jpg
This is just fed into the normal clock input though unlike what you're suggesting so would this be suitable? I've actually got some 74HC14's on their way in the mail
It should work okay, although the 74HC14's output switching speed is slightly slower than WDC's 5ns recommendation. I doubt that it's that critical that one or two nanoseconds are going to matter.
In the future, I suggest you single-step via RDY and SYNC and use a free-running clock source (can oscillator). The handy thing about such an arrangement is that you can let the unit run at full speed as long as you want and then switch to single-stepping when you're ready to do so.
In your "production" design, it's best to feed the can oscillator into a flop (74AC74 or 74ABT74 are good choices) to get perfect symmetry and the most rapid possible rise and fall time on the signal. Place the oscillator, flop and MPU as close together as possible to minimize undesirable reactive effects that will cause the waveform to substantially deviate from the ideal. This way you can eliminate clock signal anomalies as possible causes of circuit malfunction.
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Sun Jul 21, 2013 9:49 pm
by smnanthny
Okey, well as this is just an educational thing for me to learn a bit more, I'll take a look into how single-stepping works with RDY and SYNC and try and implement that instead
Thanks for the information, this also led me to look up the different types of 74-series logic chips so now I have a better idea of HC, LS, etc ^_^
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Mon Jul 22, 2013 12:32 am
by GARTHWILSON
This also led me to look up the different types of 74-series logic chips so now I have a better idea of HC, LS, etc ^_^
http://wilsonminesco.com/6502primer/LogicFamilies.html in the 6502 primer covers this and has a few more links for further reading.
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Mon Jul 22, 2013 4:33 am
by BigDumbDinosaur
Okey, well as this is just an educational thing for me to learn a bit more, I'll take a look into how single-stepping works with RDY and SYNC and try and implement that instead
Thanks for the information, this also led me to look up the different types of 74-series logic chips so now I have a better idea of HC, LS, etc ^_^
Take a good read of Garth's primer on that subject—he sums it up quite well. You should not be building anything with 74LS—period. It's slow, has limited fanout, uses more power than CMOS logic and is...slow.
74HC is probably good up to 6-7 MHz in a well-designed application, above which you need to look at the faster 74AC (or much faster 74ABT) logic to maintain performance. My POC unit was built with 74AC logic (PDIP) and will boot at 15 MHz with a 55ns EPROM in the socket—it won't boot at that clock rate with the SCSI HBA plugged in due to the additional bus loading, a problem that will be addressed in the next version.
Also pay attention to Garth's discussion on the IRQ circuit and the problem of spurious (aka ghost or phantom) interrupts. This malady isn't unique to 65xx hardware—any wired-OR IRQ circuit is a potential victim.
Lastly, caveat emptor on any devices purchased through eBay, especially microprocessors. The seller might advertise a 65C02, but whose 65C02? Unless it's a genuine WDC part, you have no idea what you are getting. Ditto for those "pulls" being sold by Jameco—they aren't WDC parts. A lot of old Rockwell parts are floating around, none of which perform at the level of the W65C02S. Also, instruction sets differ between the Rockwell and WDC parts. I don't recommend building anything with the Rockwell parts unless they are freebies or close to it. The WDC parts are far more capable.
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Mon Jul 22, 2013 7:45 am
by smnanthny
I'll definitely read more in Garth's primer, finding it really interesting so far and not having any experience with CPUs, i'm learning a lot
Yeah I know what you mean about parts of eBay, had a few dodgy items in the past but I bought the 65C02 from Mouser to make sure it was genuine.
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Mon Jul 22, 2013 7:56 pm
by BigDumbDinosaur
Yeah I know what you mean about parts of eBay, had a few dodgy items in the past but I bought the 65C02 from Mouser to make sure it was genuine.
Jameco also sells the WDC parts. Pricewise, both Mouser and Jameco are about the same, but I often find Mouser's shipping charges (at least in the USA) to be lower.
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Mon Jul 22, 2013 8:17 pm
by smnanthny
I'm in UK and I believe mine came from Germany, so not sure where Jameco are based or if their shipping would have been cheaper. I actually ordered 2 buy accident so I have one spare as well ^_^ Just picked up a BBC Micro to fiddle around with as well
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Tue Jul 23, 2013 4:35 am
by BigDumbDinosaur
I'm in UK and I believe mine came from Germany, so not sure where Jameco are based or if their shipping would have been cheaper. I actually ordered 2 buy accident so I have one spare as well ^_^ Just picked up a BBC Micro to fiddle around with as well
I seem to recall that there is at least one WDC parts distributor in the UK. Perhaps Ed or Bitwise can advise.
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Tue Jul 23, 2013 5:34 pm
by BigEd
Hmm, WDC mention two, but I'm not very hopeful:
http://www.coltekukltd.com/contact-us.php
http://www.trgcomponents.co.uk/TrgGB/In ... oryID=4477
Personally I would buy from mouser's UK site, but there would be a shipping charge. Best plan is to organise a bulk buy and reship from the UK.
BTW, for anyone who doesn't know, there's a sticky thread about where-to-buy at
viewtopic.php?f=1&t=1953
Cheers
Ed
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Tue Jul 23, 2013 5:46 pm
by smnanthny
Cool thanks Ed. I was pretty happy with my purchase from Mouser so I'll probably stick with them if I order more chips in the future

Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Tue Jul 23, 2013 7:19 pm
by BigEd
Oh, could you say how much you paid for shipping?
Ta!
Re: W65C02S - Address bus alternates between a value and 0xF
Posted: Tue Jul 23, 2013 7:28 pm
by smnanthny
Shipping was £12 for 3 chips, 2 x W65C02S and 1 x W65C22S