Microcontroller 89C52 parallel I/O port realizes multiple LED displays

Publisher:GoldenSerenityLatest update time:2006-11-01 Source: www.52dianzi.com Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
In single-chip microcomputer application systems, low-cost and flexible-configuration digital tubes (LEDs) are commonly used as displays. Commonly used are 4 to 8-digit eight-segment LED digital tube displays, which require 4 to 8 LED digital tubes. There are many ways to achieve this kind of display, but corresponding measures must be taken to achieve the display of multiple LEDs. This article introduces a design method. The multi-channel LED digital tube display system designed by this method has the characteristics of simple hardware equipment, good portability and low cost, and has good application effects in various instrument display systems.
          
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.




2 Software Programming
        
  The software programming of this system is completed using the 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 coding is as follows:








 3 Conclusion
        
  This design method has been used many times in the display circuits of students' microcontroller experiments and in various instrument display systems. As long as the display program is transferred into other main programs, the display function can be completed. After repeated use, it has been proven that this method has good portability and strong practicability.
Reference address:Microcontroller 89C52 parallel I/O port realizes multiple LED displays

Previous article:Integrated power stage LED and constant current source circuit integrated design
Next article:Discussion and experiment on the application of integrated audio power amplifier IC to BTL

Latest Power Management 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号