【正文】
Australia, China, and India between 1895 and 1900。s ball is in (7274 cm) in circumference. The covering of the ball is leather, rubber, position, or synthetic, although leather covers only are dictated by rules for college play, unless the teams agree otherwise. Orange is the regulation color. At all levels of play, the home team provides the ball. Inflation of the ball is based on the height of the ball39。 } else //若按鍵按下,重新開(kāi)始測(cè)試 { mstime=0。 TR1=1。j) //延時(shí)一段隨機(jī)時(shí)間,為 1 馬上的隨機(jī)倍數(shù) { delaylms()。 //獲取按鍵情況 P1=0xff。 } //描述:定時(shí)器初始化子程序 void INIT_TMR1(void) { TMOD=0x11。 //顯示 xxxx 秒形式 P0=temp。 //10ms disp[0]=ms%10。而 且,通過(guò)這次設(shè)計(jì),我懂得了學(xué)習(xí)的重要性,學(xué)會(huì)了堅(jiān)持和努力,這將為以后的學(xué)習(xí)做出了最好的榜樣!同時(shí),該設(shè)計(jì)也有不足之處,缺少了答題計(jì)分等功能。在這次設(shè)計(jì)中遇到了很多實(shí)際性的問(wèn)題,在實(shí)際設(shè)計(jì)中才發(fā)現(xiàn),書(shū)本上理論性的東西與在實(shí)際運(yùn)用中的還是有一定的出入的,所以有些問(wèn)題不但要深入地理解, 而且要不斷地更正以前的錯(cuò)誤思維。設(shè)計(jì)時(shí),首先通過(guò)在線(xiàn)編程,然后具體焊接硬件作品、仿真,完全實(shí)現(xiàn)了設(shè)計(jì)功能。具體步驟如下: (1)先排除硬件電路故障,包括設(shè)計(jì)性錯(cuò)誤和工藝性故障,一般原則是先靜態(tài)后動(dòng)態(tài)。 圖 中斷程序流程圖 是 否 否 是 開(kāi)始 定時(shí)器初始化 開(kāi)啟定時(shí)器 按鍵是否按下 按鍵是否松開(kāi) 停止計(jì)時(shí),關(guān)閉定時(shí)器 返回 沈陽(yáng)工學(xué)院學(xué)士報(bào)告 10 3 系統(tǒng)測(cè)試 按照設(shè)計(jì)程序的分析, LED 數(shù)碼管的動(dòng)態(tài)掃描的頻率是 1000HZ,在實(shí)際使用時(shí)完全沒(méi)有閃爍。正常情況下系統(tǒng)運(yùn)行主程序一直處于空閑等待狀態(tài),知道測(cè)試者按下按鍵后, LED 測(cè)試燈立即點(diǎn)亮。在測(cè)試者按下按鍵后, LED 測(cè)試燈立即點(diǎn)亮,在燈亮一個(gè)隨機(jī)時(shí)間后就通過(guò)單片機(jī)控制燈滅,這時(shí)單片機(jī)定時(shí)器就開(kāi)始計(jì)時(shí),定時(shí)器初始值為 Time1;在測(cè)試者看到 LED 燈滅時(shí)就釋放按鍵,此時(shí)定時(shí)器的值為 Time2,通過(guò)計(jì)算燈滅與測(cè)試者放開(kāi)按鍵的時(shí)間差,得出測(cè)試者的反應(yīng)速度。數(shù)碼管的內(nèi)部示意圖如圖 所示。 沈陽(yáng)工學(xué)院學(xué)士報(bào)告 4 各個(gè)數(shù)碼管的段碼都是 P0 端口的輸出,即各個(gè)數(shù)碼管輸入的段碼都是 一樣的,為了使其分別顯示不同的數(shù)字,可采用動(dòng)態(tài)掃描的方式,即先只讓最低位顯示 0,經(jīng)過(guò)一段延時(shí),再只讓次低位顯示 1,以此類(lèi)推。動(dòng)態(tài)顯示雖然在任一時(shí)刻只有一位數(shù)碼管被點(diǎn)亮,但是由于人眼具有的視覺(jué)殘留效應(yīng),看起來(lái)與全部數(shù)碼管持續(xù)點(diǎn)亮的效果完全一樣。 在使用中,為了給發(fā)光二極管加驅(qū)動(dòng)電壓,他們應(yīng)有一個(gè)公共的引腳,公共的引腳有如下兩種鏈接方法:一、共陰極接法。 8 位微控制器 8K 字節(jié)在系統(tǒng)可編程 Flash AT89S52。 AT89S52 是一種低功耗、高性能 CMOS8 位微控制器,具有 8K 在系統(tǒng)可編程 Flash 存儲(chǔ)器。 Digital tube 目 錄 1 硬件部分設(shè)計(jì) ........................................................... 1 ........................................ 錯(cuò)誤 !未定義書(shū)簽。 關(guān)鍵詞: 單片機(jī);反應(yīng)速度; AT89S52 ; LED; 數(shù)碼管 Abstract This article is based on single chip microputer human reaction speed tests described, through the single chip microputer test response speed. AT89S52 MCU as the core in the design of the human body reaction velocity tester, mainly by controlling the state of the test lamp, in the state of the test button to indirect calculation of human body reaction speed. System normal operation of the main program has been idle waiting state, know the tester after press the button, the LED test lamp light up immediately. AT89S52 single chip microputer in LED to test the lights at the same time began to calculate a random time, at the end of a random time, AT89S52 single chip microputer test the LED lights, and start timing lights and testers release button lag, this timer is used to record the subject39。 沈陽(yáng)工學(xué)院 畢業(yè)設(shè)計(jì) 題 目: 基于 AT89S52 單片機(jī)人體反應(yīng)速度測(cè)試儀 院 系: 信息與控制學(xué)院 專(zhuān) 業(yè): 通信工程 班級(jí)學(xué)號(hào): 學(xué)生姓名: 指導(dǎo)教師: 成 績(jī): 2022 年 06 月 25 日 摘 要 本文是基于單片機(jī)人體反應(yīng)速度測(cè)試描述,通過(guò)單片機(jī)測(cè)試人的反應(yīng)速度。s reaction time, and in milliseconds as the unit of time in the four digital tube display. If the LED test before the lights went out early release test button, 9999 as the error message is displayed. Design USES AT89S52 single chip microputer, its to high performance low price advantage to bee one of the world scope the most widely used microcontroller。 ........................................................ 3 .................................................... 4 .................................................... 4 .................................................... 6 2 軟件部分設(shè)計(jì) ........................................................... 7 開(kāi)發(fā)環(huán)境 ............................................................ 8 主體程序設(shè)計(jì) ........................................................ 8 ...................................... 錯(cuò)誤 !未定義書(shū)簽。使用 Atmel 公司高密度非易失性存儲(chǔ)器技術(shù)制造,與 工業(yè) 80C51 產(chǎn)品指令和引腳完全兼容。 與 MCS51 單片機(jī)產(chǎn)品兼容、 8K 字節(jié)在系統(tǒng)可編程 Flash 存儲(chǔ)器、 1000 次擦寫(xiě)周期、全靜態(tài)操作: 0Hz~ 33Hz 、 三級(jí)加密程序存儲(chǔ)器 、 32 個(gè)可編程 I/O 口線(xiàn) 、三個(gè) 16位定時(shí)器 /計(jì)數(shù)器八個(gè)中斷源、全雙工 UART 串行通道、低功耗空閑和掉電模式、掉電后中斷可喚醒、看門(mén)狗定時(shí) 器、雙數(shù)據(jù)指針、掉電標(biāo)識(shí)符。把發(fā)光二極管的陰極連接在一起構(gòu)成陰極公共引腳,使用時(shí)公共引腳接地,這樣陽(yáng)極引腳上加高電平的發(fā)光二極管就導(dǎo)通點(diǎn)亮,而加低電平的則不亮。 LED 顯示器的動(dòng)態(tài)顯示需要為各位提供段碼以及相應(yīng)的位控制,此即通常所說(shuō)的段控和位控。由于視覺(jué)暫留,只要延時(shí)時(shí)間足夠短,就能夠使得數(shù)碼的顯示看起來(lái)非常穩(wěn)定清楚。 圖 數(shù)碼管的內(nèi)部示意圖 硬件模塊設(shè)計(jì) 1. 單片機(jī)系統(tǒng)電路設(shè)計(jì) 單片機(jī)系統(tǒng)的設(shè)計(jì)主要包括單片機(jī)的電源設(shè)計(jì)、單片機(jī)時(shí)鐘電路設(shè)計(jì)、單片機(jī)復(fù)位 沈陽(yáng)工學(xué)院學(xué)士報(bào)告 5 電路設(shè)計(jì)等。具體計(jì)算公式如式( ) V 測(cè)試 =Time2Time1 ( ) 式中 V 測(cè)試 為反應(yīng)速度。AT89S52 單片機(jī)在 LED 測(cè)試燈亮的同時(shí)開(kāi)始計(jì)算一個(gè)隨機(jī)時(shí)間,在一段隨機(jī)時(shí)間結(jié)束后, AT89S52 單片機(jī)把 LED 測(cè)試燈熄滅,并開(kāi)始計(jì)時(shí)燈滅與測(cè)試者放開(kāi)按鍵的時(shí)間差,此計(jì) 時(shí)時(shí)間用于紀(jì)錄被測(cè)試者的反應(yīng)時(shí)間,并以毫秒為時(shí)間單位在 4 位數(shù)碼管上顯示。在程序中,定時(shí)器 20ms 中斷一次,變量 sec100 自增,中斷 100 次時(shí),秒的顯示自增,用定時(shí)器來(lái)定時(shí),準(zhǔn)確。 (2)利用萬(wàn)用表或邏 輯測(cè)試儀器,檢查電路中的各器件以及引腳是否連接正確,是否有短路故障。本設(shè)計(jì)中,利用常規(guī)的數(shù)碼管掃描方法,通過(guò)硬件電路的具體應(yīng)用和系統(tǒng)的仿真研究得出,本設(shè)計(jì)不僅安裝簡(jiǎn)單、成本低,更重要的是工作性能穩(wěn)定,是一個(gè)實(shí)用、創(chuàng)新型的工程設(shè)計(jì)。對(duì)于單片機(jī)設(shè)計(jì), 其硬件電路是比較簡(jiǎn)單的,主要是解決程序設(shè)計(jì)中的問(wèn)題。我將會(huì)在以后的學(xué)習(xí)中繼續(xù)學(xué)習(xí)。 //1ms for(i=0。 } posi*=2。 TH1=0xfc。 //輸入 前先把 P1 口都加高電平 while(1) //主循環(huán)開(kāi)始 沈陽(yáng)工學(xué)院學(xué)士報(bào)告 17 { word mstime=0,j。 k=bot()。 TF1=0。 P2=0xff。s bounce. Inside the covering or casing, a rubber bladder holds air. The ball must be inflated to a pressure sufficient to make it rebound to a height (measured to the top of the ball) of 4954 in ( m) when it is dropped on a solid wooden floor from a starting height of 6 ft ( m