- #include<reg51.H> // 对单片机的口进行了定义
- #define uint unsigned int
- #define uchar unsigned char
- uchar code a[10]={0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x78,0x00,0x10};//段码组合,共阳极
- uchar code b[4]={0x01,0x02,0x04,0x08}; //位码组合
- uchar code c[4]={0xcc,0xd4,0x78,0xb8};/*P1 绿红、黄红、红绿、红黄*/
- 这是交通灯的开头几行,看不懂后面三行编码
|