Writing in EEPROM and reading by 6502

Building your first 6502-based project? We'll help you get started here.
Post Reply
hitlp
Posts: 48
Joined: 05 Dec 2018

Re: Writing in EEPROM and reading by 6502

Post by hitlp »

Hello guys,

I think you'll like this new mistake. I got the 6502 and put it on a separate breadboard to try to eliminate the problem. The behavior was the same as the previous post. He goes very well to some extent that, I can not explain, he loses everything.

But look how curious: channel 5 of the logic analyzer was showing a signal. Being that this wire is not connected to any place. What can be happening? Problem in the GND of the logic analyzer? Or in the logic analyzer itself?

I'm using a (generic) Saleae's logic analyzer. The software is Saleae Logic version 1.2.18.

The setup is:
24 m/s Sample Rate
The GND pin is on the ground of my breadboard.
The CLK pin is disconnected.

Unfortunately I can not afford to buy an oscilloscope with the logic analyzer module.
Attachments
logic_analyzer.jpg
esquema9.PNG
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: Writing in EEPROM and reading by 6502

Post by floobydust »

Having followed this thread, the logic analyzer screens looked familiar. I own a Saleae Logic-16, which works exceptionally well, but did cost a fair amount, which helps pay for their HW and SW development (and no, I'm not lecturing you). Using their (Saleae's) software with a cheap clone that costs less than $9 w/free shipping from China is not the same thing. I suspect your problems are partially a worn breadboard and the clone logic analyzer. Think about it, if they can put that thing together and ship it for under $9, what it actually costs to make it is next to nothing, meaning the internal parts are likely, well, you get the picture. When it comes to tools and test equipment, you get what you pay for.
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Writing in EEPROM and reading by 6502

Post by Dr Jefyll »

hitlp wrote:
But look how curious: channel 5 of the logic analyzer was showing a signal. Being that this wire is not connected to any place. What can be happening?
A wire that is not connected to anything is liable to "float" high or low all by itself, or even pick up nearby AC signals. This is the same problem you can get with high impedance input pins on an IC. That's why unused input pins (example: /SO) need to be tied high or low, or to have a pullup resistor at least. The effect is normal.

Floobydust does make a good point about using low-quality equipment. But in this case I see no reason to wonder about the Logic Analyzer. I'm more worried about the solderless breadboard. SOMETHING seems to causing the behavior to change, and bad connections are a very likely cause of that. Since most of the connections are established by the breadboard... :|
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Chromatix
Posts: 1462
Joined: 21 May 2018

Re: Writing in EEPROM and reading by 6502

Post by Chromatix »

Which is why it would be valuable to be able to try running at lower speeds - *much* lower, down to DC if necessary - but the NMOS CPU won't permit that (I think 100kHz is the lowest guaranteed speed).

Another thing a (cheap) logic analyzer won't tell you is whether analogue effects are making it hard for the CPU to interpret signals. Voltage levels and the shape of the waveform matter, as does "ground bounce" which can be a serious problem on even good-quality breadboards.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Writing in EEPROM and reading by 6502

Post by BigEd »

Unfortunately, although you can sometimes learn something by running at lower speeds, there are still a number of things which don't get better. Having a clean clock signal and clean ground is paramount.

hitlp, have you any way to clean your wires and the internals of your breadboard? Does it seem reasonable to swap them out? Clean the micro's pins at the same time, of course.

I'm not sure you've yet done anything to improve the clock signal: it may be better than it was, but evidently something is still wrong.
hitlp
Posts: 48
Joined: 05 Dec 2018

Re: Writing in EEPROM and reading by 6502

Post by hitlp »

Hello again.

I think the time is to take several steps back and focus first on the breadboard. Really if it isn't trustworthy, everything else gets compromised.

What do you guys think of putting the circuit together on a Prototype PCB? Then I would use soldering and a few wires. Should it be more reliable?
Last edited by hitlp on Thu Dec 20, 2018 7:20 pm, edited 1 time in total.
Chromatix
Posts: 1462
Joined: 21 May 2018

Re: Writing in EEPROM and reading by 6502

Post by Chromatix »

Normally you would use soldering, not welding, for electronics. Also, I strongly recommend that you don't solder the ICs themselves in, but IC sockets, so that you can easily extract and reuse the ICs later.
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: Writing in EEPROM and reading by 6502

Post by BillO »

