標題:
用單片機C語言編程實現(xiàn)8位七段數(shù)碼管的動態(tài)顯示功能;顯示內容為自己的學號(后八位)
[打印本頁]
作者:
蠟筆小新2727
時間:
2020-12-16 20:44
標題:
用單片機C語言編程實現(xiàn)8位七段數(shù)碼管的動態(tài)顯示功能;顯示內容為自己的學號(后八位)
#include<reg51.h>
unsigned char const ceshi[]={0x3f,0x66,0x7d,0x7f,0x3f,0x5b,0x4f,0x7f,0x00,0x00};
unsigned char code seg[]={0,1,2,3,4,5,6,7};
void delay(unsigned int x)
{
while(--x);
}
main()
{
unsigned char i;
unsigned char n;
while(1)
{
for(n=0;n<100;n++)
{
for(i=0;i<8;i++)
{
P0=ceshi[i];
P2=seg[i];
delay(200);
P0=0X00;
}
}
}
}
作者:
GTM1
時間:
2021-9-13 08:42
獨立按鍵開關切換不同的學號怎么改
歡迎光臨 (http://www.torrancerestoration.com/bbs/)
Powered by Discuz! X3.1