【文章內(nèi)容簡介】
1997 沈陽工學(xué)院學(xué)士報告 13 附錄 A 整個系統(tǒng)電路原理圖: 沈陽工學(xué)院學(xué)士報告 14 附錄 B 硬件實物圖: 沈陽工學(xué)院學(xué)士報告 15 附錄 C //描 述:讀取按鍵 byte bot(void) //讀取按鍵,有按鍵被按下則返回 0,否則返回 1 { if(key==0)return 0。 else return 1。 } //描 述:將緩存區(qū) display[]中的整數(shù)譯碼后用數(shù)碼管進(jìn)行顯示 void display(word ms) //數(shù)碼管上的顯示反應(yīng)時間 { byte posi=0x01,i,j,temp。 disp[3]=ms/1000。 //1s disp[2]=(ms%1000)/100。 //100ms disp[1]=(ms%100)/10。 //10ms disp[0]=ms%10。 //1ms for(i=0。i4。i++) //數(shù)碼管顯示 { temp=disp[i]。 temp=table[temp]。 for(j=0。j200。j++) //延時 { P2=posi。 //顯示 xxxx 秒形式 P0=temp。 } posi*=2。 } } //描 述:調(diào)用系統(tǒng)隨機函數(shù) unsigned long random(void) //生成隨機數(shù) { 沈陽工學(xué)院學(xué)士報告 16 word rt。 byte k=0。 srand (50000)。 //種下隨機數(shù)種子,范圍 050000 rt=rand()。 //生成隨機熟 rt=rt*rand()。 //使隨機數(shù)足夠大,能夠延時足夠時間 return rt。 } //描述:定時器初始化子程序 void INIT_TMR1(void) { TMOD=0x11。 TH1=0xfc。 TL1=0x66。 TR1=1。 } void delaylms(void) //延時 1ms { INIT_TMR1() 。 while(1) { if(TF1==1) break。 } } 主函數(shù)的實現(xiàn) void main(void) { byte k=0。 k=bot()。 //獲取按鍵情況 P1=0xff。 //輸入 前先把 P1 口都加高電平 while(1) //主循環(huán)開始 沈陽工學(xué)院學(xué)士報告 17 { word mstime=0,j。 word r。 while(bot())。 //等待按鍵按下,否則始終等待 led=0。 //按鍵被按下后,燈亮 r=random()。 for (j=r。j0。j) //延時一段隨機時間,為 1 馬上的隨機倍數(shù) { delaylms()。 k=bot()。 if (k==1) //如果在燈滅前談起按鍵,顯示最長時間作為懲罰 { mstime=9999。 goto loop。 } } led=1。 //燈滅 INIT_TMR1()。 //初始定時狀態(tài) while(1) //如果按鍵彈起,反復(fù)進(jìn)入定時狀態(tài),沒 1ms 計時器 溢出一次,毫秒數(shù)加 1 { if(TF1==1) { TH1=0xfc。 TL1=0x18。 TR1=1。 TF1=0。 ++mstime。 } 沈陽工學(xué)院學(xué)士報告 18 if(k=bot()) break。 } loop: led=1 while(1) { if(k==1) //按鍵彈開后始終顯示時間 { k=bot()。 display(mstime)。 } else //若按鍵按下,重新開始測試 { while(1) { if(k==1) //按鍵彈開后始終顯示時間 { k=bot()。 display(mstime)。 } else //若按鍵按下,重新開始測試 { mstime=0。 P2=0xff。 break。 } } } } 沈陽工學(xué)院學(xué)士報告 19 請刪除以下內(nèi)容, O(∩ _∩ )O 謝謝?。。? The term autism refers to a cluster of conditions appearing early in childhood. All involve severe impairments in social interaction, munication, imaginative abilities, and rigid, repetitive behaviors. To be considered an autistic disorder, some of these impairments must be manifest before the age of three. The reference book used by mental health professionals to diagnose mental disorders is the Diagnostic and Statistical Manual of Mental Disorders , also known as the DSM. The 2021 edition of this reference book (the Fourth Edition Text Revision known as DSMIVTR ) places autism in a category called pervasive developmental disorders . All of these disorders are characterized by ongoing problems with mutual social interaction and munication, or the presence of strange, repetitive behaviors,interests, and activities. People diagnosed with these disorders are affected in many ways for their entire lives. Description Each child diagnosed with an autistic disorder differs from every other, and so general descriptions of autistic behavior and characteristics do not apply equally to every child. Still, the mon impairments in social interaction, munication and imagination, and rigid, repetitive behaviors make it possible to recognize children with these disorders, as they differ markedly from healthy children in many ways. Many parents of autistic children sense that something is not quite right even when their children are infants. The infants may have feeding problems, dislike being changed or bathed, or fuss over any change in routine. They may hold their bodies rigid, making it difficult for parents to cuddle them. Or, they may fail to anticipate being lifted, lying passively while the parent reaches for them, rather than holding their arms up in return. Most parents of autistic children bee aware of the strangeness of these and other behaviors only gradually. Impairments in social interaction are usually among the earliest symptoms t