6502.org
http://forum.6502.org/

Wait-States with a GAL
http://forum.6502.org/viewtopic.php?f=10&t=1697
Page 4 of 4

Author:  kc5tja [ Sun Dec 05, 2010 7:15 pm ]
Post subject: 

faybs wrote:
Wow, I seem to have touched a nerve here


All valid points, but the difference is that I can at least acquire the different library versions I need whenever I need them. I'm a GoboLinux user at home and a Slackware user at work, so I still have to manually fulfill dependencies. Inconvenient, yes, but I have a full understanding of my system in exchange. I'm willing to pay that price.

Quote:
As an aside, I must say that I'm mystified that people in the tech industry are still going on about dodgy business dealings that happened over a decade ago, while companies like Monsanto and BP, who are right now trading our health for their profits, get a free pass


No, I fight that too. I just don't fight those battles here.

Author:  BigDumbDinosaur [ Sun Dec 05, 2010 10:47 pm ]
Post subject:  Re: Wait-States with a GAL

8BIT wrote:
BigDumbDinosaur wrote:
BTW, in the chip pictorial in your code, you show that pin 11 is grounded. Actually, it should be a no-connect.


Pin 11 is the OE for the two flip flops. If you want to see the outputs on pins 12 & 13, you need to have pin 1 grounded. However, the flip flops will work with pin 11 high as well. Since it is an input, it should be connected to either Vcc or Gnd.

Righto. I was not thinking in terms (no pun intended) of exposing the flops to the world at-large. :)

Quote:
One part I had trouble with was the lack of /CLR input in the 16V8's flip flops. I finally figured that having RES ANDed with the D input provide at least a synchronous reset.

Yeah, it isn't made very clear in any of the CUPL narratives exactly how to reset a flop. I saw an example in the Atmel WinCUPL help documentation on explicitly resetting flops. In the places where we would use something like this, the sync reset is not an issue. It might be for a state machine, however.

Author:  BigDumbDinosaur [ Fri Dec 17, 2010 6:04 pm ]
Post subject:  Wait-States with a GAL

Technical note: inserting a diode in series with the RDY signal isn't likely to work as expected. The 16V8 pulls outputs down to 0.5 volts when they are low. Forward drop on a small-signal diode, such as a 1N4148 or 1N4152, is typically at least 0.6 volts at the current levels involved. WDC says in the W65C816S data sheet that RDY has to be pulled down to Vcc * .2 or lower, which would be 1.0 volt or less, assuming Vcc = 5. Subtract the diode drop from that and you have a requirement that the GAL sink its output to 0.4 volts, which it can't do. So the wait-state will work but the MPU won't see it. Skip the diode and just make sure the GAL's RDY output is tri-stated when no wait-state is in progress.

incidentally, a series resistor won't help. It would have to be no more than 220 ohms, and if the MPU executed WAI with the GAL output high, 20 MA would be drawn through the MPU, which, it would seem, is well beyond the MPU's capabilities.

Author:  GARTHWILSON [ Fri Dec 17, 2010 6:21 pm ]
Post subject: 

Quote:
incidentally, a series resistor won't help. It would have to be no more than 220 ohms, and if the MPU executed WAI with the GAL output high, 20 MA would be drawn through the MPU, which, it would seem, is well beyond the MPU's capabilities.

I expect (but don't know for sure) that the processor's pin drivers are the same as the VIA's, and I found by experimentation that WDC's could pull to within 0.8V of the rail with a 220Ω load to the other rail, even pulling up. It was symmetrical. A dead short gave a 50mA pin current, meaning there's a current-limiting mechanism and it cannot be modeled as a simple resistance. Rockwell's on the other hand could only give 15-20mA trying to pull up with a short to ground but 100mA trying to pull down. That's the current for a single pin, not for all pins of a port combined. This is why I have discouraged the use of separate bus drivers on a 65c02. The NMOS 6502 OTOH had a pretty measly drive capability.

Using resistors however is a no-go in most situations because of the resulting time required to charge bus capacitances.

Author:  BigDumbDinosaur [ Fri Dec 17, 2010 9:24 pm ]
Post subject: 

GARTHWILSON wrote:
I expect (but don't know for sure) that the processor's pin drivers are the same as the VIA's, and I found by experimentation that WDC's could pull to within 0.8V of the rail with a 220Ω load to the other rail, even pulling up. It was symmetrical. A dead short gave a 50mA pin current, meaning there's a current-limiting mechanism and it cannot be modeled as a simple resistance. Rockwell's on the other hand could only give 15-20mA trying to pull up with a short to ground but 100mA trying to pull down. That's the current for a single pin, not for all pins of a port combined. This is why I have discouraged the use of separate bus drivers on a 65c02. The NMOS 6502 OTOH had a pretty measly drive capability.

Using resistors however is a no-go in most situations because of the resulting time required to charge bus capacitances.

I asked WDC to clarify how much current RDY can sink. Meanwhile, I concur on the resistor's effect on slew rate, although 220 ohms wouldn't do much in that regard. In the CPLD code I've written for POC V2, I've arranged to tri-state RDY when not active. The external pullup for RDY is 3.3k, so slew rate should be very good.

Incidentally, buried in the '816 data sheet is a caveat about how WAI will not function as expected if RDY is forced high. In such a case, the MPU will execute WAI and then immediately move on to the next instruction, rather than wait for an interrupt before continuing.

Author:  GARTHWILSON [ Fri Dec 17, 2010 9:46 pm ]
Post subject: 

Quote:
I asked WDC to clarify how much current RDY can sink.

Their specifications have always been a bit out to lunch, and fortunately in the way that the parts do much better than they say. In the case of this current that I measured on the VIA, the actual current was about an order of magnitude better than they guarantee for pulling down, and almost two orders of magnitude better for pulling up.

Page 4 of 4 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/