欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標題:
STM32共陰數(shù)碼管99倒計時程序有問題 求幫助
[打印本頁]
作者:
adg10025
時間:
2020-7-29 12:47
標題:
STM32共陰數(shù)碼管99倒計時程序有問題 求幫助
單片機源程序如下:
#include "stm32f10x.h"
uint16_t temp,i;
uint8_t table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
uint16_t disp[2];
void Delay(unsigned int count)
{ unsigned int i;
for(;count!=0;count--)
{ i=5000;
while(i--);
}
}
int main(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);
GPIO_InitStructure.GPIO_Pin=0xffff;
GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;
GPIO_Init(GPIOC,&GPIO_InitStructure);
while(1)
{
for(i=0;i<=99;i++)
{
disp[1]=table[i/10];
disp[0]=table[i%10];
temp=(disp[1]<<8)|(disp[0]&0x0ff);
GPIO_Write(GPIOC,temp);
Delay(100);
}
}
}
復制代碼
所有資料51hei提供下載:
靜態(tài)共陰0-99.7z
(220.49 KB, 下載次數(shù): 15)
2020-7-29 13:48 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1