Page 2 of 2

Re: Do I have a faulty 65C02?

Posted: Thu Jun 23, 2022 4:06 pm
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 732 times
and this is A1
IMAGE2.png
IMAGE2.png (3.97 KiB) Viewed 732 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.

Re: Do I have a faulty 65C02?

Posted: Thu Jun 23, 2022 4:21 pm
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.

Re: Do I have a faulty 65C02?

Posted: Thu Jun 23, 2022 4:45 pm
by adrianhudson
Ahh, right. Thank you! Simple as that.
I'll look at the R/W line.

Re: Do I have a faulty 65C02?

Posted: Thu Jun 23, 2022 5:30 pm
by BigDumbDinosaur
As Ed noted, there are no bypass capacitors. Try adding some and see what happens.

Re: Do I have a faulty 65C02?

Posted: Thu Jun 23, 2022 8:55 pm
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!

Re: Do I have a faulty 65C02?

Posted: Thu Jun 23, 2022 9:01 pm
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.

Re: Do I have a faulty 65C02?

Posted: Thu Jun 23, 2022 9:03 pm
by adrianhudson
Paganini. Thank you. Very much appreciated.

Re: Do I have a faulty 65C02?

Posted: Fri Jun 24, 2022 4:42 am
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

Re: Do I have a faulty 65C02?

Posted: Sat Jun 25, 2022 6:35 am
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.

Re: Do I have a faulty 65C02?

Posted: Sun Jun 26, 2022 5:44 pm
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!

Re: Do I have a faulty 65C02?

Posted: Sun Jun 26, 2022 6:03 pm
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?

Re: Do I have a faulty 65C02?

Posted: Sun Jun 26, 2022 7:01 pm
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).

Re: Do I have a faulty 65C02?

Posted: Sun Jun 26, 2022 8:17 pm
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.

Re: Do I have a faulty 65C02?

Posted: Sun Jun 26, 2022 8:26 pm
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.

Re: Do I have a faulty 65C02?

Posted: Mon Jun 27, 2022 2:17 am
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