首页 > 学院 > 开发设计 > 正文

数码管变化数字

2019-11-06 06:20:15
字体:
来源:转载
供稿:网友
#include<reg52.h>void delay(unsigned char i){ unsigned char j,k; for(j = 0 ; j <255; j++) for(k = 0 ; k < i; k ++) ;}void main(){ unsigned char code chagenum[16]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xC6,0xA1,0x86,0x8E}; // 0-9} unsigned char i; while(1) { for(i = 0; i < 16; i++) { P1 = chagenum[i]; delay(200); } }}
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表