Weird JMP problem

For discussing the 65xx hardware itself or electronics projects.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Weird JMP problem

Post by BigEd »

Do you have a similar LED monitor for the data lines, so you can see if the JMP was fetched? I think you must have, or you wouldn't know that the NOPs are fetched... Can you also monitor the R/W line?
As you probably know, this is the expected behaviour:

Code: Select all

cycle ab	db	rw	Fetch	 pc	   a	 x	 y	 s	p
0	0000	4c	1	JMP Abs	0000	aa	00	00	fd	nv‑BdIZc
0	0000	4c	1	JMP Abs	0000	aa	00	00	fd	nv‑BdIZc
1	0001	00	1		       0001	aa	00	00	fd	nv‑BdIZc
1	0001	00	1		       0001	aa	00	00	fd	nv‑BdIZc
2	0002	00	1		       0002	aa	00	00	fd	nv‑BdIZc
2	0002	00	1		       0002	aa	00	00	fd	nv‑BdIZc
3	0000	4c	1	JMP Abs	0000	aa	00	00	fd	nv‑BdIZc
3	0000	4c	1	JMP Abs	0000	aa	00	00	fd	nv‑BdIZc
4	0001	00	1		       0001	aa	00	00	fd	nv‑BdIZc
4	0001	00	1		       0001	aa	00	00	fd	nv‑BdIZc
5	0002	00	1		       0002	aa	00	00	fd	nv‑BdIZc
5	0002	00	1		       0002	aa	00	00	fd	nv‑BdIZc
Mercury1964
Posts: 26
Joined: 02 Mar 2013

Re: Weird JMP problem

Post by Mercury1964 »

No, the address lines pass through the LEDs. Each diode is pulled to ground. The output voltages are well within proper CMOS high and low levels.
Mercury1964
Posts: 26
Joined: 02 Mar 2013

Re: Weird JMP problem

Post by Mercury1964 »

That is the behavior I was expecting. I currently don't have a data line monitor.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Weird JMP problem

Post by BigEd »

Could you swap things around and monitor the LSB of the address and also the databus? It might shed some light!
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Weird JMP problem

Post by BigEd »

Quick question: do you have resistors in line with the LEDs? If not, the LEDs will hold the address lines low because they take too much current.
Mercury1964
Posts: 26
Joined: 02 Mar 2013

Re: Weird JMP problem

Post by Mercury1964 »

Sure, I'll give it a shot right now. Also, the resistors are in lines with the LEDs.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8774
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Weird JMP problem

Post by GARTHWILSON »

WDC's pin drivers are very, very strong; but one reason I asked about the current-limiting resistors in series with the LEDs is that high LED currents, when switching on and off, will produce a large ground bounce on a solderless breadboard, and the resulting voltages and ringing can make the supposedly single-cycled clock input appear to toggle several more times after each clock edge, and possibly at too high of a frequency for everything to operate correctly. I would set the LED current to the lowest level that leaves the LED brightness still practical to read.
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?
Mercury1964
Posts: 26
Joined: 02 Mar 2013

Re: Weird JMP problem

Post by Mercury1964 »

Now I'm really confused. The address LEDs show that JMP is retrieved properly, but either the LSB or HSB operands are not zeroing properly.
Also, I'll try to lower the LED current.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Weird JMP problem

Post by BigEd »

If you run a PHP instruction, you should see a write to page 1, and if you run a series of such instructions, you should see the page 1 address decrementing. That should prove that opcode fetch is actually fetching the opcode you think it is. Similarly with JSR of course.
Cheers
Ed
Mercury1964
Posts: 26
Joined: 02 Mar 2013

Re: Weird JMP problem

Post by Mercury1964 »

Seems that the data LEDs were causing some of the zeroing problems. Now it's back to where it was before.
The random jumping seems to go away if I speed through cycles. If I only end up using the board at 1MHz (my master plan), will this issue be worth fixing?
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Weird JMP problem

Post by BigEd »

Perhaps not: it's sounding like a glitch from your single-stepping - is that consistent with what you see?
Cheers
Ed
clockpulse
Posts: 87
Joined: 20 Oct 2012
Location: San Diego

Re: Weird JMP problem

Post by clockpulse »

Mercury1964 wrote:
The clock is a monostable multivibrator made from a 555 timer with a transistor to invert the signal.
It might be that the transistor inverter circuit has a slow rise time, what's the pullup resistor value?
It would be best to use a single inverter from a 74ACT04 (or an inverting gate) since that would have a totem pole output for a fast rise time.
Mercury1964
Posts: 26
Joined: 02 Mar 2013

Re: Weird JMP problem

Post by Mercury1964 »

Okay, I'll give that a shot. Would a 74HC14 work?
User avatar
GARTHWILSON
Forum Moderator
Posts: 8774
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Weird JMP problem

Post by GARTHWILSON »

The 14 would be better than the 04 in this case, because it will make sure the output slew rate (rise time) is fast even with a very slow input slew rate, and its hysteresis will keep its output cleaner as the input slowly goes through the area that is neither a valid zero nor a valid one logic level. 74AC or 74ACT will be about three times as fast as HC and would be better for the clock signal on this IIRC, but if HC is all you have, using that would still be a step in the right direction.
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?
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Weird JMP problem

Post by BigDumbDinosaur »

GARTHWILSON wrote:
The 14 would be better than the 04 in this case, because it will make sure the output slew rate (rise time) is fast even with a very slow input slew rate, and its hysteresis will keep its output cleaner as the input slowly goes through the area that is neither a valid zero nor a valid one logic level. 74AC or 74ACT will be about three times as fast as HC and would be better for the clock signal on this IIRC, but if HC is all you have, using that would still be a step in the right direction.

Given that the time source (555) is a relaxation oscillator and thus has a substantially finite rise and fall time, it seems logical (!) to use it to drive a flip-flop, whose output slew rate is independent of input pulse rate and rise/fall time. A 74AC74 would work well in this application. Only thing of course, is the generated Ø2 frequency would be half of the 555's rate. BTW, a comparator can be used as an adjustable time source with a very clean square wave output.

I tend to agree with the notion that false clock states may be generated in this circuit, which would majorly mess up bus timing and states. Also, as Garth noted, 74HC(T) switching rates are much slower than 74AC(T). You want the sharpest possible rise and fall time on your Ø2 clock.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
Post Reply