74138

From NESdev Wiki
Jump to navigationJump to search

The 74138 (common variants 74LS138, 74HC138) is a 1-to-8-line decoder/demultiplexer in the 7400 series. The decoder has one active high and two active low enables and is often used to calculate complex boolean functions.

74138 Pinout

       .---v---.
  S0 --|1    16|-- Vcc
  S1 --|2    15|o- /Y0
  S2 --|3    14|o- /Y1
/G2A -o|4    13|o- /Y2
/G2B -o|5    12|o- /Y3
  G1 --|6    11|o- /Y4
 /Y7 -o|7    10|o- /Y5
 GND --|8     9|o- /Y6
       `-------'

Signal descriptions

It computes the following function:

  • G1, /G2a, /G2b, S2, S1, S0 are inputs
  • /Y0…/Y7 are outputs
G1 /G2a /G2b S2 S1 S0 /Y0 /Y1 /Y2 /Y3 /Y4 /Y5 /Y6 /Y7
0 X X X X X 1 1 1 1 1 1 1 1
X 1 X X X X 1 1 1 1 1 1 1 1
X X 1 X X X 1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 1 1 1 1 1 1 1
1 0 0 0 0 1 1 0 1 1 1 1 1 1
1 0 0 0 1 0 1 1 0 1 1 1 1 1
1 0 0 0 1 1 1 1 1 0 1 1 1 1
1 0 0 1 0 0 1 1 1 1 0 1 1 1
1 0 0 1 0 1 1 1 1 1 1 0 1 1
1 0 0 1 1 0 1 1 1 1 1 1 0 1
1 0 0 1 1 1 1 1 1 1 1 1 1 0

The NINA-03 boards use a 74'138 for their peculiar register range mask.