目的:
在共阴数码管上,轮流在对应的数码管显示出0-7的数字
包括的文件如下
//seg.c
#include <reg52.h>
#include <intrins.h>
#include "delay.h"
#define SEGPORT P0
sbit bit_select = P2^0;
sbit seg_select = P2^1;
unsigned char segdata[16] = {
0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,
在共阴数码管上,轮流在对应的数码管显示出0-7的数字
//seg.c
#include <reg52.h>
#include <intrins.h>
#include "delay.h"
#define SEGPORT P0
sbit bit_select = P2^0;
sbit seg_select = P2^1;
unsigned char segdata[16] = {
0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,