archive: homework4 homework2
This commit is contained in:
@@ -18,7 +18,9 @@
|
|||||||
},
|
},
|
||||||
"targets": {
|
"targets": {
|
||||||
"Debug": {
|
"Debug": {
|
||||||
"excludeList": [],
|
"excludeList": [
|
||||||
|
"src/test1.c"
|
||||||
|
],
|
||||||
"toolchain": "Keil_C51",
|
"toolchain": "Keil_C51",
|
||||||
"compileConfig": {
|
"compileConfig": {
|
||||||
"options": "null"
|
"options": "null"
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
// test2.c
|
||||||
|
// 点亮数码管段b和c,让数码管显示一个数字1
|
||||||
|
#include "homework4.h"
|
||||||
|
|
||||||
|
void test2()
|
||||||
|
{
|
||||||
|
set_38_2SEG();
|
||||||
|
BUS2B = 0; // turn on segment b
|
||||||
|
BUS3C = 0; // turn on segment c
|
||||||
|
while (1) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
test2();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user