1 hour ago, rje said:
You know... his question got me to thinking about the relative value of 7400s versus CPLDs, and how different digital logic is today from back-when. I guess there's still value in doing it with 7400s.
Heck, I see that the SD card SPI CS and the serial ROM SPI CS is side by side in a control register in the X8, and there might be one spare pin (if it isn't a pin stranded by lack of logic resources), and I'm like, "hey, that's a job for a 74x138, just send three bits out on pins undecoded, and you get 7 alternative SPI selects."
...
... OOH! WAIT! It might be possible to finesse away the need for a spare pin!
Use the next decoder! A 74x139 dual active low 2>4 decoder ... that's the ticket!
See, if you include a GPIO extender, you can use some of that GPIO for system uses. So you have one decoder, /EN tied to ground so it's always on, tied to the two pins that were original SD and serial flashROM CS's. So %01 SD card, %10 serial flash ROM %11 GPIO extender ... %00, SPI expansion bus.
Now, the
other decoder has its two address pins tied to two of the GPIO (probably the top two, for convenience of addressing), and the active low for the first decoder's %00 tied to ITS /EN line. So you address the GPIO pin functions, set the top two pins to output, then address those pins as b0 and b1 and store the desired SPI slot number, 1, 2 or 3. The three four active low outputs go out on four of the pins on the 5x2 block header, plus MOSI, MISO, SCLK, +3.3v and GND. If there IS a spare pin, it can be used as an Alert pin, with a pull up resister, tied to the GPIO extender alert line and also brought in from a pin of the block pin header.
It's BETTER if there is a spare pin to be used for addressing, but it's still workable without ... to "turn off" the extension "slots", just set the GPIO selecting the extension slot to "slot 0", which is NC ... and it's probably a higher priority to use a spare pin for Alert if it's available.