GAL Address Decoder
Re: GAL Address Decoder
Generally, the output of an uninitialised storage device is not defined - it will be either 0 or 1. So, if you're lucky, you might find the latch initialises to all-zero, but more likely it will come up random. It won't come up floating or in an intermediate state though.
But, I notice this part has a CLR* input: you should use that to power-on reset to all zero.
http://www.ti.com/lit/ds/scls134e/scls134e.pdf
Cheers
Ed
But, I notice this part has a CLR* input: you should use that to power-on reset to all zero.
http://www.ti.com/lit/ds/scls134e/scls134e.pdf
Cheers
Ed
Re: GAL Address Decoder
BigEd wrote:
Generally, the output of an uninitialised storage device is not defined - it will be either 0 or 1. So, if you're lucky, you might find the latch initialises to all-zero, but more likely it will come up random. It won't come up floating or in an intermediate state though.
But, I notice this part has a CLR* input: you should use that to power-on reset to all zero.
http://www.ti.com/lit/ds/scls134e/scls134e.pdf
Cheers
Ed
But, I notice this part has a CLR* input: you should use that to power-on reset to all zero.
http://www.ti.com/lit/ds/scls134e/scls134e.pdf
Cheers
Ed
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: GAL Address Decoder
Incidentally, there's a 74AC version of the 74HC259. In general, 74AC logic is faster than 74HC and has stronger drive. With the way in which you are cascading logic you can use all the speed you can get.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: GAL Address Decoder
BigDumbDinosaur wrote:
Incidentally, there's a 74AC version of the 74HC259. In ge0neral, 74AC logic is faster than 74HC and has stronger drive. With the way in which you are cascading logic you can use all the speed you can get.
With regard to speed; Are you talking about for RAM bank swapping itself? I.e. having to talk through the VIA to the latch if a bank needs changing? Obviously, this would only effect changing the swap bank which is why I'm opting for a latch to hold the values.
This is my latest circuit digram with the address decode in the bottom left and the latches in the bottom right.
[EDIT] Or do you mean the logic in the GAL? If so then it should have a propagation of 15ns or less according to the datasheet.
Last edited by banedon on Sun Apr 05, 2015 7:56 pm, edited 3 times in total.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: GAL Address Decoder
If you want to save some VIA pins, it looks like you could make the 259's, the LCD, and the keyboard controller share data lines. As long as only one thing is selected or strobed at a time, their data lines can be shared. You could get all that, and a printer interface, and more, all on one VIA and have the other one left free for experiments.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: GAL Address Decoder
I've already read your excellent primer with regards to this and was going to tackle that at a later point (along with RS232C which I find slightly daunting lol).
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: GAL Address Decoder
I have an RS-232 primer at http://wilsonminesco.com/RS-232/RS-232primer.html . (My apologies-- if you like pictures and diagrams, well, very few of them are in the first half of the article. Hopefully you'll still find it very clear.) RS-232 was later called EIA-232 and most recently TIA-232-F (based on what organizations adopted it as a standard, and the "-F" ending is the latest revision), but if you say "RS-232," everyone knows what you mean. It's an old industry workhorse that still very good for simplicity, long cable lengths, the fact that you can make up your own connectors, it's easy to view on an oscilloscope and troubleshoot if necessary, and probably other virtues I'm forgetting at the moment.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9426
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: GAL Address Decoder
banedon wrote:
BigDumbDinosaur wrote:
Incidentally, there's a 74AC version of the 74HC259. In ge0neral, 74AC logic is faster than 74HC and has stronger drive. With the way in which you are cascading logic you can use all the speed you can get.
With regard to speed; Are you talking about for RAM bank swapping itself? I.e. having to talk through the VIA to the latch if a bank needs changing? Obviously, this would only effect changing the swap bank which is why I'm opting for a latch to hold the values.
This is my latest circuit digram with the address decode in the bottom left and the latches in the bottom right.
[EDIT] Or do you mean the logic in the GAL? If so then it should have a propagation of 15ns or less according to the datasheet.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: GAL Address Decoder
Hi Banedon,
any reason why you connect the '259 to the VIA port, it's actually a waste of VIA pins in my opinion. I always use them as they have been used in the Apple II computer. You need a /SEL which is qualified with PHI2 and covers a range of 16 addresses. Then I connect D -> A0, S0 ->A1, S1 ->A2 and S2 -> A3. /CLR is connected to /RES so you have a clear initial state. Then a simple LDA instruction can throw any of the flip-flop in the '259.
cheers
Peter
any reason why you connect the '259 to the VIA port, it's actually a waste of VIA pins in my opinion. I always use them as they have been used in the Apple II computer. You need a /SEL which is qualified with PHI2 and covers a range of 16 addresses. Then I connect D -> A0, S0 ->A1, S1 ->A2 and S2 -> A3. /CLR is connected to /RES so you have a clear initial state. Then a simple LDA instruction can throw any of the flip-flop in the '259.
cheers
Peter
Re: GAL Address Decoder
cbscpe wrote:
Hi Banedon,
any reason why you connect the '259 to the VIA port, it's actually a waste of VIA pins in my opinion. I always use them as they have been used in the Apple II computer. You need a /SEL which is qualified with PHI2 and covers a range of 16 addresses. Then I connect D -> A0, S0 ->A1, S1 ->A2 and S2 -> A3. /CLR is connected to /RES so you have a clear initial state. Then a simple LDA instruction can throw any of the flip-flop in the '259.
cheers
Peter
any reason why you connect the '259 to the VIA port, it's actually a waste of VIA pins in my opinion. I always use them as they have been used in the Apple II computer. You need a /SEL which is qualified with PHI2 and covers a range of 16 addresses. Then I connect D -> A0, S0 ->A1, S1 ->A2 and S2 -> A3. /CLR is connected to /RES so you have a clear initial state. Then a simple LDA instruction can throw any of the flip-flop in the '259.
cheers
Peter
It's mostly because I want to keep things off the 6502 address and data buses as much as possible. That way if I really need to put something on them then I don't have to worry about having already overloaded them.
But going with your idea, is this what you're suggesting? The only part I'm a bit uncertain of is where /SEL comes from. I assume a VIA pin as in my circuit diagram (please ignore it saying PA0- it should say PB0)?
If so, then surely then you have a disjunction between the right address being on the address bus and /SEL (/LE) going low. [EDIT] ...or would use use the decoder to intercept a certain range (as small as possible) and then enable the latch select (/LE) pin? I'd have to introduce mode address pins if I did that to avoid wasting massive amounts of address space.
Re: GAL Address Decoder
Hi banedon,
yes except something is odd with our 74HC259, pin 14 is the latch enable and should be the /LATCH_SEL signal and not +5V, the LATCH_SEL has no pin number. Have a look at it. Of course I would have the GAL decode a small (minimum 16-byte) range and only this range enables LE of the '259. I would add a 74ACT138 between the IO_SEL pin and the IO devices.
As for the load, a 74HCT259 is neglectable. I have 65C816 working with about 15 CMOS devices connected to the address bus without any problem.
cheers
Peter
yes except something is odd with our 74HC259, pin 14 is the latch enable and should be the /LATCH_SEL signal and not +5V, the LATCH_SEL has no pin number. Have a look at it. Of course I would have the GAL decode a small (minimum 16-byte) range and only this range enables LE of the '259. I would add a 74ACT138 between the IO_SEL pin and the IO devices.
As for the load, a 74HCT259 is neglectable. I have 65C816 working with about 15 CMOS devices connected to the address bus without any problem.
cheers
Peter
Re: GAL Address Decoder
cbscpe wrote:
Hi banedon,
yes except something is odd with our 74HC259, pin 14 is the latch enable and should be the /LATCH_SEL signal and not +5V, the LATCH_SEL has no pin number. Have a look at it. Of course I would have the GAL decode a small (minimum 16-byte) range and only this range enables LE of the '259. I would add a 74ACT138 between the IO_SEL pin and the IO devices.
As for the load, a 74HCT259 is neglectable. I have 65C816 working with about 15 CMOS devices connected to the address bus without any problem.
cheers
Peter
yes except something is odd with our 74HC259, pin 14 is the latch enable and should be the /LATCH_SEL signal and not +5V, the LATCH_SEL has no pin number. Have a look at it. Of course I would have the GAL decode a small (minimum 16-byte) range and only this range enables LE of the '259. I would add a 74ACT138 between the IO_SEL pin and the IO devices.
As for the load, a 74HCT259 is neglectable. I have 65C816 working with about 15 CMOS devices connected to the address bus without any problem.
cheers
Peter
I'll see if I can get a proper TI one.
My concern about adding the '259 in the way that you're suggesting is that I will have to either sacrifice a large amount of address space or lose more pins on the GAL to decode a 16 byte range. I think that would mean I would have to decode A15-A4 (12 pins worth) as opposed to A15-A12 (4 pins) that I'm using at the moment.
With regard to the I/O; I'm using one address decode pin out of the GAL which connects to /CS2 of all of the VIA's and then A4 to CS1 of VIA#1 and A5 to CS1 of VIA#2.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: GAL Address Decoder
banedon wrote:
It's mostly because I want to keep things off the 6502 address and data buses as much as possible. That way if I really need to put something on them then I don't have to worry about having already overloaded them.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: GAL Address Decoder
Hi banedon,
I then suggest that you "export" some functions from your GAL to a more appropriate device. E.g. add a AND gate for the IRQs (e.g. 74HCT21, this part of your computer is not time critical at all), or you could add a 74ACT138 to decode the IO range (this however is time-critical so you need a fast version).
cheers
Peter
I then suggest that you "export" some functions from your GAL to a more appropriate device. E.g. add a AND gate for the IRQs (e.g. 74HCT21, this part of your computer is not time critical at all), or you could add a 74ACT138 to decode the IO range (this however is time-critical so you need a fast version).
cheers
Peter
Re: GAL Address Decoder
Ok you've both convinced me
. I'm going by what I've read elsewhere that you shouldn't over burden the buses - and I have no experience as to when this might happen.
What about having a couple of GALs in parallel? One intercepts the I/O and ROM and latch, the other does the RAM?
At least until I look at using PLCCs.
I.e.: Or perhaps:
What about having a couple of GALs in parallel? One intercepts the I/O and ROM and latch, the other does the RAM?
At least until I look at using PLCCs.
I.e.: Or perhaps: