MCU Parallel I / O port number is always limited, and sometimes parallel port to be used for other more important purposes, generally will not use a large number of parallel I / O port designed to drive display circuit, can use the serial 80C51 communication port with a small amount of I / O and expansion of the chip is used to display the circuit? The answer is yes.
80C51 serial communication port is a powerful communication port, and is very easy to use communication port, very appropriate for the display driver circuit, following on the basis of this we need to design a line with two serial communication ports with two general I / O port, to design a 4-bit LED display circuit. Of course, as long as the two combined I / O port line can be easily achieved 8-bit LED display circuit.
Left is the electrical schematic diagram, we use C2051 MCU, while cheap and readily available with a 74LS164 and 74LS138 chips as an extension. 74LS164 is an 8-bit serial shift register in and out, its function here is to C2051 serial port, serial data output, and decoding parallel lines in its output, thus driving the LED digital tube. Decoder 74LS138 is a 3-8, it will output the address signal decoding MCU after the dynamic driving the corresponding LED. However, the current drive capability 74LS138 small, do this, we use the driver transistor 2SA1015 not level as the address driver.
Dan will be four LED’s are connected together by their common time-gated 74LS138, so any time there is only one LED in the light, that dynamic scan display, the advantage in the previous section we have described. Using the serial port for LED communication, programming is simple, users simply need to display data directly sent to the serial port buffer, the serial interrupt to wait to see the following procedures.