Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - traffic light segment
Search - traffic light segment - List
汇编语言基于8255a的交通灯的控制实现-traffic light control
Date : 2025-12-21 Size : 3kb User : 苏波

基于AT89C51的交通控制系统,以ASM为开发环境。 1.AB方向亮绿灯60s,然后黄灯闪烁3次,每次一秒(亮灭各40ms),红灯40s,同时CD方向红灯65s,绿灯35s,黄灯闪烁3s 2.各路灯用LED模拟显示,同时用七段数码管显示两路的倒计时时间 3.利用键盘可修改灯亮时间 4.PC机设置灯亮时间,利用PC与单片机串口通信实现 -AT89C51-based traffic control system to ASM for the development environment. 1.AB Directional Brightness green 60s, and then the yellow light flashes three times, each time one second (light off each 40ms), red 40s, while the direction of the red CD 65s, green 35s, flashing yellow 3s 2. Various street lights with LED analog display, but with two seven-segment digital display countdown time 3 can be modified using the keyboard lights lit time 4.PC time machine settings using PC serial communication with the MCU
Date : 2025-12-21 Size : 12kb User : 宋雪涛

//---定义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;)
Date : 2025-12-21 Size : 26kb User : 9956
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.