Do I have a faulty 65C02?

For discussing the 65xx hardware itself or electronics projects.
adrianhudson
Posts: 169
Joined: 30 Apr 2022
Location: Devon. UK
Contact:

Re: Do I have a faulty 65C02?

Post by adrianhudson »

I thought I would build a simple NOP tester thingy. I want to prove to myself that I don't have a faulty 65C02.
IMG_20220623_164528.jpg
I decided to forget the LEDs and use my (not very good) 'scope
I expected a square wave on the address lines doubling in wavelength as I work up through the address lines A0-A15.
I further expected A0 to be twice the clock frequency.
I indeed got exactly that - that's good
-but-
Can anyone explain the glitches in voltage in the address lines that go in time with the clock? (Address lines are yellow, clock blue)
Also, why is there a double trace on the Low part of the address?

This is A0
IMAGE1.png
IMAGE1.png (3.92 KiB) Viewed 726 times
and this is A1
IMAGE2.png
IMAGE2.png (3.97 KiB) Viewed 726 times
Edit: I forgot to say, the whole idea of the NOP tester was to look for oddities with IRQs. You may remember from above that one of the things I seem to be encountering are spurious (and lots of) interrupts, even though IRQ pin is tied high. With the NOP tester I should get a nice sequence of binary count on the address pins, if this sequence suddenly goes out of sequence that tells me there are spurious interrupts happening. If it counts nice and sequentially then that proves there aren't interrupts happening. Further, the 6502 is out of my main circut, further removing uncertainties.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Do I have a faulty 65C02?

Post by BigEd »

If an interrupt were taken, you'd see three consecutive writes - you should be able to see that clearly on the RnW line.

You have no bypass capacitors, by the look of it, so it's not surprising that each clock edge is causing a bounce seen on other signals.
adrianhudson
Posts: 169
Joined: 30 Apr 2022
Location: Devon. UK
Contact:

Re: Do I have a faulty 65C02?

Post by adrianhudson »

Ahh, right. Thank you! Simple as that.
I'll look at the R/W line.
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Do I have a faulty 65C02?

Post by BigDumbDinosaur »

As Ed noted, there are no bypass capacitors. Try adding some and see what happens.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
adrianhudson
Posts: 169
Joined: 30 Apr 2022
Location: Devon. UK
Contact:

Re: Do I have a faulty 65C02?

Post by adrianhudson »

BigDumbDinosaur wrote:
As Ed noted, there are no bypass capacitors. Try adding some and see what happens.
Yep. That was it. Bypass capacitors improved things a lot. Thanks for that. I just wondered what it was. I will know if I see it again!
Paganini
Posts: 516
Joined: 18 Mar 2022

Re: Do I have a faulty 65C02?

Post by Paganini »

Hi Adrian,

As I was researching my similar problem I came across this:

https://web.archive.org/web/20160410002 ... anding.htm

You might find it helpful.
"The key is not to let the hardware sense any fear." - Radical Brad
adrianhudson
Posts: 169
Joined: 30 Apr 2022
Location: Devon. UK
Contact:

Re: Do I have a faulty 65C02?

Post by adrianhudson »

Paganini. Thank you. Very much appreciated.
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Do I have a faulty 65C02?

Post by BigDumbDinosaur »

adrianhudson wrote:
BigDumbDinosaur wrote:
As Ed noted, there are no bypass capacitors. Try adding some and see what happens.
Yep. That was it. Bypass capacitors improved things a lot. Thanks for that. I just wondered what it was. I will know if I see it again!
In digital circuits, bypass capacitors are like money: you can never have too much. :D
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Do I have a faulty 65C02?

Post by GARTHWILSON »

adrianhudson wrote:
Garth, I'll be more than happy if I get something working at 1Mhz.
Well, again, it's not the MHz that hurts you, but rather the rate at which signals slew from a logic-low level to a logic-high level, or vice-versa; and the W65C02 and 74AC parts have much faster edge rates (slew rates) than what I got going in 1986 or '7 with 2MHz parts on a solderless breadboard. Jack Ganssle's YouTube video, "I Only Probed the Board With a Scope - Why Did My Board Crash?," the part from about 2:20 to 3:00, graphically shows on an oscilloscope that the ugly ringing remains unaffected as he turns the clock frequency up and down. (This is linked to in the AC-performance page of the 6502 primer.) The #1 thing you have to keep clean is the clock line; but these faster changes on other lines can inductively couple into the clock line. If it's bad enough, the clock line will now appear to have extra edges that are coming too close together for parts to meet the timing requirements.

