In the previous chapter, we used static display 1234.5, which was simpler without loop statements. This time, we use dynamic display 01234567
Directly give the reference program: use Keil uVision5 for programming and Proteus 8 Professional for simulation.
#include #include #define uchar unsigned char #define uint unsigned int uchar code DSY_CODE[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; void delay(fly x) { flying i; while(x--) { for(i=0;i<120;i++); } } void main() { fly i,j,w=0x80; while(1) { for(i=0;i<8;i++) { for(j=0;j<7;j++) { P2=0x00; w=_cror_(w,1) ; } P0=DSY_CODE[i]; //Send segment code P2=w ; //Send bit code delay(1); } } }
Previous article:AT89C51 MCU external interrupt
Next article:C-51 single chip computer dynamic digital tube display 1234.5
- 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
- NRF24L01 module usage
- AD 20.2.4 x64
- Design and implementation of high-speed SRIO interface of TMS320C6455
- When the frequency of PWM square wave signal is low, voltage overshoot and ringing will occur?
- 【bk7231N】Exploration of Tuya products in SPI and other communication aspects
- Commonly used algorithms for drones - Kalman filter (VII)
- Does the Internet of Things mean the Internet of Everything?
- ST Live: ST's AI on the Edge - Anomaly Detection Solution Based on NanoEdge AI
- Summary of board games
- [Xingkong Board Python Programming Learning Main Control Board] Use of various sensor functions and network connection