Help: Crystal Oscillator is not working.

Building your first 6502-based project? We'll help you get started here.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Help: Crystal Oscillator is not working.

Post by BigDumbDinosaur »

cjs wrote:
Another tool that's useful when you don't have a 'scope is a logic probe, and some can actually identify high frequency signals. (E.g., a logic probe might be able to tell you whether that clock line is really switching between 0 and 1 TTL levels, or is just hovering around some intermediate voltage.)
The logic probes I have are good out to 20 MHz and can be set to treat inputs as TTL or CMOS. I bought them 30 years ago, so it's nothing new.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
ProfessorCagan
Posts: 23
Joined: 22 Dec 2020

Re: Help: Crystal Oscillator is not working.

Post by ProfessorCagan »

Hope everyone had a good Christmas!

I decided to retrace my steps in building the computer over the past couple hours now that I'm certain the oscillator works.
As I mentioned before some LEDs were on, and some where off, I've ordered a slower crystal to see if I can watch them change, and I'm gonna try to create a NOP again here shortly.
After a short while though, the LEDs would turn off, and I'd notice the voltage would drop significantly, from 5 to around 1.5. I've tried 2 different methods of powering the circuit and this happens.
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Help: Crystal Oscillator is not working.

Post by Dr Jefyll »

ProfessorCagan wrote:
After a short while though, the LEDs would turn off, and I'd notice the voltage would drop significantly
um... and you're about to rebuild, but this is what was happening before?

If so, I'd say let's keep matters simple, and just concentrate on the new setup (NOP generator etc) once it gets finished. Let us know how it behaves, and posting more photographs would probably help, too.

-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
ProfessorCagan
Posts: 23
Joined: 22 Dec 2020

Re: Help: Crystal Oscillator is not working.

Post by ProfessorCagan »

My memory may be lapsing, but no, I don't believe this happened before?
At any rate, I'll build the NOP and provide pictures and results as instructed.
ProfessorCagan
Posts: 23
Joined: 22 Dec 2020

Re: Help: Crystal Oscillator is not working.

Post by ProfessorCagan »

Ok, I think I've got it together, I'm sorry it's so crowded, I've only got jumper wires for this, I was getting anywhere from .6 volts to .9 volts when checking the address lines, and my meter nor my scope could get a signal out. I've done something wrong I think?
Attachments
20201227_140350.jpg
20201227_140355.jpg
hoglet
Posts: 367
Joined: 29 Jun 2014

Re: Help: Crystal Oscillator is not working.

Post by hoglet »

You need to take your time and carefully checking your wiring.

You have connected Pin 39 (Phi2 out) directly to 0V, which might damage the W65C02.

You also don't seem to have an oscillator driving Pin 37 (Phi2 in).

And pin 8 (VCC) is unconnected.

Dave
ProfessorCagan
Posts: 23
Joined: 22 Dec 2020

Re: Help: Crystal Oscillator is not working.

Post by ProfessorCagan »

Do I need an oscillator for a NOP?
hoglet
Posts: 367
Joined: 29 Jun 2014

Re: Help: Crystal Oscillator is not working.

Post by hoglet »

ProfessorCagan wrote:
Do I need an oscillator for a NOP?
Yes.

And power (!!)
ProfessorCagan
Posts: 23
Joined: 22 Dec 2020

Re: Help: Crystal Oscillator is not working.

Post by ProfessorCagan »

Okay, taking Hoglet's words into practice, I've received signal from Phi2O (which I know is clock output, but it's the only pin I measured a pulse coming from.)
Voltages where higher though when I tested them. Enclosed are photos, as promised.
Attachments
3.jpg
2.jpg
1.jpg
hoglet
Posts: 367
Joined: 29 Jun 2014

Re: Help: Crystal Oscillator is not working.

Post by hoglet »

You have connected +5V power to pin 7 (SYNC); it should be connected to pin 8 (VDD).

Dave
hoglet
Posts: 367
Joined: 29 Jun 2014

Re: Help: Crystal Oscillator is not working.

Post by hoglet »

You also need to make sure pin 21 (VSS) is connected to 0V; I can't tell if this is the case.

Dave
ProfessorCagan
Posts: 23
Joined: 22 Dec 2020

Re: Help: Crystal Oscillator is not working.

Post by ProfessorCagan »

Ah, slight oversight, thank you. It wasn't connected to VSS but it is now. I'm reading around 500 millivolts on the address pins, and I got a 500kHz signal out of pin 7.
User avatar
cjs
Posts: 759
Joined: 01 Dec 2018
Location: Tokyo, Japan
Contact:

Re: Help: Crystal Oscillator is not working.

Post by cjs »

Your most recent layout photos betray a certain lack of organization. As just one example, you bring Vcc (+5 V) to pin 25 not by using a short jumper from the +5 V power rail directly above that pin row, but instead by using a long jumper to the other side and other end of the chip to get +5 V from the pin 6 row. What is the purpose of such indirection?

You have correctly wired both power buses on both sides of the breadboard, so make use of this. Cut some more small red and black wires use these to wire anything that needs to go to a power bus directly to the nearest one. This will make it much easier for both you and us to check your connections. Pull-ups and pull-downs via resistors to Vcc and ground should work the same way. Trim the resistor leads to avoid them touching each other.

In hardware you can't be sloppy; you have to get every connection right. Take your time and work neatly, making your connections clear; the extra time you spend doing that will be more than paid back in less time debugging.

And with the oscillator, too: for some reason it's not near the clock input pin but instead not only way over at the other end of the chip but exiled some distance down the board. That's a pretty poor way to treat what is basically the CPU's heart. (If that's not beating well, nothing works.) Move the oscillator just to the left of the CPU and cut a short wire for the clock signal to bring it to the CPU.

