完成:实验二 第三题

This commit is contained in:
2025-03-15 20:41:58 +08:00
parent 6b3a8c0d5c
commit f1b35bd0ed
2 changed files with 34 additions and 1 deletions
+32
View File
@@ -0,0 +1,32 @@
// test3.c
// 同时让多个LED灯闪烁
#include <reg52.h>
#include "homework2.h"
void main()
{
ENLED = 0;
ADDR3 = 1;
ADDR2 = 1;
ADDR1 = 1;
ADDR0 = 0;
while (1) {
D1 = 0;
D2 = 0;
D3 = 0;
D4 = 0;
D5 = 0;
D6 = 0;
D7 = 0;
D8 = 0;
Delay(100000);
D1 = 1;
D2 = 1;
D3 = 1;
D4 = 1;
D5 = 1;
D6 = 1;
D7 = 1;
D8 = 1;
Delay(100000);
}
}