欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標(biāo)題: 這是我單片機(jī)課程的一個(gè)一位秒表的代碼還有原理圖還有仿真文件 [打印本頁(yè)]

作者: I_robot_china    時(shí)間: 2018-6-28 14:00
標(biāo)題: 這是我單片機(jī)課程的一個(gè)一位秒表的代碼還有原理圖還有仿真文件
代碼:
#include<reg51.h>
unsigned char LED[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
char gewei;
sbit P17=P1^7;
unsigned char count,second;
void delay(int);  
main()
{
EA=1;ET0=1;
TR0=1;
TMOD=0X01;
TH0=-50000>>8;
TL0=-50000;
while(1)
{
   P2=0;
   P0=LED[second];
   delay(1);
}
}
void myT0() interrupt 1
{
TH0=-50000>>8;
TL0=-50000;
count++;
if(count==20)
{
count=0;
second++;
if(second==10)
second=0;
P17=~P17;
}

}
void delay(int x)
{
  int i,j;
  for(i=0;i<x;i++)
    for(j=0;j<120;j++);
}

TIM截圖20180628135910.png (50 KB, 下載次數(shù): 81)

TIM截圖20180628135910.png

秒表.zip

63.01 KB, 下載次數(shù): 11, 下載積分: 黑幣 -5


作者: I_robot_china    時(shí)間: 2018-6-28 15:13
很實(shí)用
作者: bibuobiguo    時(shí)間: 2021-12-12 15:41
按鈕?




歡迎光臨 (http://m.raoushi.com/bbs/) Powered by Discuz! X3.1