1、程序
#include "reg52.h"
typedef unsigned int uint16; //对系统默认数据类型进行重定义
typedef unsigned char uint8;
#define SMG_A_DP_PORT P0 //使用宏定义数码管段码口
//共阴极数码管显示0~F的段码数据
uint8 gsmg_code[16]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
void main()
{
SMG_A_DP_PORT=gsmg_code[15];//将数组第1个数据赋值给数码管段选口
// 0-9对应0-9 10-15对应a-f
while(1)
{
}
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。