【正文】
*39。) //檢測是否有運算符按下 { sign++。 if(j==0) //輸入第一位數(shù)時 b=num。 } return num。 while(temp!=0x0f) { delay(5)。 break。 case 0x07: num=7。 // } return num。 while(temp!=0x0f) //檢測是否有按鍵按下 { delay(5)。 /*顯示開及光標設(shè)置 */ } /* 清屏函數(shù) */ void LCD_Clear(void) { write_(0x01)。 E=0。 0x80)。}。,39。 uchar code asc_code[]={39。 致 謝 畢業(yè)設(shè)計就要結(jié)束了,在這一段時間里,我感到自己的收獲是非常大的,使我在專業(yè)技能、動手能力多方面都有了很大的提高。第三:相關(guān)知識掌握的不夠全面,缺少系統(tǒng)設(shè)計的經(jīng)驗。列掃描信號進行讀入行的信號判斷該列是否有列的輸出 —— 是則進行按照行列計算鍵盤的值,查表取得鍵碼并返回 —— 若否則進行再次掃描。這種行列式鍵盤結(jié)構(gòu)能有效地提高單片機系統(tǒng)中 I/O 口的利用率。利用 RAM 存放計算器系統(tǒng)存儲的數(shù)據(jù),從而可以根據(jù)需要隨時的讀入和寫出。計算器以 FPGA為核心控制器,系統(tǒng)由分頻模塊、運算模塊和譯碼顯示模塊四個模塊構(gòu)成。 Abstract The modern era, is a new technology emerge in endlessly era. In the electronic field, especially automation intelligent control field, the traditional division ponents or digital logic circuit consists of the control system is unprecedented speed is single chip microputer intelligent control system is replaced. SCM has small, strong function, the cost is low, the wide application advantages, such as, say, intelligent control and automatic control is the core of the single chip microputer. At present, a study and application of the climax of the single chip microputer is factory, schools and enterprises and institutions rise on a large scale. The past used to traditional electronic fields of engineers, technicians are faced with new challenges, such as not in a relatively short period of time to learn a singlechip microputer, certainly will will be thrown up by age, only brave to face reality, challenge ourselves, strengthen learning, for in a relatively short time will of single chip microputer mastery, to keep up with the pace of The Times. It brings convenience is not negative, it on a chip integrated within the functions of puter parts, constitute a kind of single chip microputer. Since the 1980 s, the international on MCU development rapidly, its product of dazzling, SCM unceasingly thorough, new technology are endless. The 20 th century, electronic technology has experienced rapid growth in its promotion, modern electronic product almost permeated every area of society a powerful impetus to the development of the social productive forces and the enhancement of social informatization, and at the same time, make modern electronic products to further improve the performance, product update rhythm also more and more quickly. This design is by microputer simulation calculator, it can not only realize the data add, subtract, multiply and divide operation, and still can make the data and results in digital tube displayed, will be able to realize the 0256 digital arithmetic. This design is AT89C51 single chip microputer to control with, of all the anode digital display, software part is written by the C language. Design task Using a keyboard and digital pipe design a simple mathematical calculator, can plete simple as add, subtract, multiply, divide arithmetic, and the operation result in digital tube will be displayed. 第一章 緒論 計算器 ( Calculator) 是微型電子計算機的一種特殊類型 。過去習慣于傳統(tǒng)電子領(lǐng)域的工程師、技術(shù)員正面臨著全新的挑戰(zhàn),如不能在較短時間內(nèi)學會單片機,勢必會被時代所遺棄,只有勇敢地面對現(xiàn)實,挑戰(zhàn)自我,加強學習,爭取在較短的時間內(nèi)將單片機技術(shù)融會貫通,才能跟上時代的步伐?,F(xiàn)在不在單一的在某一方面而是涉及到生活的方方面面 .計算器為人們?nèi)粘I钪惺∪チ舜罅康臅r間和精力,成為現(xiàn)代社會最普遍、最實用的計算工具,作為學習電子行業(yè)的我們,就更應(yīng)該更貼近生活,開發(fā)制作一些具有實用意義,又具有學習意義的小產(chǎn)品。顯示部分是一個 1601液晶顯示器。 系統(tǒng)模塊圖 : 單 片 機 顯示 模塊 輸入 模塊 第三章 硬件模塊介紹 單片機 80C51 單片機是在一塊芯片中集成了 CPU、 RAM、 ROM、定時器 /計數(shù)器和多功能 I/O等一臺計算機所需要的基本功能部件。如果按功能劃分,它由如下功能部件組成,即微處理器( CPU)、數(shù)據(jù)存儲器( RAM)、程序存儲器( ROM/EPROM)、并行 I/O 口、串行口、定時器 /計數(shù)器、中斷系統(tǒng)及特殊功能寄存器( SFR)。 第五章 硬軟件的調(diào)試 調(diào)試 一般 LCD 易出現(xiàn)的現(xiàn)象,我再做實驗的時候遇到過以下幾種情況: 狀態(tài) 1 上電之后, 1601 的第一行全黑,即 16 個 5x8 黑塊 產(chǎn)生原因:液晶根本就沒有進行初始化操作,需要檢查連線或 者程序 。一份耕耘,一份收獲。 sbit E=P1^6。439。E39。} /* 判忙函數(shù) */ bit LCD_Check_Busy(void) { P0= 0xFF。 } /* 寫數(shù)據(jù)函數(shù)