Program function, display eight numbers 0, 1, 2, 3, 4, 5, 6, 7 from left to right
The program source code is as follows:
/*
8 digital tubes display different characters at the same time
*/
#include typedef unsigned char uint8; typedef unsigned int uint16; code uint8 LED_CODE[] = {0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8}; void delay(uint16 x) { uint16 i,j; for(i = x; i > 0; i --) for(j = 114; j > 0; j --); } void main() { uint8 i; while(1) { for(i = 0; i < 8; i ++) { P0 = 0xFF; P3 = 0x01 << i; P0 = LED_CODE[i]; delay(4); } } }
Previous article:A single digital tube displays 0~F in a cycle
Next article:A single button controls a single digital tube to scroll display
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- Breaking through the intelligent competition, Changan Automobile opens the "God's perspective"
- The world's first fully digital chassis, looking forward to the debut of the U7 PHEV and EV versions
- Design of automotive LIN communication simulator based on Renesas MCU
- When will solid-state batteries become popular?
- Adding solid-state batteries, CATL wants to continue to be the "King of Ning"
- The agency predicts that my country's public electric vehicle charging piles will reach 3.6 million this year, accounting for nearly 70% of the world
- U.S. senators urge NHTSA to issue new vehicle safety rules
- Giants step up investment, accelerating the application of solid-state batteries
- Guangzhou Auto Show: End-to-end competition accelerates, autonomous driving fully impacts luxury...
- Lotus launches ultra-900V hybrid technology "Luyao" to accelerate the "Win26" plan
- Netcom Broadband Restructuring Fades in Cold Reception
- book
- Rethinking 5G
- MSP430 Program Library--Use of DAC12
- Precision rectification is not precise
- Micron invites you to post window decorations and receive benefits during the Lantern Festival
- DCM ChiP DC-DC converter module released
- The most comprehensive article on ultra-wideband.
- TMS320F28335 project development record 7_28335 clock
- How to calculate the frequency of this oscillator circuit