3. Assembly source program
ORG 00H
START: NOP
MOV R3,#3
LOP2: MOV R4,#8
MOV R2,#0
LOP1: MOV P1,#0
FF
H
MOV DPTR,#TABA
MOV A,R2
MOVC A,@A+DPTR
MOV P3,A
INC R2
LCALL DELAY
DJNZ R4,LOP1
DJNZ R3,LOP2
MOV R3,#3
LOP4: MOV R4,#8
MOV R2,#7
LOP3: MOV P1,#0FFH
MOV DPTR,#TABA
MOV A,R2
MOVC A,@A+DPTR
MOV P3,A
DEC R2
LCALL DELAY
DJNZ R4 ,LOP3
DJNZ R3,LOP4
MOV R3,#3
LOP6: MOV R4,#8
MOV R2,#0
LOP5: MOV P3,#00H
MOV DPTR,#TABB
MOV A,R2
MOVC A,@A+DPTR
MOV P1,A
INC R2
LCALL DELAY
DJNZ R4 ,LOP5
DJNZ R3,LOP6
MOV R3,#3
LOP8: MOV R4,#8
MOV R2,#7
LOP7: MOV P3,#00H
MOV DPTR,#TABB
MOV A,R2
MOVC A,@A+DPTR
MOV P1,A
DEC R2
LCALL DELAY
DJNZ R4 ,LOP7
DJNZ R3,LOP8
LJMP START
DELAY: MOV R5,#10
D2: MOV R6,#20
D1: MOV R7,#248
DJNZ R7,$
DJNZ R6,D1
DJNZ R5,D2
RET
TABA: DB 0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,07FH
TABB: DB 01H,02H,04H,08H,10H,20H,40H,80H
END
4. C51 language source program
#include
unsigned char code taba[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
unsigned char code tabb[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
void delay(void)
{
unsigned char i,j;
for(i=10;i>0;i--)
for(j=248;j>0;j--);
}
void delay1(void)
{
unsigned char i,j,k;
for(k=10;k>0;k--)
for(i=20;i>0;i--)
for(j=248;j> 0;j--);
}
void main(void)
{
unsigned char i,j;
while(1)
{
for(j=0;j<3;j++) //from left to right 3 time
{
for(i=0;i<8;i++)
{
P3=taba[i];
P1=0xff;
delay1();
}
}
for(j=0;j<3;j++) //from right to left 3 time
{
for(i=0;i<8;i++ )
{
P3=taba[7-i];
P1=0xff;
delay1();
}
}
for(j=0;j<3;j++) //from top to bottom 3 time
{
for(i=0;i< 8;i++)
{
P3=0x00;
P1=tabb[7-i];
delay1();
}
}
for(j=0;j<3;j++) //from bottom to top 3 time
{
for(i=0 ;i<8;i++)
{
P3=0x00;
P1=tabb[i];
delay1();
}
}
}
}
Previous article:What issues should be considered in the design and installation of outdoor LED large screens?
Next article:Advantages and problems of LED color wall screen application
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- The inverter outputs a sine wave, so how do we measure the harmonics and waveform distortion of the output voltage?
- Understand the MSP430F149 comparator by looking at a picture
- MOS tube knowledge
- 【GD32L233C-START Review】-I. Unboxing and Hardware Appreciation
- PCB technology: PROTEL's metal slot method
- [ATmega4809 Curiosity Nano Review] Using MCC to configure TCA
- circuitpy compass
- In a blink of an eye, half of this year has passed.
- Four opportunities for RF technology in the retail market
- The shield affects the sensitivity, and the inductor close to the DCDC affects the sensitivity