【正文】
化和輕便化,現(xiàn)在市面上出現(xiàn)的使用太陽能電池的計(jì)算器,使用ASIC設(shè)計(jì)的計(jì)算器,如使用純軟件實(shí)現(xiàn)的計(jì)算器等,未來的智能化計(jì)算器將是我們的發(fā)展方向,更希望成為應(yīng)用廣泛的計(jì)算工具。而這次我要做的是用51單片機(jī)設(shè)計(jì)一個(gè)簡易計(jì)算器。這次設(shè)計(jì)的價(jià)值和核心就在于倡導(dǎo)自己把所學(xué)知識(shí)運(yùn)用到現(xiàn)實(shí)生活,為現(xiàn)實(shí)生活服務(wù),把自己的知識(shí)轉(zhuǎn)化為實(shí)物哪怕是很簡單的物件,很簡單的功能,但真真切切的讓自己感受到創(chuàng)造的快樂,為自己今后的工作做好鋪墊,往后通過更多的學(xué)習(xí),更多的嘗試,把知識(shí)的作用真正發(fā)揮出來,改變大家的生活。三、 可行性分析51單片機(jī)可以進(jìn)行加減乘除等運(yùn)算,并且可以與鍵盤和LCD1602液晶顯示器連接,以供輸入數(shù)據(jù)以及將計(jì)算結(jié)果直觀的顯示到LCD1602液晶顯示器上,這符合簡易計(jì)算器的基本特性,因此用51單片機(jī)與鍵盤和LCD1602液晶顯示器等配合來設(shè)計(jì)簡易計(jì)算器是可行的。四、 目標(biāo)任務(wù)分析本次設(shè)計(jì)的簡易計(jì)算器的基本性能如下:1) 能夠進(jìn)行4位整數(shù)的加減乘除運(yùn)算(除法的結(jié)果中可以有小數(shù))。2) 能夠?qū)⒂?jì)算結(jié)果輸出到LCD1602液晶顯示屏中以便于觀察。3) 能夠?qū)崿F(xiàn)清除數(shù)據(jù)的功能。4) 能夠進(jìn)行錯(cuò)誤提示(比如當(dāng)輸入數(shù)據(jù)除數(shù)為0時(shí)會(huì)在LCD1602上顯示error)。本設(shè)計(jì)需要利用Proteus軟件實(shí)現(xiàn)電路的仿真,完成簡易計(jì)算器的仿真實(shí)現(xiàn),測(cè)試其是否能夠完成各種功能然后用硬件電路做出實(shí)物。采取的主要技術(shù)路線或方法本簡易計(jì)算器的設(shè)計(jì)主要有以下模塊:1. 鍵盤掃描識(shí)別模塊l 計(jì)算器輸入數(shù)字以及其他功能按鍵要用到很多按鍵,假如采用獨(dú)立按鍵的方式,編程當(dāng)然會(huì)很簡單,但是問題是鍵盤會(huì)占用大量的I/O 口資源,所以這里不采用這種方式,而采用矩陣鍵盤的方案。矩陣鍵盤使用四條I/O 線作為行線,四條I/O 線作為列線,在行線和列線的每一個(gè)交叉點(diǎn)上設(shè)置一個(gè)按鍵。這樣鍵盤上按鍵的個(gè)數(shù)就為44共16個(gè)。 :一般有16個(gè)鍵組成,在單片機(jī)中恰好可用一個(gè)P口實(shí)現(xiàn)16個(gè)按鍵功能。 鍵盤布局圖l 矩陣式鍵盤的按鍵識(shí)別方法有掃描法和線反轉(zhuǎn)法兩種,由于線反轉(zhuǎn)法更加簡單實(shí)用所以這里采用線反轉(zhuǎn)法來識(shí)別按鍵。l 單片機(jī)在忙于各種工作任務(wù)時(shí),如何兼顧鍵盤的輸入,取決于鍵盤的工作方式。而鍵盤的工作方式有三種:編程掃描,定時(shí)掃描和中斷掃描,由于在這個(gè)設(shè)計(jì)中使用編程掃描比較方便,所以這里采用編程掃描的方式。2. LCD1602液晶顯示器模塊:: LCD1602液晶顯示器對(duì)LCD1602的編程分為初始化部分和數(shù)據(jù)顯示部分,具體編寫時(shí)處理,這里不再敘述。3. 計(jì)算模塊主要由編程實(shí)現(xiàn),不牽扯硬件電路,這里不加敘述。:4*4矩陣鍵盤(輸入模塊)LCD1602液晶顯示器(顯示模塊)AT89C51單片機(jī)運(yùn)算模塊(編程實(shí)現(xiàn)) 簡易計(jì)算器模塊設(shè)計(jì)圖時(shí)間安排3—5周:查找資料6—9周:方案的設(shè)計(jì)(主要是程序的編寫)以及proteus仿真調(diào)試10周11周 :購買元器件制作硬件電路并調(diào)試 12周:根據(jù)自己前期的設(shè)計(jì)制作和調(diào)試撰寫論文13周:準(zhǔn)備畢業(yè)答辯指導(dǎo)教師意見簽 名:年 月 日備注無附錄五:外文原文與外文譯文singlechip temperature systemA microcontroller (or MCU) is a puteronachip. It is a type of microprocessor emphasizing selfsufficiency and costeffectiveness, in contrast to a generalpurpose microprocessor (the kind used in a PC). The majority of puter systems in use today are embedded in other machinery, such as telephones, clocks, appliances, vehicles, and infrastructure. An embedded system usually has minimal requirements for memory and program length and may require simple but unusual input/output systems. For example, most embedded systems lack keyboards, screens, disks, printers, or other recognizable I/O devices of a personal puter. They may control electric motors, relays or voltages, and read switches, variable resistors or other electronic devices. Often, the only I/O device readable by a human is a single lightemitting diode, and severe cost or power constraints can even eliminate that. In contrast to generalpurpose CPUs, microcontrollers do not have an address bus or a data bus, because they integrate all the RAM and nonvolatile memory on the same chip as the CPU. Because they need fewer pins, the chip can be placed in a much smaller, cheaper package. Integrating the memory and other peripherals on a single chip and testing them as a unit increases the cost of that chip, but often results in decreased net cost of the embedded system as a whole. (Even if the cost of a CPU that has integrated peripherals is slightly more than the cost of a CPU + external peripherals, having fewer chips typically allows a smaller and cheaper circuit board, and reduces the labor required to assemble and test the circuit board). This trend leads to design. A microcontroller is a single integrated circuit, monly with the following features: central processing unit ranging from small and simple 4bit processors to sophisticated 32 or 64bit processors input/output interfaces such as serial ports (UARTs) other serial munications interfaces like I178。C, Serial Peripheral Interface and Controller Area Network for system interconnect peripherals such as timers and watchdog RAM for data storage ROM, EPROM, EEPROM or Flash memory for program storage clock generator often an oscillator for a quartz timing crystal, resonator or RC circuit many include analogtodigital converters .This integration drastically reduces the number of chips and the amount of wiring and PCB space that would be needed to produce equivalent systems using separate chips and have proved to be highly popular in embedded systems since their introduction in the 1970s. Some microcontrollers can afford to use a Harvard architecture: separate memory buses for instructions and data, allowing accesses to take place concurrently. The decision of which peripheral to integrate is often difficult. The Microcontroller vendors often trade operating frequencies and system design flexibility against timetomarket requirements from their customers and overall lower system cost. Manufacturers have to balance the need to minimize the chip size against additional functionality. Microcontroller architectures are available from many different vendors in so many varieties that each instruction set architecture could rightly belong to a category of their own. Chief among these are the 8051, Z80 and ARM derivatives.[citation needed] A microcontroller (also MCU or 181。C) is a functional puter systemonachip. It contains a processor core, memory, and programmable input/output peripherals.Microcontrollers include an integrated CPU, memory (a small amount of RAM, program memory, or both) and peripherals capable of input and output. It emphasizes high integration, in contrast to a microprocessor which only contains a CPU (the kind used in a PC). In addition to the usual arithmetic and logic elements of a general purpose microprocessor, the microcontroller integrates additional elements such as readwrite memory for data storage, readonly memory for program storage, Flash memory for permanent data storage, peripherals, and input/output interfaces. At clock speeds of as little as 32KHz, microcontrollers often operate at very low speed pared to microprocessors, but this is adequate for typical applications. They consume relatively little power (milliwatts or even microwatts), and will generally have the ability to retain functionality while waiting for an event such as a button press or interrupt. Power consumption while sleeping (CPU clock and peripherals disabled) may be just nanowatts, making them id