Page 5 of 9
Re: Writing in EEPROM and reading by 6502
Posted: Thu Dec 20, 2018 1:25 am
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.
Re: Writing in EEPROM and reading by 6502
Posted: Thu Dec 20, 2018 3:28 am
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.
Re: Writing in EEPROM and reading by 6502
Posted: Thu Dec 20, 2018 5:07 am
by Dr Jefyll
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...

Re: Writing in EEPROM and reading by 6502
Posted: Thu Dec 20, 2018 6:18 am
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.
Re: Writing in EEPROM and reading by 6502
Posted: Thu Dec 20, 2018 8:27 am
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.
Re: Writing in EEPROM and reading by 6502
Posted: Thu Dec 20, 2018 5:17 pm
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?
Re: Writing in EEPROM and reading by 6502
Posted: Thu Dec 20, 2018 6:54 pm
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.
Re: Writing in EEPROM and reading by 6502
Posted: Thu Dec 20, 2018 7:14 pm
by BillO
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.
Re: Writing in EEPROM and reading by 6502
Posted: Thu Dec 20, 2018 7:17 pm
by hitlp
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.

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.
Re: Writing in EEPROM and reading by 6502
Posted: Thu Dec 20, 2018 7:19 pm
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.
Re: Writing in EEPROM and reading by 6502
Posted: Thu Dec 20, 2018 7:45 pm
by hitlp
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
Re: Writing in EEPROM and reading by 6502
Posted: Fri Dec 21, 2018 4:47 am
by whartung
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).
Re: Writing in EEPROM and reading by 6502
Posted: Fri Dec 21, 2018 6:31 am
by Dr Jefyll
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.

Re: Writing in EEPROM and reading by 6502
Posted: Fri Dec 21, 2018 12:11 pm
by hitlp
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?
Re: Writing in EEPROM and reading by 6502
Posted: Fri Dec 21, 2018 4:27 pm
by whartung
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.