Strange memory write problems
-
adrianhudson
- Posts: 169
- Joined: 30 Apr 2022
- Location: Devon. UK
- Contact:
Re: Strange memory write problems
Bill, that is wonderful. I'm not sure where to go from here. My board runs no problems with a Rockwell 6502. Memory tests flawless, interrupts working. Run for many hours now.
If I replace just the Rockwell with WDC W65C02S memory tests fail and moderately complex programs fail - I think due to stack memory corruption.
The fact the thing runs with the Rockwell tells me I have no wiring problems, I think. What do you think about that?
I really think I will start again. To do that I have to tear down the old one since the wire wrap sockets are not cheap. Before I do, any last thoughts?
If I replace just the Rockwell with WDC W65C02S memory tests fail and moderately complex programs fail - I think due to stack memory corruption.
The fact the thing runs with the Rockwell tells me I have no wiring problems, I think. What do you think about that?
I really think I will start again. To do that I have to tear down the old one since the wire wrap sockets are not cheap. Before I do, any last thoughts?
Re: Strange memory write problems
Your design is solid so you can proceed to PC board design, if that's your design goal. In the meantime, you can do software development using Rockwell 6502. If you ran into strange software issue, you can always send me the software to try on my prototype.
Bill
Bill
-
kernelthread
- Posts: 166
- Joined: 23 Jun 2021
Re: Strange memory write problems
It's possible one of your parts is an "outlier" - i.e. on the edge of the specification envelope, or possibly even out of spec. Do you have spares for all the chips? If so, you could try changing each chip one by one to see if it cures the problem. The RAM might be a good place to start (maybe unusually low logic 1 output voltage?) or possibly the W65C02 (higher than usual logic threshold, or possibly even some degree of static damage?).
-
adrianhudson
- Posts: 169
- Joined: 30 Apr 2022
- Location: Devon. UK
- Contact:
Re: Strange memory write problems
kernelthread wrote:
It's possible one of your parts is an "outlier" - i.e. on the edge of the specification envelope, or possibly even out of spec. Do you have spares for all the chips? If so, you could try changing each chip one by one to see if it cures the problem. The RAM might be a good place to start (maybe unusually low logic 1 output voltage?) or possibly the W65C02 (higher than usual logic threshold, or possibly even some degree of static damage?).
I suppose I could have two out of spec WDC chips but I don't know what the chances of that are!
-
kernelthread
- Posts: 166
- Joined: 23 Jun 2021
Re: Strange memory write problems
There are a few pinout differences between the Rockwell 65C02 (and the original NMOS 6502, which I believe is what you actually have) and the WDC 65C02:
For original 6502 / Rockwell 65C02:
Pin 1 = Ground
Pin 5 = No Connect
Pin 35 = No Connect
Pin 36 = No Connect
For WDC 65C02:
Pin 1 = VPB (output)
Pin 5 = MLB (output)
Pin 35 = No Connect
Pin 36 = BE (input, should normally be high)
It might be worth checking the connections (or absence thereof) to these pins again.
In particular, if you have an unreliable connection to pin 36, this will cause problems with the WDC chip but not with the Rockwell or NMOS device.
For original 6502 / Rockwell 65C02:
Pin 1 = Ground
Pin 5 = No Connect
Pin 35 = No Connect
Pin 36 = No Connect
For WDC 65C02:
Pin 1 = VPB (output)
Pin 5 = MLB (output)
Pin 35 = No Connect
Pin 36 = BE (input, should normally be high)
It might be worth checking the connections (or absence thereof) to these pins again.
In particular, if you have an unreliable connection to pin 36, this will cause problems with the WDC chip but not with the Rockwell or NMOS device.
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Strange memory write problems
kernelthread wrote:
There are a few pinout differences between the Rockwell 65C02 (and the original NMOS 6502, which I believe is what you actually have) and the WDC 65C02...
Also note that a pin labeled “no connect” must not be connected to anything.
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: Strange memory write problems
kernelthread wrote:
There are a few pinout differences between the Rockwell 65C02 (and the original NMOS 6502, which I believe is what you actually have) and the WDC 65C02:
~snip~
It might be worth checking the connections (or absence thereof) to these pins again.
In particular, if you have an unreliable connection to pin 36, this will cause problems with the WDC chip but not with the Rockwell or NMOS device.
~snip~
It might be worth checking the connections (or absence thereof) to these pins again.
In particular, if you have an unreliable connection to pin 36, this will cause problems with the WDC chip but not with the Rockwell or NMOS device.
BigDumbDinosaur wrote:
Also note that a pin labeled “no connect” must not be connected to anything.
When the Rockwell is in (ignored the differences), Pin 36 which should be NC is actually pulled high but it works anyway and it was just a test. Rockwell chip is back out and WDC in (not working, of course).
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: Strange memory write problems
Well, as you're planning to yank the board apart for sockets and such, think about trying something a bit different first.
1- I would suggest removing ALL of the Ground and +5V wires from the PCB completely. After all, if you're going to pull it apart, this is a step in the right direction, no harm done.
2- With the rest of the wiring intact, focus on some very simple and short power distribution.
a. Start at the lower part of the board, and connect the ground pins of the 3- 74HC logic chips together. (Linking one to the next).
b. Do the same for the 2- memory chips and the CPU as well.
c. Do the same for the 65C22 and 65C51 chips. In short, simply wire them together with heavier gauge wire and make them direct.
d. Do the exact same above for the +5V pins... all short and direct between chips.
e. Also make certain that your decoupling caps are all good, if one opens up, funny things can happen.
f. With all of the chips connected with the ground and +5V pins together, run a single ground and +5V from the CPU to your power entry pins at the top.
g. For pins on the 65C22 and 65C51 that are RS1 (active high selects) tie those locally to the +5V on the chip, not yet another wire to +5V.
3- I doubt it should matter, but I suggest adding a 3.3K resistor from /SO to +5V as well.
The reasoning for a complete change in your power distribution is the long lengths of wire for both ground and +5V running from each chip back to the common power/ground pins. The W65C02 has some pretty strong drivers and are likely switching faster than the older NMOS part, which could generate some ringing on the address and data lines. It's worth a try as you'll already be pulling wires off... i.e., nothing to really lose on this one.
1- I would suggest removing ALL of the Ground and +5V wires from the PCB completely. After all, if you're going to pull it apart, this is a step in the right direction, no harm done.
2- With the rest of the wiring intact, focus on some very simple and short power distribution.
a. Start at the lower part of the board, and connect the ground pins of the 3- 74HC logic chips together. (Linking one to the next).
b. Do the same for the 2- memory chips and the CPU as well.
c. Do the same for the 65C22 and 65C51 chips. In short, simply wire them together with heavier gauge wire and make them direct.
d. Do the exact same above for the +5V pins... all short and direct between chips.
e. Also make certain that your decoupling caps are all good, if one opens up, funny things can happen.
f. With all of the chips connected with the ground and +5V pins together, run a single ground and +5V from the CPU to your power entry pins at the top.
g. For pins on the 65C22 and 65C51 that are RS1 (active high selects) tie those locally to the +5V on the chip, not yet another wire to +5V.
3- I doubt it should matter, but I suggest adding a 3.3K resistor from /SO to +5V as well.
The reasoning for a complete change in your power distribution is the long lengths of wire for both ground and +5V running from each chip back to the common power/ground pins. The W65C02 has some pretty strong drivers and are likely switching faster than the older NMOS part, which could generate some ringing on the address and data lines. It's worth a try as you'll already be pulling wires off... i.e., nothing to really lose on this one.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
-
adrianhudson
- Posts: 169
- Joined: 30 Apr 2022
- Location: Devon. UK
- Contact:
Re: Strange memory write problems
floobydust wrote:
Well, as you're planning to yank the board apart for sockets and such, think about trying something a bit different first.
Re: Strange memory write problems
I have been following this thread and am willing to admit that I am a novice at hardware design and theory but I had a working SBC2.7 board from Rich Cini and extra memory chips. This board has been working for 2 years once I got the ACIA issues sorted out. I have 4 32 kb sram chips available in my supply. I have been running this board up at 4 Mhz with an HM62256LP-70 with no issues. I then tried 2 Alliance AS6C62256-55 chips bought new from Digikey and then another chip UT62256-70. My experience is that the Alliance chips are unreliable in that setup compared to the other 2 chips. I replaced the Oscillator with a 1 Mhz one and there was no change in behaviour. The schematic for this board uses the circuit suggest for qualifying the write from Floobydust on Oct 22 and is using 74LS00 and taking the output of PHI2 from pin 39.
This would indicate to me that there is something happening with those chips in this circuit and though Plasmo was able to verify the design he did use another brand of SRAM.
I put this out there for more investigation by others more knowledgeable than me.
PS this is with WDC65c02. I am also relieved that I didn't try this with the Alliance chips first!
This would indicate to me that there is something happening with those chips in this circuit and though Plasmo was able to verify the design he did use another brand of SRAM.
I put this out there for more investigation by others more knowledgeable than me.
PS this is with WDC65c02. I am also relieved that I didn't try this with the Alliance chips first!
-
adrianhudson
- Posts: 169
- Joined: 30 Apr 2022
- Location: Devon. UK
- Contact:
Re: Strange memory write problems
okwatts wrote:
I have been following this thread and am willing to admit that I am a novice at hardware design and theory but I had a working SBC2.7 board from Rich Cini and extra memory chips. This board has been working for 2 years once I got the ACIA issues sorted out. I have 4 32 kb sram chips available in my supply. I have been running this board up at 4 Mhz with an HM62256LP-70 with no issues. I then tried 2 Alliance AS6C62256-55 chips bought new from Digikey and then another chip UT62256-70. My experience is that the Alliance chips are unreliable in that setup compared to the other 2 chips. I replaced the Oscillator with a 1 Mhz one and there was no change in behaviour. The schematic for this board uses the circuit suggest for qualifying the write from Floobydust on Oct 22 and is using 74LS00 and taking the output of PHI2 from pin 39.
This would indicate to me that there is something happening with those chips in this circuit and though Plasmo was able to verify the design he did use another brand of SRAM.
I put this out there for more investigation by others more knowledgeable than me.
PS this is with WDC65c02. I am also relieved that I didn't try this with the Alliance chips first!
This would indicate to me that there is something happening with those chips in this circuit and though Plasmo was able to verify the design he did use another brand of SRAM.
I put this out there for more investigation by others more knowledgeable than me.
PS this is with WDC65c02. I am also relieved that I didn't try this with the Alliance chips first!
Out of interest, I have three Alliance AS6C62256 chips. They all do the same. We will see what this Samsung one does.
I will delay ripping the thing apart until I have played with these chips. I expect the Rockwell CPU to work. I will see what the Samsung memory does with the WDC W65C02S and report back. Might be a few days before the postman delivers.
Last edited by adrianhudson on Mon Nov 07, 2022 9:20 pm, edited 1 time in total.
-
adrianhudson
- Posts: 169
- Joined: 30 Apr 2022
- Location: Devon. UK
- Contact:
Re: Strange memory write problems
Well, I have just spent the last two hours removing all the +ve and gnd connections everywhere and rewiring as per floobydust's suggestion and guess what?
Exactly the same as before. No difference whatsoever. The *£$%~@ thing rruns with a Rockwell cpu but fails with the WDC part.
I am afraid that is the death knell for this board.
I have made this design three times now.
Iteration 1 - on solderless breadboard - that worked - eventually. Moral: BUY REALLY GOOD BREADBOARD!! == $$$. Its worth it. (However, on reflection, I was never quite sure about memory integrity - but I put it down to breaboard connection problems).
Iteration 2 - wirewrap on perfboard - never really worked and I never found out why. I put it down to the curly, overlong wires (this was my first ever wirewrap and I didn't know what I was doing). Or poorly done power.
Iteration 3 - (the current one) wirewrap on perfboard - worked VERY strangely. All sorts of oddities with memory. See the rest of this thread above. It works much better with a Rockwell R65C02 that I think is actually a NMOS 6502.
So, iteration 4 is next. This time on perfboard with a ground plane.
I will, iunless someone corrects me:
1. Add capacitors first. Soldered to the+5V pins.
2. do +5V lines next. Hard against the board. Chip to chip and chip to distribution point.
2. do clock lines next.
3. Address and data lines next
4. control lines to and from glue logic
At each point I will post photos and accept critique.
I will wait to start until I receive some different memory and a real R65C02 and try them in the current board board before I tear it down (I need the wirewrap sockets they are surprisingly expensive).
If this new board doesn't work I will go off and do some other hobby. Like flower arranging.
Exactly the same as before. No difference whatsoever. The *£$%~@ thing rruns with a Rockwell cpu but fails with the WDC part.
I am afraid that is the death knell for this board.
I have made this design three times now.
Iteration 1 - on solderless breadboard - that worked - eventually. Moral: BUY REALLY GOOD BREADBOARD!! == $$$. Its worth it. (However, on reflection, I was never quite sure about memory integrity - but I put it down to breaboard connection problems).
Iteration 2 - wirewrap on perfboard - never really worked and I never found out why. I put it down to the curly, overlong wires (this was my first ever wirewrap and I didn't know what I was doing). Or poorly done power.
Iteration 3 - (the current one) wirewrap on perfboard - worked VERY strangely. All sorts of oddities with memory. See the rest of this thread above. It works much better with a Rockwell R65C02 that I think is actually a NMOS 6502.
So, iteration 4 is next. This time on perfboard with a ground plane.
I will, iunless someone corrects me:
1. Add capacitors first. Soldered to the+5V pins.
2. do +5V lines next. Hard against the board. Chip to chip and chip to distribution point.
2. do clock lines next.
3. Address and data lines next
4. control lines to and from glue logic
At each point I will post photos and accept critique.
I will wait to start until I receive some different memory and a real R65C02 and try them in the current board board before I tear it down (I need the wirewrap sockets they are surprisingly expensive).
If this new board doesn't work I will go off and do some other hobby. Like flower arranging.
Last edited by adrianhudson on Mon Nov 07, 2022 9:51 pm, edited 1 time in total.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Strange memory write problems
adrianhudson wrote:
One question: I have seen the use of tiny ferrite beads on certain conductors by some people. Might this be a good idea on chip +5V lines—say, to the oscillator cans—to attempt to reduce, I'll call it "interference"?
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?
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: Strange memory write problems
GARTHWILSON wrote:
adrianhudson wrote:
One question: I have seen the use of tiny ferrite beads on certain conductors by some people. Might this be a good idea on chip +5V lines—say, to the oscillator cans—to attempt to reduce, I'll call it "interference"?
Re: Strange memory write problems
Try a different brand of memory chip. The Voh =2.4V current of only 1mA is rather feeble on the item you are using. Most static RAM chips can handle 4mA. I have had very good success with the Winbond W24257A and the Samsung KM68257C/CL. Samsung actually provide specs for CMOS environments (Voh = 3.95V @ 100uA). The 4V is what I see with both the Winbond and the Samsung chips I use.
I also have a Toshiba chip that only gets to 3.53V, but that seems to be fine for the W65C02. I don't actually use it for anything important as it's on the hairy edge, but I've never had trouble when playing around with it. I'm actually going to make a post about it in the hardware forum.
I also have a Toshiba chip that only gets to 3.53V, but that seems to be fine for the W65C02. I don't actually use it for anything important as it's on the hairy edge, but I've never had trouble when playing around with it. I'm actually going to make a post about it in the hardware forum.
Last edited by BillO on Mon Nov 07, 2022 10:11 pm, edited 1 time in total.
Bill