#include #include void delay(void) { unsigned int i,j; for(i=500;i>0;i--) for(j=115;j>0;j--); } void main(void) { // Write your code here unsigned char led ,a ,b ;//Define three variables led=0xfe; //led=1111 1110, P0. 0 is on while (1) { P0=led; //Assign the status of LED to the P0 register a=led>>7; //Assign the highest bit of led to the lowest bit of a, and the rest are 0; b=led<<1; led=b|a; //Bitwise OR operation; delay(); } }
Previous article:Proteus simulation of 8255 parallel I/O expansion experiment based on 51 single chip microcomputer
Next article:51 MCU simulation - relay control lighting equipment
- 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
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- This is a circuit diagram I found on the Internet. I would like to ask the experts to analyze how this circuit oscillates.
- How to connect to MySQL in Python?
- PCB circuit board heat dissipation
- 6pin chip silk screen 420 model number
- 【CH579M-R1】+ Comparison of two CH579 M development boards
- USB protocol basic knowledge.docx
- ESP32 Network Time Synchronization
- A high-precision pulse width measurement system based on digital phase shifting technology.docx
- [AT-START-F425 Review] + Hardware I2C and software simulation I2C speed comparison
- Infinite chip