2360| 2
|
求51单片机共阴极四位数码管0000-9999循环的代码编写思路 |
8黑币
最佳答案相信这个可以帮助到你
#include
#define uchar unsigned char
void delayms(uchar ms);
int main(void)
{
unsigned char led[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; //0-9共阳数码管段码
unsigned char i;
P2=0x00; //共阳数码管位选置0
while(1)
{
for(i=0;i
| ||