Using 51 microcontroller parallel port to drive LED digital tube display circuit and program

Publisher:EtherealEssenceLatest update time:2023-08-02 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This paper introduces the method of using a parallel port of 51 microcontroller to realize multiple LED digital tube displays. The hardware circuit structure schematic diagram and software program flow of the multi-channel LED display system designed using this method are given. At the same time, the 51 assembly language is given. Programming.


1 When the hardware circuit displays multiple LEDs, the segment selection lines of all the bits are often connected in parallel and controlled by an 8-bit I/O port, while the common cathode point or common anode point is controlled by another 8-bit I/O port. ; Parallel expansion ports can also be used to form display circuits. Usually, more pins of expansion devices are required and the price is higher. This article will introduce a simple method of using a parallel I/O port of a microcontroller to realize multiple LED displays. Figure 1 shows the hardware schematic diagram of the circuit. Among them, 74LS138 is a 3-line to 8-line decoder, 74LS164 is an 8-bit parallel output gated serial input shift register, and the LED uses L05F type common cathode digital tube.


When displaying, the display data is sent from the P12 port output of 89C52 to the A and B terminals of the shift register 74LS164 in a serial manner, and then the parallel data is output from the output terminals Q0~Q7 to control the switch tubes WT1~WT8 collector, and then send the output LED segment selection code to the digital tube LED1~LED8 at the same time. The bit selection code is output from the P14~P16 ports of the 89C52 and sent to the base of the switch tubes Y1~Y8 through the decoder 74LS138 to control the bit selection of the digital tubes LED1~LED8. In this way, the eight digital tubes are controlled by 100ms. Time intervals are displayed in rotation. Due to the residual effect of the human eye, these eight digital tubes appear to be displayed almost simultaneously.

"51 microcontroller parallel port driver LED digital tube display circuit"

2 Software programming

The software programming of this system is completed using MCS-51 series microcontroller assembly language, and the display program is used as a subroutine, so that the main program can conveniently call it. Figure 2 shows its flow chart. The specific program code is as follows:


Reference address:Using 51 microcontroller parallel port to drive LED digital tube display circuit and program

Previous article:Design of robot with road learning and memory based on AT89C51 microcontroller
Next article:MCS51 microcontroller filter program

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号