I.Description
74LS138 is a 3-line to 8-line decoder/demultiplexer. The chip is designed to be used in high-performance memory-decoding or data-routing applications, requiring very short propagation delay times. In high-performance memory systems, these decoders can be used to minimize the effects of system decoding. The three enable pins of chip (in which Two active-low and one active-high) reduce the need for external gates or inverters when expanding.
Catalog
II. Digital Voltmeter Circuit
We use AD574 and AT89C2051 to form a high-precision digital voltmeter. The schematic diagram is shown in Figure 1. AD574 is a 12-bit successive comparison A/D converter with 12 data lines in total. P1 of AT89C2051 is directly connected to the high 8-bit data line of AD574, The low 4-bit data line of AD574 is directly connected with the upper half 4-bit p1.4-p1.7 of single-chip microcomputer. Data reading is based on the control line of a single-chip microcomputer, P3.5 is connected to AD574 byte short period control line (A0). P3.4 is connected to read conversion data control pin. And P3.7 is directly connected with the terminal of indicating working status (STS). Such structure determines that it can only be 8-bit output, so the data mode selection end can be directly grounded. AT89C2051 has only 15 I / O port wires, 11 of which are used above, and only 4 of them are left. The output data is output through the serial port of the single-chip microcomputer. and an external 74LS164 (serial in and parallel out) decoder is connected for expansion. At the same time, the data displayed is 4 bits, and the remaining 2 port lines still can not meet the requirements. A 74LS138 decoder is needed to gate the address of the display LED.
Here we use the input mode of the 10V range. Pin13 of AD574 is the input terminal of the measured voltage. Because only one AD574 conversion chip is used, the CS terminal can be directly grounded. The converter uses ±12V power supply voltage and the working voltage is +5V.
74LS164 is a serial input and parallel output decoder, The BCD serial code output by AT89C2051 through the serial port is decoded by 74LS164 and output as a seven-segment BCD code, which is directly connected to a-g of the LED, and the data lines of the four LEDs are connected one by one. LED digital tube uses a common anode type. The address code output by 74LS138 is connected to the common terminal of the LED via a transistor 2SA1015 (PNP). The display of the four-digit LED is a time-sharing strobe through the address line, which is our commonly used dynamic scanning display method.
It is worth mentioning that in the dynamic scanning display mode, the frequency of dynamic scanning has certain requirements. If the frequency is too low, the LED will flicker. If the frequency is too high, the lighting time of each LED is too short, and the brightness of the LED is too low. It can’t be seen clearly with the naked eye. So it is generally appropriate to take about 10ms. This requires that when writing a program, a certain LED should be on and kept for a certain period of time. The program often uses the call delay subroutine.
FAQ
- What type of applications is 74LS138 designed to be used?
High-performance memory-decoding or data-routing applications
|
- How many pins does 74LS138 reduce the need for external gates or inverters when expanding?
Three enable pins
|
A serial input and parallel output decoder.
|
Both have the same function. 74HC138 is made of high-speed CMOS process, with low power consumption, high output, low level and wide range.
74LS138 adopts the early bipolar process, and its driving capability is relatively larger.
|
74ls138 is a 3-8 wire decoder/multiplexer, 74ls148 is an 8-3 wire octal priority encoder.
One is decoding and the other is encoding. Opposite effect
|
Those two are the same chip, D is SOP package, N is DIP package.
|
Under the premise that the enable terminals S1 (active high), S2 (active low), and S3 (active low) are valid at the same time, only one output terminal is low at a time (the rest are high);
If the enable terminal is invalid, the output is all high level.
|
74ls138 is a 3-8-line decoder. The number 74 represents the 74 series of the 54/74 series, and the 74 series has an operating temperature of 0 degrees to 70 degrees. LS is a series, representing the low-power Schottky series. 138 is the variety code.
|
74LS138 working principle
① When one strobe terminal (E1) is high level, and the other two strobe terminals (E2) and (E3) are low level, at the output terminals corresponding to Y0 to Y7, the binary code of address terminals (A0, A1, A2) can be decoded at low level. For example: when A2A1A0=110, the Y6 output terminal outputs a low-level signal.
②Using E1, E2 and E3, it can be cascaded to expand into a 24-line decoder; if an external inverter is connected, it can also be cascaded to expand into a 32-line decoder.
③If one of the strobe terminals is used as a data input terminal, 74LS138 can also be used as a data distributor.
④It can be used in 8086 decoding circuit to expand memory.
|