您的位置 首页 FPGA

51单片机程序——让点阵动起来

includereg52h>unsignedcharcodetable[10]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};voidDelay(unsig

#include

unsigned char code table[10]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
void Delay(unsigned int t);
void main (void)
{
unsigned char i;
P1 = 0xff;
while (1)
{
for(i=0;i<8;i++)
{
P0=table[i];
Delay(50000);
P0=0xff;
Delay(50000);
}
}
}
void Delay(unsigned int t)
{
while(–t);
}

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/fangan/fpga/260847.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部