Dr Jefyll wrote:
Floobydust does make a good point about using low-quality equipment. But in this case I see no reason to wonder about the Logic Analyzer. I'm more worried about the solderless breadboard. SOMETHING seems to causing the behavior to change, and bad connections are a very likely cause of that. Since most of the connections are established by the breadboard... :|
I had both a genuine Saleae and a clone given to me. Upon dismantling they proved to have exactly the same circuitry. I know the sample is small, but the design is simple to the point of not being able to make it any simpler and the parts are cheap. My guess is that the logic analyzer is OK but needs to be used correctly and it should be realized that they are only good for analyzing logic states. If the circuit suffers from other maladies, a logic analyzer is not going to help and may give misleading results. I agree with Jeff's points.
Bill
hitlp
Posts: 48
Joined: 05 Dec 2018

Re: Writing in EEPROM and reading by 6502

Post by hitlp »

Chromatix wrote:
Normally you would use soldering, not welding, for electronics. Also, I strongly recommend that you don't solder the ICs themselves in, but IC sockets, so that you can easily extract and reuse the ICs later.
:D sorry.. it was a translate mistake. The correct is soldering.

But do you think that make this in a PCB prototype is better than breadboard? And yes, with IC Sockets.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Writing in EEPROM and reading by 6502

Post by GARTHWILSON »

Please see the 6502 primer which is about building your own 6502 computer, particularly now section 12 on wire-wrap, but also section 9 on avoiding AC performance problems, section 13 on custom PCBs, and others. Unfortunately wire-wrap has experienced a gradual increase in cost and a decrease in availability in the last decade or two, but it often remains a good way to build this kind of circuits. When done right, it's very reliable even in the long term, it can be good for avoiding AC performance problems, you can correct errors, and you can get good density.
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?
hitlp
Posts: 48
Joined: 05 Dec 2018

Re: Writing in EEPROM and reading by 6502

Post by hitlp »

GARTHWILSON wrote:
Please see the 6502 primer which is about building your own 6502 computer, particularly now section 12 on wire-wrap, but also section 9 on avoiding AC performance problems, section 13 on custom PCBs, and others. Unfortunately wire-wrap has experienced a gradual increase in cost and a decrease in availability in the last decade or two, but it often remains a good way to build this kind of circuits. When done right, it's very reliable even in the long term, it can be good for avoiding AC performance problems, you can correct errors, and you can get good density.
Yes .. I will do that. I think that my breadboard is causing these problems
whartung
Posts: 1004
Joined: 13 Dec 2003

Re: Writing in EEPROM and reading by 6502

Post by whartung »

hitlp wrote:
Yes .. I will do that. I think that my breadboard is causing these problems
You might try a different breadboard.

Many folks have had fine success with breadboards, and your clock rate isn't even that high.

Is it an older breadboard? Worn perhaps?

Oneironaut, who's building the VIC-20 JetPack in the Hardware section, seems to be buying breadboards by the gross, and suggests a specific brand that he's happy with (you'll have to claw through most of the thread to find it, however).
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Writing in EEPROM and reading by 6502

Post by Dr Jefyll »

whartung wrote:
Oneironaut [...] suggests a specific brand that he's happy with
Twin Industries is his preferred brand. Example: part# TW-E40-1020

It occurs to me the 6502 chip itself is another possible cause of bad connections. Are the metal pins still clean, shiny and bare? I have an old 6502 here which I found to be unusable due to corrosion. Even after my best cleanup efforts (sandpaper, wire brush) it was impossible to solder onto the pins, no matter how much flux I used. Presumably it would be useless in a breadboard, too. :|
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
hitlp
Posts: 48
Joined: 05 Dec 2018

Re: Writing in EEPROM and reading by 6502

Post by hitlp »

whartung wrote:
hitlp wrote:
Is it an older breadboard? Worn perhaps?
Understanding is made for this project. :-( It is not known if it is of good quality or not.

I thought of a hypothesis now: I use a bench power supply. I connect the VCC and GND poles directly on the breadboard. Is it interesting to use some kind of filter to provide cleaner source?
whartung
Posts: 1004
Joined: 13 Dec 2003

Re: Writing in EEPROM and reading by 6502

Post by whartung »

hitlp wrote:
I thought of a hypothesis now: I use a bench power supply. I connect the VCC and GND poles directly on the breadboard. Is it interesting to use some kind of filter to provide cleaner source?
Have you tried/have access to another CPU chip?

I only mention this simply because a lot of folks have used the worlds worst techniques, questionable practices, and mediocre components and have had success at the most basic level similar to what you're trying to achieve.

Yes, this stuff can be picky, but you would have to have a cascade of bad equipment up and down the chain.

Simply, it shouldn't be this hard.

Even moving the CPU to a different place on the breadboard should tell you if it's the breadboard or not. And a bench power supply should be just fine, or it has to be a really bad power supply -- and what are the odds of that? If you suspect the power supply, grab a couple of batteries and try that.
Post Reply