74HC138 chip is a three-channel input, eight-channel output decoder, mainly used in consumer electronic products. (Because the MCU I\/O port resources are limited, so we can use it to achieve the expansion of I\/O port)
< p >
(L: Low level H: high level X: status undetermined)
E1, E2, E3 are the enable control ports of the chip, A0, A1, A2 are the data input ports of the chip, Y0-Y7 are the data output ports of the chip. It can be seen from the truth table that the output Y of the data can be controlled by the input A only when the enabled ports E1 and E2 are low (L) and E3 is high (H).