1.代码
#include <REGX51.H>
#define uchar unsigned char
uchar code SEG[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
void main(void)
{
while(1)
{
P1=SEG[0];
}
}
2.仿真电路图
1.代码
#include <REGX51.H>
#define uchar unsigned char
uchar code SEG[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
void main(void)
{
while(1)
{
P1=SEG[0];
}
}
2.仿真电路图