文件名称:8、交通灯
介绍说明--下载内容均来自于网络,请自行研究使用
//---定义IO口---//
#define GPIO_DIG P0 //显示段码端口,74HC573锁存器;
#define GPIO_PALCE P1 //数码管片选端口,74HC138译码器;
#define GPIO_TRAFFIC P2 //交通灯端口;
sbit RED10=P2^0; //上人行道红灯;
sbit GREEN10=P2^1; //上人行道绿灯;
sbit RED11=P2^2; //上机动车红灯;
sbit YELLOW11=P2^3; //上机动车黄灯;
sbit GREEN11=P2^4; //上机动车绿灯;
sbit RED00=P3^0; //右人行道红灯;
sbit GREEN00=P3^1; //右人行道绿灯;
sbit RED01=P2^5; //右机动车红灯;
sbit YELLOW01=P2^6; //右机动车黄灯;
sbit GREEN01=P2^7; //右机动车绿灯;(/ define IO port --- //
#define GPIO_DIG P0 // show segment code port, 74HC573 latch;
#define GPIO_PALCE P1 // digital segment select port, 74HC138 decoder;
#define GPIO_TRAFFIC P2 // traffic light port;
Sbit RED10 = P2 ^ 0; // on the street red light;
Sbit GREEN10 = P2 ^ 1; // on the sidewalk green light;
Sbit RED11 = P2 ^ 2; // on the motor red light;
Sbit YELLOW11 = P2 ^ 3; // on the motor vehicle yellow light;
Sbit GREEN11 = P2 ^ 4; // on the green car;
Sbit RED00 = P3 ^ 0; // right walkway red light;
Sbit GREEN00 = P3 ^ 1; // right lane green light;
Sbit RED01 = P2 ^ 5; // right motor red light;
Sbit YELLOW01 = P2 ^ 6; // right motor vehicle yellow light;
Sbit GREEN01 = P2 ^ 7; // right motor green light;)
#define GPIO_DIG P0 //显示段码端口,74HC573锁存器;
#define GPIO_PALCE P1 //数码管片选端口,74HC138译码器;
#define GPIO_TRAFFIC P2 //交通灯端口;
sbit RED10=P2^0; //上人行道红灯;
sbit GREEN10=P2^1; //上人行道绿灯;
sbit RED11=P2^2; //上机动车红灯;
sbit YELLOW11=P2^3; //上机动车黄灯;
sbit GREEN11=P2^4; //上机动车绿灯;
sbit RED00=P3^0; //右人行道红灯;
sbit GREEN00=P3^1; //右人行道绿灯;
sbit RED01=P2^5; //右机动车红灯;
sbit YELLOW01=P2^6; //右机动车黄灯;
sbit GREEN01=P2^7; //右机动车绿灯;(/ define IO port --- //
#define GPIO_DIG P0 // show segment code port, 74HC573 latch;
#define GPIO_PALCE P1 // digital segment select port, 74HC138 decoder;
#define GPIO_TRAFFIC P2 // traffic light port;
Sbit RED10 = P2 ^ 0; // on the street red light;
Sbit GREEN10 = P2 ^ 1; // on the sidewalk green light;
Sbit RED11 = P2 ^ 2; // on the motor red light;
Sbit YELLOW11 = P2 ^ 3; // on the motor vehicle yellow light;
Sbit GREEN11 = P2 ^ 4; // on the green car;
Sbit RED00 = P3 ^ 0; // right walkway red light;
Sbit GREEN00 = P3 ^ 1; // right lane green light;
Sbit RED01 = P2 ^ 5; // right motor red light;
Sbit YELLOW01 = P2 ^ 6; // right motor vehicle yellow light;
Sbit GREEN01 = P2 ^ 7; // right motor green light;)
相关搜索: 51
(系统自动生成,下载前可以参看下载内容)
下载文件列表
8、交通灯
8、交通灯\交通灯
8、交通灯\交通灯.LST
8、交通灯\交通灯.M51
8、交通灯\交通灯.OBJ
8、交通灯\交通灯.c
8、交通灯\交通灯.hex
8、交通灯\交通灯.lnp
8、交通灯\交通灯.plg
8、交通灯\交通灯.uvopt
8、交通灯\交通灯.uvproj
8、交通灯\交通灯_uvopt.bak
8、交通灯\交通灯_uvproj.bak
8、交通灯\交通灯
8、交通灯\交通灯.LST
8、交通灯\交通灯.M51
8、交通灯\交通灯.OBJ
8、交通灯\交通灯.c
8、交通灯\交通灯.hex
8、交通灯\交通灯.lnp
8、交通灯\交通灯.plg
8、交通灯\交通灯.uvopt
8、交通灯\交通灯.uvproj
8、交通灯\交通灯_uvopt.bak
8、交通灯\交通灯_uvproj.bak