标签:signed nbsp efi include ++ 数码 实现 define stc
#include <STC15F2K60S2.h> #define uint unsigned int #define uchar unsigned char #define ulong unsigned long uchar code seg[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; sbit key1=P0^0; #define LED1 P1 uint n; void delayms(uint ms){ uint i,j; for(i=ms;i>0;i--) for(j=110;j>0;j--); } void main(){ P1M0=0XFF; P1M1=0X00; n=0; while(1){ LED1=seg[n]; if(key1==0){ delayms(50); while(!key1); n++;} if(n>9) n=0; } }
标签:signed nbsp efi include ++ 数码 实现 define stc
原文地址:https://www.cnblogs.com/wszme/p/9353600.html