Keeping that wire short will also help reduce the chance of degredation of the clock signal, which is good because there is no signal where quality is more important than the clock.

And speaking of signal quality, please also put a 0.1 μF bypass capacitors from the Vcc pin to the GND pin (or at least to a nearby GND rail) for both the CPU and the oscillator. This will also clean up your signal quality significantly, which means one less thing that's likely to be going wrong.
Curt J. Sampson - github.com/0cjs
User avatar
cjs
Posts: 759
Joined: 01 Dec 2018
Location: Tokyo, Japan
Contact:

Re: Help: Crystal Oscillator is not working.

Post by cjs »

ProfessorCagan wrote:
Ah, slight oversight, thank you. It wasn't connected to VSS but it is now.
Well, it's a "slight" oversight in the sense that forgetting to plug in a lamp before turning it on is a "slight" oversight. :-/

It might be useful for you to develop a checklist procedure that for a while you always follow when powering up your device after making changes. This would include checking voltages at all power and ground pins, checking the pins set to constant levels, checking the clock signal as best you can, etc. etc. At this stage I would write it out in full detail, e.g., "Step #: confirm that GND power supply pins 1 and 21 are reading 0 V." When you've found you've missed something, update your checklist to include that item at the appropriate spot. This will not only help you with your current issues, but will help you learn the general habits and procedures for debugging electronics.

You'll eventually get faster by knowing, after any change, which steps you can safely skip after small changes, but, as with learning scales on a musical instrument, it's important to learn to do things right before you learn to do them quickly.
Quote:
I'm reading around 500 millivolts on the address pins, and I got a 500kHz signal out of pin 7.
For things like this, it would be good to give both the pin number and the signal (SYNC, in this case) and an explanation of what you believe that output means, and why it's correct or incorrect. This will both help you learn how things work and make it easier for us to check your reasoning and your work.

One of the problems that occurs when folks with more experience are helping beginners with their projects is that we tend to forget the kinds of mistakes that beginners make. For example, it would never have occurred to me in a million years that someone might think that a CPU rigged as a NOP generator would work without a clock. Helping us understand your personal theory of operation for a circuit will let us do a better job of catching these sorts of misunderstandings.
Curt J. Sampson - github.com/0cjs
ProfessorCagan
Posts: 23
Joined: 22 Dec 2020

Re: Help: Crystal Oscillator is not working.

Post by ProfessorCagan »

cjs wrote:
Your most recent layout photos betray a certain lack of organization. As just one example, you bring Vcc (+5 V) to pin 25 not by using a short jumper from the +5 V power rail directly above that pin row, but instead by using a long jumper to the other side and other end of the chip to get +5 V from the pin 6 row. What is the purpose of such indirection?

You have correctly wired both power buses on both sides of the breadboard, so make use of this. Cut some more small red and black wires use these to wire anything that needs to go to a power bus directly to the nearest one. This will make it much easier for both you and us to check your connections. Pull-ups and pull-downs via resistors to Vcc and ground should work the same way. Trim the resistor leads to avoid them touching each other.

In hardware you can't be sloppy; you have to get every connection right. Take your time and work neatly, making your connections clear; the extra time you spend doing that will be more than paid back in less time debugging.

And with the oscillator, too: for some reason it's not near the clock input pin but instead not only way over at the other end of the chip but exiled some distance down the board. That's a pretty poor way to treat what is basically the CPU's heart. (If that's not beating well, nothing works.) Move the oscillator just to the left of the CPU and cut a short wire for the clock signal to bring it to the CPU.

Keeping that wire short will also help reduce the chance of degredation of the clock signal, which is good because there is no signal where quality is more important than the clock.

And speaking of signal quality, please also put a 0.1 μF bypass capacitors from the Vcc pin to the GND pin (or at least to a nearby GND rail) for both the CPU and the oscillator. This will also clean up your signal quality significantly, which means one less thing that's likely to be going wrong.
I was trying to copy that NOP I saw in the picture I posted earlier, I'll fully admit that I do not know what a NOP is, which is why I didn't know it needed a clock source.
The reason behind me not cutting more wire is because I want to use it for completing the kit when all is said and done, I use the jumpers to conserve wire,
same reasoning for the resistor leads, because I may need to cut them at different lengths; resources aren't easy for me to come by at the moment.
I tend to rush, my apologies, I try to work quick so I can get things done quicker, but you're right, it's been taking longer, I'll be more deliberate and slow going forward.
Post Reply