【正文】
A工具軟件的仿真功能,此外還具備仿真單片機(jī)及外圍部件。例如本次實(shí)驗(yàn)的連接方式。通過單片機(jī)程序控制,對(duì)LED數(shù)碼管顯示器進(jìn)行段控和位控,這些就是為了實(shí)現(xiàn)動(dòng)態(tài)顯示。需知在復(fù)位有效期間,EA引腳輸出高電平。首先定時(shí)/計(jì)數(shù)器的工作首先被設(shè)置為計(jì)數(shù)器的計(jì)數(shù)寄存器清0后,置運(yùn)行控制位TR為1,啟動(dòng)對(duì)待測(cè)信號(hào)的計(jì)數(shù)。其中有關(guān)定時(shí)的控制位共有4位:F0和TF1——利用計(jì)數(shù)溢出標(biāo)志位當(dāng)計(jì)數(shù)器計(jì)數(shù)溢出(計(jì)滿)時(shí),該位置顯示為“1”;當(dāng)我們使用查詢方式來查詢時(shí),此位作狀態(tài)位供查詢,但在選用中斷方式的時(shí)候,此位作中斷標(biāo)志位,在轉(zhuǎn)向中斷服務(wù)程序時(shí)也應(yīng)該由硬件自動(dòng)清“0”。輸入1KHz有最高千分之四的誤差輸入25KHz有近萬分之三的誤差。 附錄include unsigned char code dispbit[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f}。 TR1=1。i6。 } P2=0xff。 timecount++。 x=x/10。 TH0=0。[4] 閻石.?dāng)?shù)字電子技術(shù)基礎(chǔ)(第五版)[M].高等教育出版社,2005。實(shí)際計(jì)數(shù)器的頻率可為100KHz,當(dāng)輸入時(shí)間脈沖的單位周期間隔為1μs。我們?cè)诨谫Y源共享原則上的中斷技術(shù),在計(jì)算機(jī)中得到了廣泛的應(yīng)用。其中的8個(gè)筆劃段a、b、c、d、e、f、g、dP對(duì)應(yīng)于一個(gè)字節(jié)(8位)的D0、DDDDDDD7。電容的作用還在于能夠容易起震并減少頻率的溫漂。C 語言這種語言是美國的Dennis Ritchie在1972年設(shè)計(jì)發(fā)明的。支持總線結(jié)構(gòu),讓用戶和讀者能夠明確分析線路結(jié)構(gòu)。要求能夠?qū)?HZ-100KHZ的信號(hào)頻率進(jìn)行準(zhǔn)確計(jì)數(shù)。就目前來說,微處理器芯片發(fā)展迅速,不同領(lǐng)域的應(yīng)用芯片在其中發(fā)展很快。頻率計(jì)數(shù)器能對(duì)輸出頻率和一些關(guān)鍵的內(nèi)部頻率點(diǎn)(如本振)進(jìn)行測(cè)量,是否滿足技術(shù)指標(biāo)。關(guān)鍵詞:頻率計(jì)數(shù)器; PROTEUS仿真; 單片機(jī); 1~100kHz ABSTRACT Traditional frequency counter by binational circuits and sequential circuits, etc. A lot of hardware circuit. We know that this development laborious and costly, so based on the frequency counter as the research object, the use of Proteus powerful microputer processor simulation, bining with Keil piler, presents a simple and easy to operate the frequency counter design and plete the simulation test. In this paper, we design a microcontroller AT89C51 as the core of the digital frequency counter, the hardware part mainly by shaping circuit, single chip microputer minimum system and display units, the software design is posed of some functional modules, such as initialization module, crystal vibration module, data display module as well as the reset module and so on. This method is good enough to make up the flaws of the traditional development mode. The frequency counter by the LCD display and a single chip microputer AT89C51, and clock signal generator, the measured frequency range between 1 HZ and 100 KHZ. Key words:Frequency counter; PROTEUS simulation and singlechip microputer; 1~ 100KHZ 目錄摘 要 2ABSTRACT 3目錄 4第一章 引言 5 5 5 6 7第二章 工具介紹 8 PROTEUS仿真軟件 8 8 功能特點(diǎn) 8 proteus的使用 9 keil uvision4軟件 10 .1 keil uvision4軟件的介紹 10 keil uvision4軟件的使用 10 關(guān)于C語言 11第三章 硬件和軟件設(shè)計(jì) 12 12 AT89C51單片機(jī) 12 AT89C51的晶振接法 13 14 15 16 16 16 17 18第四章 調(diào)試測(cè)試 19 19 19 21結(jié)束語 22參考文獻(xiàn) 24附錄 25第一章 引言我們經(jīng)常需要測(cè)量頻率、時(shí)間間隔、相位和對(duì)事件計(jì)數(shù),精確的測(cè)量離不開頻率計(jì)數(shù)器或它的同類產(chǎn)品,如電子計(jì)數(shù)器和時(shí)間間隔分析儀。在發(fā)明計(jì)數(shù)器之前,頻率的測(cè)量都是用頻率計(jì)(一種