We had a situation in the 1990's at work where we used a particular IC successfully in our products, and then the manufacturer changed the wafer-fab process and increased the slew rate, without notice. Although the operating frequency remained the same, the faster slew rate caused problems that suddenly meant we had a product we couldn't sell until we scrambled to find a solution.
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?
adrianhudson
Posts: 169
Joined: 30 Apr 2022
Location: Devon. UK
Contact:

Re: Do I have a faulty 65C02?

Post by adrianhudson »

It took ages but I rebuilt the SBC on new breadboard over the last couple of days.
Exactly the same result. A seeming lockup of interrrrrrrrrrrupts even with the IRQ and NMI pins tied high.

Today the new 65C02 arrived. Plugged it in and it worked immediately.
So, it indeed was faulty!
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Do I have a faulty 65C02?

Post by BigDumbDinosaur »

adrianhudson wrote:
It took ages but I rebuilt the SBC on new breadboard over the last couple of days.
Exactly the same result. A seeming lockup of interrrrrrrrrrrupts even with the IRQ and NMI pins tied high.

Today the new 65C02 arrived. Plugged it in and it worked immediately.
So, it indeed was faulty!

From where did you get the old 65C02?
x86?  We ain't got no x86.  We don't NEED no stinking x86!
adrianhudson
Posts: 169
Joined: 30 Apr 2022
Location: Devon. UK
Contact:

Re: Do I have a faulty 65C02?

Post by adrianhudson »

Mouser UK.

New one is from a good supplier on eBay. Mouser have a minimum order value that means if you buy something for £1, p&p is £29 (minimum orde value of £30).
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Do I have a faulty 65C02?

Post by GARTHWILSON »

I wonder if the new one is a slower one, even if mismarked (as there are so many counterfeits from China's "refurbishing" industry—see the warning about them in the 65xx parts sources topic head post, and the links there). If the earlier one truly was bad (not just too fast for the build), you probably damaged it with static discharge. I have been responsible for possibly millions of ICs at work, all bought from legitimate manufacturers' distributors, and we have never gotten a DOA one AFAIK. All I can think of is one 65c22 from Rockwell many years ago that seemed to have a bondwire that let go after it was subjected to a lot of vibration in the field. Manufacturers' thorough testing and packing makes sure only good ones reach the market. Members here frequently post that they seem to have gotten a bad one; but my experience says you never will as long as you buy from legitimate distributors.
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?
adrianhudson
Posts: 169
Joined: 30 Apr 2022
Location: Devon. UK
Contact:

Re: Do I have a faulty 65C02?

Post by adrianhudson »

GARTHWILSON wrote:
I wonder if the new one is a slower one, even if mismarked (as there are so many counterfeits from China's "refurbishing" industry—see the warning about them in the 65xx parts sources topic head post, and the links there). If the earlier one truly was bad (not just too fast for the build), you probably damaged it with static discharge. I have been responsible for possibly millions of ICs at work, all bought from legitimate manufacturers' distributors, and we have never gotten a DOA one AFAIK. All I can think of is one 65c22 from Rockwell many years ago that seemed to have a bondwire that let go after it was subjected to a lot of vibration in the field. Manufacturers' thorough testing and packing makes sure only good ones reach the market.
I am pretty sure the old one was a good one. It came from Mouser and I can't believe they would sell counterfeit anything. The markings are identical to the letter with the new one.

It did work - well, I never had it working well... probably my coding - but it did work. I suspect very much you are correct with the static theory.
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Do I have a faulty 65C02?

Post by Dr Jefyll »

adrianhudson wrote:
Today the new 65C02 arrived. Plugged it in and it worked immediately.
Maybe you've already done this, but as a sanity check it's worth temporarily swapping the "bad" chip back in again. Of course the expectation is that the problem will reappear, but this isn't always the case. It's not uncommon for projects to fix themselves just as a result of the flexing and vibration associated with exchanging a chip or a PSU or whatever.

-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Post Reply