1
\$\begingroup\$

My VIC-20 has a few bank select lines that are used for enabling ROM chips on the cartridge port. When one of them goes low, it means that a certain 8KB region of the address space has been accessed.

Usually you can hook these up directly to the chip enable (/CE) pin of a ROM chip to essentially place that 8KB ROM into a certain slot in memory.

However, I have a 16KB ROM with only one /CE pin which means that I need to combine two bank select lines. I know I can do this with a single AND gate (since the logic is inverted), but it seems like a waste to use a quad-AND or NAND chip if there was a simpler solution.

Note, only one of the bank select lines ever goes low at a time. So the truth table would be kind of like:

A|B|O
-----
1|1|1
0|1|0
1|0|0
0|0|Never happens

Is there an elegant way to do this with discrete components?

\$\endgroup\$
6
  • 1
    \$\begingroup\$ Use diodes and a resistor. . \$\endgroup\$
    – jp314
    Commented Dec 29, 2015 at 4:41
  • \$\begingroup\$ I'm not sure what that would look like... \$\endgroup\$ Commented Dec 29, 2015 at 4:42
  • \$\begingroup\$ If you google diode and gate you'll see. This answer should be fleshed out. \$\endgroup\$
    – scld
    Commented Dec 29, 2015 at 4:42
  • 3
    \$\begingroup\$ Have you seen Little Logic yet? \$\endgroup\$ Commented Dec 29, 2015 at 4:44
  • 1
    \$\begingroup\$ VIC20! Ha. Haha. Hahaha. WOW !!!. Congratulations! I have a few lurking somewhere in the deep dungeon. Must be getting near time to dig them out again :-). \$\endgroup\$
    – Russell McMahon
    Commented Dec 29, 2015 at 11:48

1 Answer 1

6
\$\begingroup\$

Diode-OR them:

schematic

simulate this circuit – Schematic created using CircuitLab

Either input can pull the output low, and only the pullup will pull it high.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ 1N4148 or similar small-signal diodes of course, not 1N4007's. :) \$\endgroup\$
    – rdtsc
    Commented Dec 29, 2015 at 4:49
  • \$\begingroup\$ And I suppose a 10K pullup for a 5v supply? \$\endgroup\$ Commented Dec 29, 2015 at 4:53
  • 1
    \$\begingroup\$ @KrunalDesai The drivers are 74LS138 for the chip select lines. \$\endgroup\$
    – pipe
    Commented Dec 29, 2015 at 5:04
  • 1
    \$\begingroup\$ Looks like it is specified at 4 and 8mA -- definitely overthinking it, but figured it was worth it as a learning exercise. You're good with 10k unless I'm missing something exotic. \$\endgroup\$ Commented Dec 29, 2015 at 5:07
  • 1
    \$\begingroup\$ Wouldn't Shottky diodes be a better choice than ordinary silicon diodes if we mind the driver output voltage levels @ logical low? \$\endgroup\$
    – user59864
    Commented Dec 29, 2015 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.