文件名称:交通灯程序交通灯程序
文件大小:8KB
文件格式:C
更新时间:2014-01-17 16:41:54
交通灯程序
交通灯程序交通灯程序#include"at89x51.h" #define uchar unsigned char #define uint unsigned int uint tcount,keysecond,keysecond1,keycount,count,buttonflag,m_flag,s_flag; int second,second1; uchar dispcode[]= {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; uint key_time; uint a=0;uint b=0; uint c=0;uint d=0; uint x[4]={1,0,30,35}; uint sn_red,sn_grn,sn_yellow,sn_led,ew_red,ew_grn,ew_yellow,ew_led; void delay_ms(int i) {