Really strange 6502 computer problem

Building your first 6502-based project? We'll help you get started here.
Krsultov
Posts: 13
Joined: 03 Jan 2021

Really strange 6502 computer problem

Post by Krsultov »

Hey, everyone :D

I built Ben Eater's 6502 breadboard computer, but something strange is happening:
When I try to turn the computer on it just turns on the LCD backlight and I need to plug it in and out a lot of times so it can show the text on the screen.

Can this problem be fixed?

Best regards,
Krum
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Really strange 6502 computer problem

Post by BigEd »

My best guess would be that the reset signal isn't doing what it needs to. Is there a reset button?

Power-on reset, done properly, is a bit more complicated that one might guess. But a reset button is simpler than that.

Other things might be the cause: the clock might not start up, for example. Or maybe the LCD needs some warm-up time and the software isn't giving it that time. (By warm-up, I mean it needs some time to build up an internal voltage.)
Krsultov
Posts: 13
Joined: 03 Jan 2021

Re: Really strange 6502 computer problem

Post by Krsultov »

The LCD is fine I have used it before in other projects, but I have noticed that the reset switch doesn't work. I have checked the schematics and it seems like everything is OK.

I've attached how I wired the reset switch.
Attachments
A simple schematic.
A simple schematic.
schematic.png (9.22 KiB) Viewed 2317 times
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Really strange 6502 computer problem

Post by BigEd »

We might have to wait for some people with more experience. The problem is that mechanical switches are very indecisive: they bounce lots of times before settling. So the 6502 will see a whole series of reset pulses. What's important is that the final contact just before it lets go is long enough to work.

Do you have good power supply, and a bypass capacitor next to every chip?
Krsultov
Posts: 13
Joined: 03 Jan 2021

Re: Really strange 6502 computer problem

Post by Krsultov »

Yes, I have bypass caps on every power line and I have a 2amp/ 5v power supply
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Really strange 6502 computer problem

Post by Dr Jefyll »

We need some photos of your project, please. :) This is important -- can be very helpful. And tell us about the CPU you're using -- was it purchased new from a reputable dealer, or is its origin somewhat doubtful?

Also, do you have a voltmeter or DMM available? (What about other gadgets, such as a 'scope or logic probe?) I suggest you use the meter to measure between Gnd and pin 40 (Reset). Please verify that the voltage is normally 5V, and that it goes to 0 when you hold the button down.
Krsultov wrote:
When I try to turn the computer on it just turns on the LCD backlight and I need to plug it in and out a lot of times so it can show the text on the screen.
Uhhh... to be clear, what is it you're plugging in and out? The LCD? The power cord for your PSU? Something else, perhaps?

Edit: is that resistor in your diagram really 220 ohm -- not 2200 ohm, perhaps?

-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
cjs
Posts: 759
Joined: 01 Dec 2018
Location: Tokyo, Japan
Contact:

Re: Really strange 6502 computer problem

Post by cjs »

BigEd wrote:
We might have to wait for some people with more experience. The problem is that mechanical switches are very indecisive: they bounce lots of times before settling.
Right. It might be worth having a look at Garth Wilson's Reset Circuits page for some ideas on improvements you could make to the reset circuit. You probably don't have a DS1813 handy in your parts box, but you may have a 74xx14 or something else with a Schmitt trigger input. Even just a cap and resistor might help clean up the reset signal enough. I notice that Ben Eater's schematic uses a 1k resistor and 0.1 μF cap.
Curt J. Sampson - github.com/0cjs
Krsultov
Posts: 13
Joined: 03 Jan 2021

Re: Really strange 6502 computer problem

Post by Krsultov »

Unfortunately I don't have any other parts that I can use. The capacitor on the reset switch doesn't work, I tried it.

I also attached some pictures of my project:
Attachments
1610358024475.jpg
1610358024454.jpg
1610358024484.jpg
1610358024465.jpg
1610358024444.jpg
Krsultov
Posts: 13
Joined: 03 Jan 2021

Re: Really strange 6502 computer problem

Post by Krsultov »

Dr Jefyll wrote:
We need some photos of your project, please. :) This is important -- can be very helpful. And tell us about the CPU you're using -- was it purchased new from a reputable dealer, or is its origin somewhat doubtful?

