archive: homework4 homework1

This commit is contained in:
2025-04-14 13:14:52 +08:00
parent 83be5ac8da
commit cfaf068677
3 changed files with 35 additions and 7 deletions
+4 -4
View File
@@ -29,18 +29,18 @@ sbit BUS8DP = P2 ^ 7;
void set_38_2LED()
{
// e.g. set Y3 to 1, others to 0:
ADDR0 = 0;
ADDR0 = 1;
ADDR1 = 1;
ADDR2 = 1;
ADDR2 = 0;
ADDR3 = 1;
ENLED = 0;
}
void set_38_2SEG()
{
// e.g. set Y4 to 1, others to 0:
ADDR0 = 1;
ADDR0 = 0;
ADDR1 = 0;
ADDR2 = 0;
ADDR2 = 1;
ADDR3 = 1;
ENLED = 0;
}