单片机交通灯C语言设计程序(3)
时间:2025-02-24
时间:2025-02-24
用单片机实现的交通灯设计
//east red leds on // 符合实际交通 // RED_B=0;
YELLOW_B=1;
GREEN_B=1;
}
//east and west 7segments control function void East_West_7seg()
{
S1=0;
S2=0;
S3=0;
S4=0;
if(second_counts>0)
{
S1=1;
S2=0;
P1=seg7[second_counts/10];
Delay(2);
S1=0;
S2=1;
P1=seg7[second_counts%10];
上一篇:3-8译码器的VHDL设计
下一篇:2010年高考作文阅卷实录汇编