6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 12:02 am

All times are UTC




Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Weird JMP problem
PostPosted: Sat Mar 02, 2013 6:39 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
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:
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sat Mar 02, 2013 6:49 pm 
Offline

Joined: Sat Mar 02, 2013 3:21 am
Posts: 26
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sat Mar 02, 2013 6:51 pm 
Offline

Joined: Sat Mar 02, 2013 3:21 am
Posts: 26
That is the behavior I was expecting. I currently don't have a data line monitor.


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sat Mar 02, 2013 6:58 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Could you swap things around and monitor the LSB of the address and also the databus? It might shed some light!


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sat Mar 02, 2013 6:59 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sat Mar 02, 2013 7:02 pm 
Offline

Joined: Sat Mar 02, 2013 3:21 am
Posts: 26
Sure, I'll give it a shot right now. Also, the resistors are in lines with the LEDs.


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sat Mar 02, 2013 7:20 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sat Mar 02, 2013 7:33 pm 
Offline

Joined: Sat Mar 02, 2013 3:21 am
Posts: 26
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sat Mar 02, 2013 7:45 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sun Mar 03, 2013 1:19 am 
Offline

Joined: Sat Mar 02, 2013 3:21 am
Posts: 26
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sun Mar 03, 2013 6:27 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Perhaps not: it's sounding like a glitch from your single-stepping - is that consistent with what you see?
Cheers
Ed


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sun Mar 03, 2013 7:29 am 
Offline

Joined: Sat Oct 20, 2012 8:41 pm
Posts: 87
Location: San Diego
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sun Mar 03, 2013 2:00 pm 
Offline

Joined: Sat Mar 02, 2013 3:21 am
Posts: 26
Okay, I'll give that a shot. Would a 74HC14 work?


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sun Mar 03, 2013 4:27 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Weird JMP problem
PostPosted: Sun Mar 03, 2013 8:39 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8513
Location: Midwestern USA
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!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 72 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: