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:
Previous article:Design of robot with road learning and memory based on AT89C51 microcontroller
Next article:MCS51 microcontroller filter program
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- CCS compilation error: Solution for missing header file
- Power analyzer directly connected to CAN network
- RISCV Linux simulation environment construction and summary
- Introducing the TI C2000 stack evaluation method
- MicroPython's official documentation has been significantly adjusted
- DISP0_CONTRAST is used as GPIO to drive LED
- Disassembly of a compact portable negative ion generator
- Share ESP8266smartconfig source code
- BlueNRG-1 LSM6DSL Direction Detection
- July is here, I want to do something, please give me some ideas~~