Also, do you have a voltmeter or DMM available? (What about other gadgets, such as a 'scope or logic probe?) I suggest you use the meter to measure between Gnd and pin 40 (Reset). Please verify that the voltage is normally 5V, and that it goes to 0 when you hold the button down.
Krsultov wrote:
When I try to turn the computer on it just turns on the LCD backlight and I need to plug it in and out a lot of times so it can show the text on the screen.
Uhhh... to be clear, what is it you're plugging in and out? The LCD? The power cord for your PSU? Something else, perhaps?

Edit: is that resistor in your diagram really 220 ohm -- not 2200 ohm, perhaps?

-- Jeff
The CPU is compleately new from Mouser electronics. The resistor is 1k I have typed 220 ohm by mistake. I have a voltmeter, checked the voltage - everything looks OK. I have to plug in/out the power plug.
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Really strange 6502 computer problem

Post by BigEd »

Thanks for the photos!

When you say the capacitor didn't work, do you mean it didn't fix the problem?

So, you need to power-cycle the whole machine - reset isn't enough. Is never enough, or is usually not enough?

Have you any way to tell if it's just the LCD display which isn't coming up - can you read off activity on SYNC for example, or on address lines or data lines?
Krsultov
Posts: 13
Joined: 03 Jan 2021

Re: Really strange 6502 computer problem

Post by Krsultov »

BigEd wrote:
Thanks for the photos!

When you say the capacitor didn't work, do you mean it didn't fix the problem?

So, you need to power-cycle the whole machine - reset isn't enough. Is never enough, or is usually not enough?

Have you any way to tell if it's just the LCD display which isn't coming up - can you read off activity on SYNC for example, or on address lines or data lines?
Is never enough, or is usually not enough? - never enough

Have you any way to tell if it's just the LCD display which isn't coming up - can you read off activity on SYNC for example, or on address lines or data lines? I've tried blinking some LEDs, but no luck.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Really strange 6502 computer problem

Post by GARTHWILSON »

Some manufacturers' 65c02's had a Schmitt-trigger Reset input, allowing a slowly-rising signal from a capacitor to ground. I don't see anything in WDC's datasheet about it though. This however is a problem with solderless breadboards that I cannot emphasize enough, about the inductance of the connections and the fact also that they can act not only as transmitting antennas but also receiving antennas. A computer that controlled a product we sold for 13 years had a capacitor going to a 74HC00 (non-Schmitt-trigger) input, whose output went to an R65C02's reset input. Noise getting into the reset line from the clock signal was enough to keep it from working until we put another capacitor from the reset pin to ground. Even then, this arrangement was not good enough (I know it looks like it's not connected on the left end; but it was):
LeadsTooLong1.jpg
LeadsTooLong1.jpg (41.73 KiB) Viewed 2264 times

but this one worked and never gave us any trouble:
ShortLeads1.jpg
ShortLeads1.jpg (44.1 KiB) Viewed 2264 times

Note the difference in lead length. Yes, that little bit made all the difference between not working, and never having any problem. I could have laid out the board again to fix it, but the cost of first article was too high back then, particularly for multilayer boards.

I don't know/remember whether the Rockwell part had a Schmitt-trigger reset input. If it did, the size of the hysteresis was too small. If it did not, the gain of the CMOS input was high enough that a slowish-rising reset signal was ok as long as it was not noisy.

If you go by what's in the 6502 primer, you won't have any trouble.
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?
Krsultov
Posts: 13
Joined: 03 Jan 2021

Re: Really strange 6502 computer problem

Post by Krsultov »

But, Why does this problem occur? I built the computer exactly how Ben did. He didn't have this problem.

He didn't have any capacitors, any different parts etc.

Is there an easy way to fix the problem without adding any parts? Just rewire something?
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Really strange 6502 computer problem

Post by BigEd »

It's usually a question of diagnosis. Quite often we might find, by careful review and inspection, that some wire is in the wrong place, or not quite making contact.

It's also possible, but less likely, that some component is defective - more likely, it is not quite connected, perhaps because of tarnish, or dirt.

What diagnostic equipment do you have? Multimeter? With frequency readout? Logic probe?

With patience and guidance you can learn a lot with just an LED and a logic gate or two - but while it's possible there is a quick fix, it might take some diligence.

It's a bit like software: rarely does a newly written program have no bugs. Learning to debug is an essential part of learning to program. It's like that with hardware too - unless you're lucky!

Edit: we should all have high confidence that this can be fixed, provided you stick with it!
User avatar
Druzyek
Posts: 367
Joined: 12 May 2014
Contact:

Re: Really strange 6502 computer problem

Post by Druzyek »

What are the other chips you have in the circuit? If any of them require 5v, you might want to check the voltage at the power pin of each chip and the LCD individually. Depending on the breadboard and wires you're using, it could be dropping significant voltage, though it looks like you're using the breadboards that Ben Eater recommends
Post Reply