1. 急求關於AT89C51單片機的中英對照問下翻譯,5000字左右
整個PEROM陣列和三個鎖定位的電擦除可通過正確的控制信號組合,並保持ALE管腳處於低電平10ms 來完成。在晶元擦操作中,代碼陣列全被寫「1」且在任何非空存儲位元組被重復編程以前,該操作必須被執行。
此外,AT89C51設有穩態邏輯,可以在低到零頻率的條件下靜態邏輯,支持兩種軟體可選的掉電模式。在閑置模式下,CPU停止工作。但RAM,定時器,計數器,串口和中斷系統仍在工作。在掉電模式下,保存RAM的內容並且凍結振盪器,禁止所用其他晶元功能,直到下一個硬體復位為止。
串口通訊
單片機的結構和特殊寄存器,這是你編寫軟體的關鍵。至於串口通信需要用到那些特殊功能寄存器呢,它們是SCON,TCON,TMOD,SCON等,各代表什麼含義呢?
SBUF 數據緩沖寄存器這是一個可以直接定址的串列口專用寄存器。有朋友這樣問起過「為何在串列口收發中,都只是使用到同一個寄存器SBUF?而不是收發各用一個寄存器。」實際上SBUF 包含了兩個獨立的寄存器,一個是發送寄存,另一個是接收寄存器,但它們都共同使用同一個定址地址-99H。CPU 在讀SBUF 時會指到接收寄存器,在寫時會指到發送寄存器,而且接收寄存器是雙緩沖寄存器,這樣可以避免接收中斷沒有及時的被響應,數據沒有被取走,下一幀數據已到來,而造成的數據重疊問題。發送器則不需要用到雙緩沖,一般情況下我們在寫發送程序時也不必用到發送中斷去外理發送數據。操作SBUF寄存器的方法則很簡單,只要把這個99H 地址用關鍵字sfr定義為一個變數就可以對其進行讀寫操作了,如sfr SBUF = 0x99;當然你也可以用其它的名稱。通常在標準的reg51.h 或at89x51.h 等頭文件中已對其做了定義,只要用#include 引用就可以了。
SCON 串列口控制寄存器通常在晶元或設備中為了監視或控制介面狀態,都會引用到介面控制寄存器。SCON 就是51 晶元的串列口控制寄存器。它的定址地址是98H,是一個可以位定址的寄存器,作用就是監視和控制51 晶元串列口的工作狀態。51 晶元的串口可以工作在幾個不同的工作模式下,其工作模式的設置就是使用SCON 寄存器。它的各個位的具體定義如下:
SM0 SM1 SM2 REN TB8 RB8 TI RI
SM0、SM1 為串列口工作模式設置位,這樣兩位可以對應進行四種模式的設置。串列口工作模式設置。
SM0 SM1 模式 功能 波特率
0 0 0 同步移位寄存器 fosc/12
0 1 1 8位UART 可變
1 0 2 9位UART fosc/32 或fosc/64
1 1 3 9位UART 可變
在這里只說明最常用的模式1,其它的模式也就一一略過,有興趣的朋友可以找相關的硬體資料查看。表中的fosc 代表振盪器的頻率,也就是晶振的頻率。UART 為(Universal Asynchronous Receiver)的英文縮寫。
SM2 在模式2、模式3 中為多處理機通信使能位。在模式0 中要求該位為0。
REM 為允許接收位,REM 置1 時串口允許接收,置0 時禁止接收。REM 是由軟體置位或清零。如果在一個電路中接收和發送引腳P3.0,P3.1 都和上位機相連,在軟體上有串口中斷處理程序,當要求在處理某個子程序時不允許串口被上位機來的控制字元產生中斷,那麼可以在這個子程序的開始處加入REM=0 來禁止接收,在子程序結束處加入REM=1 再次打開串口接收。大家也可以用上面的實際源碼加入REM=0 來進行實驗。
TB8 發送數據位8,在模式2 和3 是要發送的第9 位。該位可以用軟體根據需要置位或清除,通常這位在通信協議中做奇偶位,在多處理機通信中這一位則用於表示是地址幀還是數據幀。
RB8 接收數據位8,在模式2 和3 是已接收數據的第9 位。該位可能是奇偶位,地址/數據標識位。在模式0 中,RB8 為保留位沒有被使用。在模式1 中,當SM2=0,RB8 是已接收數據的停止位。
TI 發送中斷標識位。在模式0,發送完第8 位數據時,由硬體置位。其它模式中則是在發送停止位之初,由硬體置位。TI 置位後,申請中斷,CPU 響應中斷後,發送下一幀數據。在任何模式下,TI 都必須由軟體來清除,也就是說在數據寫入到SBUF 後,硬體發送數據,中斷響應(如中斷打開),這時TI=1,表明發送已完成,TI 不會由硬體清除,所以這時必須用軟體對其清零。
RI 接收中斷標識位。在模式0,接收第8 位結束時,由硬體置位。其它模式中則是在接收停止位的半中間,由硬體置位。RI=1,申請中斷,要求CPU 取走數據。但在模式1 中,SM2=1時,當未收到有效的停止位,則不會對RI 置位。同樣RI 也必須要靠軟體清除。常用的串口模式1 是傳輸10 個位的,1 位起始位為0,8 位數據位,低位在先,1 位停止位為1。它的波特率是可變的,其速率是取決於定時器1 或定時器2 的定時值(溢出速率)。AT89C51 和AT89C2051 等51 系列晶元只有兩個定時器,定時器0 和定時器1,而定時器2是89C52 系列晶元才有的。
波特率在使用串口做通訊時,一個很重要的參數就是波特率,只有上下位機的波特率一樣時才可以進行正常通訊。波特率是指串列埠每秒內可以傳輸的波特位數。有一些初學的朋友認為波特率是指每秒傳輸的位元組數,如標准9600 會被誤認為每秒種可以傳送9600個位元組,而實際上它是指每秒可以傳送9600 個二進位,而一個位元組要8 個二進位,如用串口模式1 來傳輸那麼加上起始位和停止位,每個數據位元組就要佔用10 個二進位,9600 波特率用模式1 傳輸時,每秒傳輸的位元組數是9600÷10=960 位元組。51 晶元的串口工作模式0的波特率是固定的,為fosc/12,以一個12M 的晶振來計算,那麼它的波特率可以達到1M。模式2 的波特率是固定在fosc/64 或fosc/32,具體用那一種就取決於PCON 寄存器中的SMOD位,如SMOD 為0,波特率為focs/64,SMOD 為1,波特率為focs/32。模式1 和模式3 的波特率是可變的,取決於定時器1 或2(52 晶元)的溢出速率。那麼我們怎麼去計算這兩個模
式的波特率設置時相關的寄存器的值呢?可以用以下的公式去計算。
波特率=(2SMOD÷32)×定時器1 溢出速率
上式中如設置了PCON 寄存器中的SMOD 位為1 時就可以把波特率提升2 倍。通常會使用定時器1 工作在定時器工作模式2 下,這時定時值中的TL1 做為計數,TH1 做為自動重裝值 ,這個定時模式下,定時器溢出後,TH1 的值會自動裝載到TL1,再次開始計數,這樣可以不用軟體去干預,使得定時更准確。在這個定時模式2 下定時器1 溢出速率的計算公式如下:
溢出速率=(計數速率)/(256-TH1)
上式中的「計數速率」與所使用的晶體振盪器頻率有關,在51 晶元中定時器啟動後會在每一個機器周期使定時寄存器TH 的值增加一,一個機器周期等於十二個振盪周期,所以可以得知51 晶元的計數速率為晶體振盪器頻率的1/12,一個12M 的晶振用在51 晶元上,那麼51 的計數速率就為1M。通常用11.0592M 晶體是為了得到標準的無誤差的波特率,那麼為何呢?計算一下就知道了。如我們要得到9600 的波特率,晶振為11.0592M 和12M,定時器1 為模式2,SMOD 設為1,分別看看那所要求的TH1 為何值。代入公式:
11.0592M
9600=(2÷32)×((11.0592M/12)/(256-TH1))
TH1=250
12M
9600=(2÷32)×((12M/12)/(256-TH1))
TH1≈249.49
上面的計算可以看出使用12M 晶體的時候計算出來的TH1 不為整數,而TH1 的值只能取整數,這樣它就會有一定的誤差存在不能產生精確的9600 波特率。當然一定的誤差是可以在使用中被接受的,就算使用11.0592M 的晶體振盪器也會因晶體本身所存在的誤差使波特率產生誤差,但晶體本身的誤差對波特率的影響是十分之小的,可以忽略不計。
The whole PEROM array with three electricities which target wipe in addition to combining through a correct control signal, and keep an ALE pin to be placed in low to give or get an electric shock an even 10 mses to complete.Wipe in the chip in operation, the all of code array are write"1" and at any not- empty saving word stanza drive repeated plait distance before, that operation had to be carry out.
In addition, the AT89 C51 establishes steady state logic, can at low get to the condition of zero frequencies under the static state logic, support two kinds of softwares can choose of drop an electricity mode.Under the idle mode, the CPU stop work.But RAM, in fixed time machine, count a machine, string and break off system still at the work.While drop the electricity mode, contents and congelation which keep RAM flap to concuss a machine, forbid other chip functions use, until the next hardware reset.
String communication
Single slice the structure of the machine with special deposit a machine, this be the key that you write software.As for does the string correspondence need to use to those special functions to deposit a machine, they are a SCON, TCON, TMOD, SCON etc., each representative what meaning?
SBUF data buffer's depositting a machine this is a string that can directly look for an address line's appropriation to deposit a machine.Had a friend to once start to ask so"why in the string the line receive and dispatch, all just use to same to deposit machine SBUF?But not is receive and dispatch each deposit a machine with 1."Actually the SBUF included deposit of two independence machine, 1 sends out to deposit, the another receives to deposit a machine, but they all together use same to look for an address address - 99 Hs.The CPU will point to receive to deposit a machine while read SBUF, while write will point to send out to deposit a machine, and receive to deposit a machine is a pair of buffer to deposit a machine, so can avoid receive to break off have no in time of is respond to, the data took away, next data already arrival, but result in of data layer after layer problem.Send out the machine then doesn't need to use a double a buffer and under the general circumstance we need not use to send out to break off, either to send a data to the outside haircut while writing to send out procere.Operate then the method that the SBUF deposits a machine is easy, as long as use the key word sfr to this 99 H address the definition change to measure for 1 as to it's can carry on to read and write to operate, like sfr SBUF=0 xes 99;Certainly you can also use other names.As to it's usually have already done definition in head documents such as the reg 51. hs or the at 89 xes 51. h etc. of standard, as long as use#include quote from all right.
The SCON string line control deposits a machine usually to connect a people's appearance for the sake of the surveillance or the control in the chip or the equipments, will quote from to connect a people's control to deposit a machine.SCON be the string of 51 chips line the control deposit a machine.Its looking for an address address is a 98 Hs, is a can look for an address by of deposit a machine, function be surveillance and control 51 in line of work appearance.The string of 51 chips can work under a few different work modes and the constitution of its work mode is to use SCON to deposit a machine.It of the concrete definition of each as follows:
SM0 SM1 SM2 REN TB8 RB8 TI RI
The SM0, SM1 is the work mode of in a string of line constitution, so 2 can be to the constitution that should carry on four kinds of modes.String the line work mode establish.
The SM0 SM1 mode function wave especially rate
000 synchronously move to deposit the machine fosc/12
0 one one 8 UARTs are variable
One 029 UART fosc/32s or fosc/64
One one 39 UARTs are variable
At my mode with the most in common use elucidation 1, other modes also skip one by one and the friend who has interest can seek related hardware data to look into.The fosc representative in the form flaps frequency of concuss the machine, be also crystal flap of frequency.UART is(the Receiver of the Universal Asynchronous) of English abbreviation.
The SM2 is in the mode 2, the mode 3 for handle machine correspondence more to make an ability.Request that to 0 in the mode 0.
In order to allow to receive REM, the REM places 1:00 string to allow to receive and place to forbid to receive at 0:00.The REM is placed by the software or pure zero.If receive and send out to lead the feet P3.0 in an electric circuit, the P3.1s all connect with each other with place of honor machine, there is a string of on the software breaking off processing procere, be request disallowing a string of while being handle some statures procere was come by the place of honor machine of control character list to proce interruption, so can join REM in the beginning of this statures procere=0 to forbid to receive, join REM at the sub- procere be over=1 again open a string of to receive.Everyone can also join REM with the actual source code of top=0 to start experiment.
The TB8 sends out a data 8, in the mode 2 with 3 want to send out of the 9th.That can use software according to need to place or clearance, usually this is located on to do in the correspondence agreement strange accidentally, this is then used for mean in handle machine correspondence more is the address still a data.
The RB8 receives a data 8, in the mode 2 with 3 is the 9th which has already received a data.That may be strange accidentally, the address/data marking.In the mode 0, the RB8 wasn't use for the reservation.Be SM 2= in the mode 10, the RB8 is the stop which has already received a data.
The TI sends out to break off a marking.In the mode 0, finish send out the 8th data, is placed by the hardware.Then being send out the beginning of stop in other modes is placed by the hardware.After TI places, the application break off and the CPU after respond to the interruption sends out next data.Under any mode, the TIs all have to be come to clearance by the software, be also say after the data write in to the SBUF, the hardware sends out a data, the interruption respond to(if the interruption open), at this time TI=1, express to send out to have already complete, TI can't from hardware clearance, so have to use software at this time as to it's pure zero.
The RI receives to break off a marking.In the mode 0, receive the 8th be over, is placed by the hardware.Then being receive the midway of stop in other modes is placed by the hardware.RI=1, the application break off and request CPU to take away a data.But in the mode 1, SM 2=1:00, be receive valid of stop, then will not place to the RI.The same RI has to also want to depend software clearance.In common use string mode 1 deliver 10, a start is 0,8 data, low Be located on first, a stop is 1.It of wave especially the rate be variable, its velocity is to be decided by in fixed time a machine 1 or in fixed time machine 2 of in fixed time be worth.(overflow velocity)51 series chips such as the AT89 C51 and the AT89 C2051 etc. only have 2 in fixed time a machine, in fixed time machine 0 with in fixed time machine 1, but in fixed time machine 2 is what the 89 C52 series chip just has.
Wave especially rate at usage string do communication, a very important parameter be wave especially rate, only up and down the wave of the machine especially the similar hour of rate just can carry on normal communication.Wave especially the rate is the wave that can deliver inside port in a string line each one number especially.The friend who has some beginners think wave especially the rate mean the word stanza that each one deliver number, is mistaken for each one to grow and can deliver 9600 word stanzas such as standard 9600 meetings, but actually it means each one can deliver 9600 binary systems, but a word stanza want 8 binary systems, if use a string of mode 1 to deliver to so plus a start and stop, the piece will take up 10 binary systems according to the word stanza each time, 9600 especially the rate use mode 1 deliver, each one deliver of word stanza number is 9600 ÷s 10= be 960 word stanzas.The string of 51 chips work mode 0 waves especially the rate be fixed, is a fosc/12, with a 12 Ms of crystal flap to compute, so it of wave especially the rate can attain 1 M.Mode 2 waves especially the rate be fixed in the fosc/64 or the fosc/32 and concretely use that kind of be decided by PCON to deposit the SMOD in the machine, such as SMOD is 0, wave especially rate is focs/64, SMOD is 1, wave especially rate is focs/32.Mode 1 with mode 3 waves especially the rate be variable and be decided by in fixed time a machine is 1 or 2(52 chips) spillage velocities.So how do we go to compute these two molds
The wave of type especially the rate establish relatedly deposit the value of machine?Can compute with the following formula.
Wave especially rate=(2 SMOD ÷ 32)× in fixed time machine 1 overflow velocity
Last type in if established PCON to deposit the SMOD in the machine as 1:00 can wave especially the rate promote 200%.Usually use in fixed time a machine one work at in fixed time the machine work mode be a 2 times, in fixed time be worth medium TL1 to be used as to count at this time, the TH1 be used as automatically rebind a value, this in fixed time under the mode, in fixed time machine overflow after, the value of TH1 will automatically load TL1, again start count, so can need not software interfere and make in fixed time more accurate.At this in fixed time mode 2 times in fixed time machine 1 overflow the calculation formula of velocity as follows:
Overflow velocity=(count velocity)/(256 - TH1s)
Last"count velocity" within type flap with the crystal use to concuss machine frequency relevant, in 51 chips in fixed time machine start the future reunion make the value of deposit the machine TH in fixed time increase in each machine period a, a machine period equals 12 to flap to concuss a period, so can know 51 count of chipses the velocity flaps to concuss machine frequency for the crystal of 1/12, a 12 Ms of crystal flap to use on 51 chips, so 51 of count velocity is 1 M.Usually using a 11.0592 M crystal is for getting standard without any error bad of wave especially rate, why so?The calculation knew all of a sudden.Such as we good arrive 9600 waves a rate especially, crystal flap for the 11.0592 Ms and the 12 Ms, in fixed time machine 1 is mode 2, the SMOD establishes to 1 and see respectively why the TH1 that that request be worth.The generation goes into formula:
11.0592M
9600=(2 ÷s 32) ×(11.0592 Ms/12)(/(256-TH1))
TH 1=250
12M
9600=(2 ÷s 32) ×(12 Ms/12)(/(256-TH1))
TH1 ≈ 249.49
Top of the calculation can see go abroad as ambassador come out with 12 M's time calculation of the crystal of the TH1 isn't an integral, but value of TH1 can take integral, so it would the existence certain error margin can't proce 9600 of precision rate especially.The certainly certain error margin can be accept in the usage, using the crystal with 11.0592 Ms to flap to concuss a machine on the whole will also make because of the error margin exist by crystal wave especially rate creation error margin, but the error margin of crystal to wave especially the influence of the rate be very of small, can neglect not to account.
2. 單片機英文文獻及翻譯,5000字左右
其實,還是算了,自己弄吧,這么多,沒有那麼多的好心人給你弄的,自己網上弄吧,太多了,5000多字,高考一個作文才1000多就要寫好久。給你推薦Google翻譯,還算可以,比大多數好用,比什麼狗屎金山詞霸好多了,至少大部分通順,然後自己修改下就可以了,
3. 單片機英文文獻及翻譯,5000字左右 郵箱[email protected]
Single-Chip Microcomputer
有的時候,也可以用SingleChip來代替
下面鏈接的第六章有講單片機Single Chip Microcmputer 第148頁開始
http://books.google.co.nz/books?id=AUtTx3TgO7IC&pg=PT41&lpg=PT41&dq=what+is+Single+Chip+Microcomputer&source=web&ots=QQqVentmyy&sig=ZPBVtVXwiQakAtCIXJqzRw_BobE&hl=en&sa=X&oi=book_result&resnum=8&ct=result#PPT41,M1
這是一段中漢對照的。
中文:
單片機是把主要計算機功能部件都集成在一塊晶元上的微型計算機。它是一種集計數和多中介面於一體的微控制器,被廣泛應用在智能產品和工業自動化上,而51單片機是個單片機中最為典型和最有代表性的一種。
本課題選擇89S51為核心控制元件,設計了一個日常生活中用到的電子音樂門鈴系統。當功能按鍵按下,音樂響起,發光二極體隨著音樂的節拍進行閃爍,LED顯示相應的定時器初值。音樂演奏過程中再次按下按鍵無效,只有當音樂段結束再次按下才有效。如果是電子音樂門鈴在響,按下復位按鍵就終止,顯示初始狀態。經過實踐證明,本系統運行穩定,具有一定的實用價值。
-------------
翻譯:
SCM is a major piece of computer components are integrated into the chip micro-computer. It is a multi-interface and counting on the micro-controller integration, and intelligence procts are widely used in instrial automation. and MCS-51 microcontroller is a typical and representative.
The topics chosen for the 89S51 control of the core components used in the design of a daily electronic music doorbell system. When the function button is pressed, the music sounded and the music beats with light emitting diodes for flickered. Initial corresponding LED timer. Musical process again pressed the button ineffective, and only when pressed again before the end of the music effectively. If the doorbell ring for electronic music, press the button on the rection and termination, showed initial state. Practice has proved that the system is stable and has some practical value.
本設計是以凌陽16位單片機為重心,介紹語音控制在機械手中的應用,實現微型舵機的運作,完成所指定的動作。其中通過凌陽16位單片機輸出的脈沖信號來准確的控制機械手的擺動角度,機械手的捏拿動作由電磁鐵完成,電磁鐵的通斷由凌陽16位單片機的I/O口控制,硬體和軟體都在具體的實驗中證明了其可行性
This design is take insults the positive 16 monolithic integrated circuits as a center of gravity, introced the pronunciation control in manipulator's application, the realization miniature servo operation, completes the movement which assigns. Through insults the pulse signal which the positive 16 monolithic integrated circuits outputs to come the accurate control manipulator to swing the angle, the manipulator pinches takes the movement to complete by the electro-magnet, the electro-magnet passes the legal reason for judgment to insult the positive 16 monolithic integrated circuits I/O control, the hardware and the software all have proven its feasibility in the concrete experiment
4. 求一個51單片機5000字左右的中英文翻譯 畢業設計用 謝謝
Design of the Temperature Control System Based on AT89S51
Huang Wentian, Li Jinping
College of Information, Beijing Union University, Beijing 100101, China
[email protected], [email protected]
ABSTRACT: The principle and functions of the temperature control system based on microcontroller AT89S51 are studied, and the temperature measurement unit consists of the 1-Wire bus digital temperature sensor DS18B20. The system can be expected to detect the preset temperature, display time and save monitoring data. An alarm will be given by system if the temperature exceeds the upper and lower limit value of the temperature which can be set discretionarily and then automatic control is achieved, thus the temperature is achieved monitoring intelligently within a certain range. Basing on principle of the system, it is easy to make a variety of other non-linear control systems so long as the software design is reasonably changed. The system has been proved to be accurate, reliable and satisfied through field practice.
KEYWORDS: AT89S51; microcontroller; DS18B20; temperature
中文譯文
基於單片機AT89S51設計的溫度控制系統
黃溫甜,李金平
信息學院,北京聯合大學,北京100101,中國
[email protected], [email protected]
摘要:原理和單片機AT89S51單片機溫度控制系統功能的基礎研究,溫度測量單位的1- Wire匯流排數字溫度感測器DS18B20組成。該系統可將檢測到設定溫度,顯示時間和保存監測數據。報警系統會給予如果溫度超過了可動任意設置,然後實現自動化控制,從而達到監控的溫度在一定范圍內智能溫度上限和下限值。在系統原則的基礎上,很容易使其他非非線性控制系統,以便在合理長改變了軟體設計等。該系統已被證明是准確,可靠,並通過野外實習至滿意。
關鍵詞:AT89S51單片機,微控制器,感測器DS18B20,溫度。
5. 急求一片基於單片機的電子鍾 或者萬年歷的英文文獻5000字左右的!!!! 急求!!
Design of the digital Perpetual Calendar based on
real-time clock chip
Abstract:This Electronic calendar uses the AT89S52 microcontroller as the core for the control. Time Circuit which is constituted by Dallas's DS1302 real-time clock chip achieved a time and date display, it increased functionality for the temperature display and the whole point timekeeping. This paper discusses the hardware circuit of the system, principle in detail,and gives the flow chart of the software design and the major source code. keywords:microcontroller; real-time clock; Temperature measurement
1 Introction
E-calendar-bedroom at home,schools,stations and more and more extensive use of plaza for people's lives,study,work great convenience. Electronics calendar for the past need to re-adjust after power-off time and date,and time is a big error. Designed the system using real-time clock chip (DS1302) as a timer parts,the chip comes with an internal crystal oscillator,so that effectively guarantee the accuracy of the time and hang own internal battery power makes the situation will continue to update the time information . This design uses AT89S52 as the main controller,in order to improve the practicality of the circuit add temperature measurement circuit,timekeeping and alarm functions.
2 System hardware design
Schematic circuit shown in Figure 2:
System architecture diagram
2.1 Power Supply Circuit
In order to rece circuit costs,the system power supply circuit by the transformer transformer,three-terminal integrated regulator (L7805> circuit 5V, has a simple,reliable, inexpensive and so on.
2.2 Host Controller
Host controller using ATMEL's latest MCU Procts AT89S52. Apart from the single-chip microcomputer has a MCS-51 series single-chip all the benefits of things,also has 8KB of internal in-system programmable FLASH memory,free and low-power brown-out mode, greatly recing the power circuit . In addition,also has a watchdog circuit,a reliable job for the circuit provides greater assurance.
2.3 digital tube display circuit
Show circuit with a high brightness,long life,low cost features such as the LED digital tube. Throughout the show circuit by the digital control and display LED drive circuit and decoding circuit. Because of the system to display the contents of more,a total of 16 digital tube, respectively,with eight shows year,month,day,four show time,show that 22 weeks,2 show the temperature. Controller in order to save resources,between the controller and displays add a decoding circuit 16 so that would have required the line of control into the circuit only 4 control lines,a great save system resources. The decoder by the decoder constitute both 3-8.
2.4 Real-time clock chip
This design uses the United States Dallas company DS1302, the chip can automatically generate century,year,month,day,hour,minute,second,such as time information. Century the use of internal registers with the software will be able to resolve the 'Millennium', the problem. The chip has its own internal battery-keng,external brown-out,the internal time information also be able to maintain for 10 years. Time for a single day record of 12 hours and there is a 24-hour mode. Time Table
Ways that also has two kinds of binary numbers,and the other with BCD code express. The chip with 128 bytes of internal RAM,one of 11 bytes used to store time information,4 bytes of memory chips used to control information,known as the control register,113-byte general-purpose RAM for users to store temporary information. In addition,users can also program the chip to control a variety of square-wave output,and its internal three-way through the software interrupt shielding.
2.5 Buttons and temperature measurements and circuit
The system in order to make the circuit more easy,button circuit design only three keys, which are 'set','+','-', three keys to adjust the calendar and clock. The system in order to improve the practicality of the circuit,an increase of a temperature display. The system temperature measurement circuit using Dallas's DS18B20. The device because of its low price,easy circuits,measurement precision,etc..
2.6 audio signal generator and driver circuit
The circuit's function is to receive control circuit to send to the entire point of time and timing signal,according to system settings proce different frequencies of audio signals,amplification by the drive circuit to drive speakers to voice their opinions in order to realize the whole point timekeeping and alarm functions.
中文譯文:
基於實時鍾晶元的電子萬年歷的設計
摘要:電子萬年歷以AT89S52單片機為控制核心,採用Dallas公司的DS1302實時鍾晶元構成計時電路,實現了時間和日期的顯示,還增加了溫度顯示和整點報時的功能。文章對該系統的硬體電路、工作原理做了詳細介紹,同時給出了軟體設計的流程圖及主要程序源代碼。
關鍵詞:單片機,實時鍾.溫度測量
1引言
電子萬年歷在家庭居室、學校、車站和廣場使用越來越廣泛,給人們的生活、學習、工作帶來極大的方便。針對以往的電子萬年歷斷電後需重新調整時間與日期,且計時誤差大的現象。本系統設計採用實時鍾晶元(DS1302)作為計時器件,該晶元內部自帶晶體振盪器,這樣就有效的保證了計時的精確性,並且內部自帶鏗電池使得在斷電情況能繼續更新時間信息。本設計採用AT89S52作為主控制器,為了提高電路的實用性加入溫度測量電路、報時和鬧鍾功能。
2系統硬體的設計
電路原理圖如圖所示:
該系統的結構框圖
系統的工作原理是:主控制器每隔一段時間(小於一秒鍾)讀一次時鍾晶元的內部寄存器的值,將讀出的日歷、時間信息實時的顯示在LED數碼顯示器一上。同時,主控制器不斷的掃描按鍵電路和溫度測量電路,當有鍵按下時,識別出按鍵的值並調整相應的時間或日歷的值再寫入時鍾晶元內部。溫度數據由測量電路(DS18B20)獲得的溫度值送入顯示電路顯示。
2. 1電源電路
為了減少電路成本,本系統電源電路由變壓器變壓、三端集成穩壓(L7805>電路產生5V,具有簡單、可靠、價格低廉等特點。
2. 2主控制器
主控制器採用ATMEL公司的最新系列單片機產品AT89S52。該單片機除了擁有MCS-51系列單片機的所有優點外,內部還具有8KB的在系統可編程FLASH存儲器,低功耗的空閑和掉電模式,極大的降低了電路的功耗。另外,還具有一個看門狗電路,為電路的可靠工作提供了更大的保證。
2. 3數碼管顯示電路
顯示電路採用具有高亮度、使用壽命長、價格低廉等特點的LED數碼管。整個顯示電路由LED數碼管和顯示驅動電路和解碼電路構成。由於本系統中顯示的內容較多,共需要16個數碼管,分別用八位顯示年、月、日,四位顯示時間,二二位顯示星期,二位顯示溫度。為了節省控制器的資源,在控制器和顯示器之間加入一個解碼電路使本來需要16根控制線的電路變成只需四根控制線,極大的節省了系統資源。該解碼器由兩個3-8解碼器構成。
2. 4實時鍾晶元
本設計採用美國Dallas公司的DS12C887A,該晶元能夠自動產生世紀、年、月、日、時、分、秒等時間信息。利用內部的世紀寄存器,配合軟體就能解決』千年』,的問題。該晶元內部自帶有鏗電池,外部掉電時,其內部的時間信息還能夠保持10年之久。對於一天內的時間記錄有 12小時制和24小時制兩種模式。時間的表示方法也有兩種,一種用二進制數表示,另一種用BCD碼表示。該晶元內部帶有128位元組的RAM,其中11位元組用來存儲時間信息,4位元組用來存儲晶元的控制信息,稱為控制寄存器,113位元組通用RAM可供用戶存儲臨時信息。此外,用戶還可以對晶元進行編程式控制制輸出各種方波,並可對其內部的三路中斷通過軟體進行屏蔽。
2. 5按鍵與溫度測且電路
本系統為了使電路更簡單,按鍵電路只設計了三個按鍵,分別是』設置』、』+』、』-』,三個鍵用來調整日歷以及時鍾。本系統為了提高電路的實用性,增加了一個溫度顯示功能。該系統的溫度測量電路採用Dallas公司的DS1280。該器件由於其具有價格低廉、電路簡單、測量精確等優點。
2. 6音頻信號產生及驅動電路
本電路的功能是接收控制電路發送來的整點報時及定時信號,根據系統設定產生不同頻率的音頻信號,由驅動電路加以放大驅動揚聲器發出聲音,從而實現整點報時及鬧鍾的功能。
希望可以幫到你!!!
6. 單片機英文文獻及翻譯,5000字左右 急需 謝謝 [email protected]
Introction of Programmable controllers
From a simple heritage, these remarkable systems have evolved to not only replace electromechanical devices, but to solve an ever-increasing array of control problems in both process and nonprocess instries. By all indications, these microprocessor powered giants will continue to break new ground in the automated factory into the 1990s.
HISTORY
In the 1960s, electromechanical devices were the order of the day ass far as control was concerned. These devices, commonly known as relays, were being used by the thousands to control many sequential-type manufacturing processes and stand-along machines. Many of these relays were in use in the transportation instry, more specifically, the automotive instry. These relays used hundreds of wires and their interconnections to effect a control solution. The performance of a relay was basically reliable - at least as a single device. But the common applications for relay panels called for 300 to 500 or more relays, and the reliability and maintenance issues associated with supporting these panels became a very great challenge. Cost became another issue, for in spite of the low cost of the relay itself, the installed cost of the panel could be quite high. The total cost including purchased parts, wiring, and installation labor, could range from $30~$50 per relay. To make matters worse, the constantly changing needs of a process called for recurring modifications of a control panel. With relays, this was a costly prospect, as it was accomplished by a major rewiring effort on the panel. In addition these changes were sometimes poorly documented, causing a second-shift maintenance nightmare months later. In light of this, it was not uncommon to discard an entire control panel in favor of a new one with the appropriate components wired in a manner suited for the new process. Add to this the unpredictable, and potentially high, cost of maintaining these systems as on high-volume motor vehicle proction lines, and it became clear that something was needed to improve the control process – to make it more reliable, easier to troubleshoot, and more adaptable to changing control needs.
That something, in the late 1960s, was the first programmable controller. This first 『revolutionary』 system wan developed as a specific response to the needs of the major automotive manufacturers in the United States. These early controllers, or programmable logic controllers (PLC), represented the first systems that 1 could be used on the factory floor, 2 could have there 『logic』 changed without extensive rewiring or component changes, and 3 were easy to diagnose and repair when problems occurred.
It is interesting to observe the progress that has been made in the past 15 years in the programmable controller area. The pioneer procts of the late 1960s must have been confusing and frightening to a great number of people. For example, what happened to the hardwired and electromechanical devices that maintenance personnel were used to repairing with hand tools? They were replaced with 『computers』 disguised as electronics designed to replace relays. Even the programming tools were designed to appear as relay equivalent presentations. We have the opportunity now to examine the promise, in retrospect, that the programmable controller brought to manufacturing.
All programmable controllers consist of the basic functional blocks shown in Fig. 10. 1. We』ll examine each block to understand the relationship to the control system. First we look at the center, as it is the heart ( or at least the brain ) of the system. It consists of a microprocessor, logic memory for the storage of the actual control logic, storage or variable memory for use with data that will ordinarily change as a function power for the processor and memory. Next comes the I/O block. This function takes the control level signals for the CPU and converts them to voltage and current levels suitable for connection with factory grade sensors and actuators. The I/O type can range from digital (discrete or on / off), analog (continuously variable), or a variety of special purpose 『smart』 I/O which are dedicated to a certain application task. The programmer is shown here, but it is normally used only to initially configure and program a system and is not required for the system to operate. It is also used in troubleshooting a system, and can prove to be a valuable tool in pinpointing the exact cause of a problem. The field devices shown here represent the various sensors and actuators connected to the I/O. These are the arms, legs, eyes, and ears of the system, including push buttons, limit switches, proximity switches, photosensors, thermocouples, RTDS, position sensing devices, and bar code reader as input; and pilot lights, display devices, motor starters, DC and AC drives, solenoids, and printers as outputs.
No single attempt could cover its rapidly changing scope, but three basic characteristics can be examined to give classify an instrial control device as a programmable controller.
(1) Its basic internal operation is to solve logic from the beginning of memory to some specified point, such as end of memory or end of program. Once the end is reached, the operation begins again at the beginning of memory. This scanning process continues from the time power is supplied to the time it it removed.
(2) The programming logic is a form of a relay ladder diagram. Normally open, normally closed contacts, and relay coils are used within a format utilizing a left and a right vertical rail. Power flow (symbolic positive electron flow) is used to determine which coil or outputs are energized or deenergized.
(3) The machine is designed for the instrial environment from its basic concept; this protection is not added at a later date. The instrial environment includes unreliable AC power, high temperatures (0 to 60 degree Celsius), extremes of humidity, vibrations, RF noise, and other similar parameters.
General application areas
The programmable controller is used in a wide variety of control applications today, many of which were not economically possible just a few years ago. This is true for two general reasons: 1 there cost effectiveness (that is, the cost per I/O point) has improved dramatically with the falling prices of microprocessors and related components, and 2 the ability of the controller to solve complex computation and communication tasks has made it possible to use it where a dedicated computer was previously used.
Applications for programmable controllers can be categorized in a number of different ways, including general and instrial application categories. But it is important to understand the framework in which controllers are presently understood and used so that the full scope of present and future evolution can be examined. It is through the power of applications that controllers can be seen in their full light. Instrial applications include many in both discrete manufacturing and process instries. Automotive instry applications, the genesis of the programmable controller, continue to provide the largest base of opportunity. Other instries, such as food processing and utilities, provide current development opportunities.
There are five general application areas in which programmable controllers are used. A typical installation will use one or more of these integrated to the control system problem. The five general areas are explained briefly below.
Description
The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel』s high-density nonvolatile memory technology and is compatible with the instry-standard MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.
Function characteristic
The AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full plex serial port, on-chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.
Pin Description
VCC:Supply voltage.
GND:Ground.
Port 0:
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as highimpedance inputs.Port 0 may also be configured to be the multiplexed loworder address/data bus ring accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also receives the code bytes ring Flash programming,and outputs the code bytes ring programverification. External pullups are required ring programverification.
Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can sink/source four TTL inputs.When 1s are written to Port 1 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pullups.Port 1 also receives the low-order address bytes ring Flash programming and verification.
Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pullups.The Port 2 output buffers can sink/source four TTL inputs.When 1s are written to Port 2 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 2 pins that are externally being pulled low will source current, because of the internal pullups.Port 2 emits the high-order address byte ring fetches from external program memory and ring accesses to external data memory that use 16-bit addresses. In this application, it uses strong internal pullupswhen emitting 1s. During accesses to external data memory that use 8-bit addresses, Port 2 emits the contents of the P2 Special Function Register.Port 2 also receives the high-order address bits and some control signals ring Flash programming and verification.
Port 3
Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3 output buffers can sink/source four TTL inputs.When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups.Port 3 also serves the functions of various special features of the AT89C51 as listed below:
Port 3 also receives some control signals for Flash programming and verification.
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.
ALE/PROG
Address Latch Enable output pulse for latching the low byte of the address ring accesses to external memory. This pin is also the program pulse input (PROG) ring Flash programming.In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped ring each access to external Data Memory.
If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only ring a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.
PSEN
Program Store Enable is the read strobe to external program memory.When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped ring each access to external data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.EA should be strapped to VCC for internal program executions.This pin also receives the 12-volt programming enable voltage(VPP) ring Flash programming, for parts that require12-volt VPP.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
Oscillator Characteristics
XTAL1 and XTAL2 are the input and output, respectively,of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1.Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the ty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.
Figure 1. Oscillator Connections Figure 2. External Clock Drive Configuration
Idle Mode
In idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged ring this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset.It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution,from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.
Power-down Mode
In the power-down mode, the oscillator is stopped, and the instruction that invokes power-down is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the power-down mode is terminated. The only exit from power-down is a hardware reset. Reset redefines the SFRs but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.
Program Memory Lock Bits
On the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below.
When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched ring reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly
7. 求,一篇「單片機直流電機調速系統設計」的5000字畢業論文。
畢業論文是要根據你做的產品才寫的論文。不過調速系統挺簡單的,用PWM改變占空比來實現電流電壓的改變-。-
8. 單片機英文文獻及翻譯 5000字左右
注意查收
9. 求關於單片機方面的5000字左右中英文對譯(英譯中)
單片機學習應中的六大重要部分
一、匯流排:我們知道,一個電路總是由元器件通過電線連接而成的,在模擬電路中,連線並不成為一個問題,因為各器件間一般是串列關系,各器件之間的連線並不很多,但計算機電路卻不一樣,它是以微處理器為核心,各器件都要與微處理器相連,各器件之間的工作必須相互協調,所以就需要的連線就很多了,如果仍如同模擬電路一樣,在各微處理器和各器件間單獨連線,則線的數量將多得驚人,所以在微處理機中引入了匯流排的概念,各個器件共同享用連線,所有器件的8根數據線全部接到8根公用的線上,即相當於各個器件並聯起來,但僅這樣還不行,如果有兩個器件同時送出數據,一個為0,一個為1,那麼,接收方接收到的究竟是什麼呢?這種情況是不允許的,所以要通過控制線進行控制,使器件分時工作,任何時候只能有一個器件發送數據(可以有多個器件同時接收)。器件的數據線也就被稱為數據匯流排,器件所有的控制線被稱為控制匯流排。在單片機內部或者外部存儲器及其它器件中有存儲單元,這些存儲單元要被分配地址,才能使用,分配地址當然也是以電信號的形式給出的,由於存儲單元比較多,所以,用於地址分配的線也較多,這些線被稱為地址匯流排。
二、數據、地址、指令:之所以將這三者放在一起,是因為這三者的本質都是一樣的——數字,或者說都是一串『0』和『1』組成的序列。換言之,地址、指令也都是數據。指令:由單片機晶元的設計者規定的一種數字,它與我們常用的指令助記符有著嚴格的一一對應關系,不可以由單片機的開發者更改。地址:是尋找單片機內部、外部的存儲單元、輸入輸出口的依據,內部單元的地址值已由晶元設計者規定好,不可更改,外部的單元可以由單片機開發者自行決定,但有一些地址單元是一定要有的(詳見程序的執行過程)。數據:這是由微處理機處理的對象,在各種不同的應用電路中各不相同,一般而言,被處理的數據可能有這么幾種情況:
1•地址(如MOV DPTR,#1000H),即地址1000H送入DPTR。
2•方式字或控制字(如MOV TMOD,#3),3即是控制字。
3•常數(如MOV TH0,#10H)10H即定時常數。
4•實際輸出值(如P1口接彩燈,要燈全亮,則執行指令:MOV P1,#0FFH,要燈全暗,則執行指令:MOV P1,#00H)這里0FFH和00H都是實際輸出值。又如用於LED的字形碼,也是實際輸出的值。
理解了地址、指令的本質,就不難理解程序運行過程中為什麼會跑飛,會把數據當成指令來執行了。
三、P0口、P2口和P3的第二功能用法:初學時往往對P0口、P2口和P3口的第二功能用法迷惑不解,認為第二功能和原功能之間要有一個切換的過程,或者說要有一條指令,事實上,各埠的第二功能完全是自動的,不需要用指令來轉換。如P3.6、P3.7分別是WR、RD信號,當微片理機外接RAM或有外部I/O口時,它們被用作第二功能,不能作為通用I/O口使用,只要一微處理機一執行到MOVX指令,就會有相應的信號從P3.6或P3.7送出,不需要事先用指令說明。事實上『不能作為通用I/O口使用』也並不是『不能』而是(使用者)『不會』將其作為通用I/O口使用。你完全可以在指令中按排一條SETB P3.7的指令,並且當單片機執行到這條指令時,也會使P3.7變為高電平,但使用者不會這么去做,因為這通常這會導致系統的崩潰。
四、程序的執行過程: 單片機在通電復位後8051內的程序計數器(PC)中的值為『0000』,所以程序總是從『0000』單元開始執行,也就是說:在系統的ROM中一定要存在『0000』這個單元,並且在『0000』單元中存放的一定是一條指令。
五、堆棧: 堆棧是一個區域,是用來存放數據的,這個區域本身沒有任何特殊之處,就是內部RAM的一部份,特殊的是它存放和取用數據的方式,即所謂的『先進後出,後進先出』,並且堆棧有特殊的數據傳輸指令,即『PUSH』和『POP』,有一個特殊的專為其服務的單元,即堆棧指針SP,每當執一次PUSH指令時,SP就(在原來值的基礎上)自動加1,每當執行一次POP指令,SP就(在原來值的基礎上)自動減1。由於SP中的值可以用指令加以改變,所以只要在程序開始階段更改了SP的值,就可以把堆棧設置在規定的內存單元中,如在程序開始時,用一條MOV SP,#5FH指令,就時把堆棧設置在從內存單元60H開始的單元中。一般程序的開頭總有這么一條設置堆棧指針的指令,因為開機時,SP的初始值為07H,這樣就使堆棧從08H單元開始往後,而08H到1FH這個區域正是8031的第二、三、四工作寄存器區,經常要被使用,這會造成數據的混亂。不同作者編寫程序時,初始化堆棧指令也不完全相同,這是作者的習慣問題。當設置好堆棧區後,並不意味著該區域成為一種專用內存,它還是可以象普通內存區域一樣使用,只是一般情況下編程者不會把它當成普通內存用了。
六、單片機的開發過程: 這里所說的開發過程並不是一般書中所說的從任務分析開始,我們假設已設計並製作好硬體,下面就是編寫軟體的工作。在編寫軟體之前,首先要確定一些常數、地址,事實上這些常數、地址在設計階段已被直接或間接地確定下來了。如當某器件的連線設計好後,其地址也就被確定了,當器件的功能被確定下來後,其控制字也就被確定了。然後用文本編輯器(如EDIT、CCED等)編寫軟體,編寫好後,用編譯器對源程序文件編譯,查錯,直到沒有語法錯誤,除了極簡單的程序外,一般應用模擬機對軟體進行調試,直到程序運行正確為止。運行正確後,就可以寫片(將程序固化在EPROM中)。在源程序被編譯後,生成了擴展名為HEX的目標文件,一般編程器能夠識別這種格式的文件,只要將此文件調入即可寫片
Singlechip study should be an important part in the six
First, the bus: we know that a circuit is always from the components through wires connected, and in analog circuits, the connection does not become a problem, because the devices are generally serial inter-relationship between the various devices connection is not much, but not the same as computer circuits, which is based on the microprocessor as the core, the device must be connected with the microprocessor, the device must be between the mutual coordination and so on need to connect on a lot of If still the same as analog circuits, in the microprocessor and a separate connection between the devices, the quantity line will be many alarmingly so in the microprocessor introced the concept of bus, all devices share the connection All devices of all eight data lines from eight public online, which is equivalent to all devices in parallel, but only this is not enough, if there is two devices send data simultaneously, a 0, a 1, then , the receiving party received what is it? This situation is not allowed, so to pass the line of control to control the device time job, any time there can be only one device to send data (which may have multiple devices simultaneously receiving). Device's data lines will be referred to as data bus, all the line of control devices known as control bus. Singlechip at internal or external memory and other devices have memory cells, these memory cells to be assigned addresses to use, the allocation of addresses is of course to give the form of electrical signals, and because memory cells are more so for address the allocation of more lines, these lines were known as the address bus.
Second, data, address, command: The reason why these three together, because these three are the essence is the same - figure, or are a string of'0 'and'1', composed of sequence . In other words, addresses, instructions are also data. Command: from single-chip chip designer provides a figure, it is consistent with our mnemonic commonly used commands have a strict one-to-one relationship, not by the developer to change the MCU. Address: Singlechip are looking for internal, external storage units, input and output port based on the value of the internal unit's address has been provided for the chip designers, and can not be changed, the external unit can be single-chip developers to decide, but Yes there is some address must be the unit (see proceres for the implementation process). Data: This is the object of treatment by the microprocessor, in a variety of different applications in different circuits, in general, the data may be processed so have several situations:
1 • address (such as MOV DPTR, # 1000H), that address 1000h into the DPTR.
2 • the way the words or control characters (such as MOV TMOD, # 3), 3 which controls the characters.
3 • constants (such as MOV TH0, # 10H) 10H that is constant from time to time.
4 • The actual output value (such as the mouth then P1 lantern light to light the whole, then the implementation of instruction: MOV P1, # 0FFH, to light the whole dark, then the implementation of instruction: MOV P1, # 00H) and 00H are here 0FFH actual output value. Another example is the font code for the LED, is the actual output value.
Understanding of the address, the nature of instructions, running is not difficult to understand why the process of running fly, the data will be implemented as instructions.
Three, P0 mouth, P2 and P3 the mouth of the second function Usage: often on P0 beginner I, P2 and P3 mouth I use the second function puzzled think the second function and the original features have a switch between the process, or that there have to be a directive, in fact, the port's second feature is completely automatic, no need to use command to convert. Such as P3.6, P3.7, respectively, are WR, RD signal, when the micro-chip RAM or external justifications machine has an external I / O port, they were used as the second function, can not be used as general-purpose I / O port to use, as long as one microprocessor implementation of the MOVX instruction 1, there will be a corresponding signal sent from the P3.6 or P3.7, no prior use instructions indicate. In fact 'can not be used as general-purpose I / O port use' is not 'should not' but (user) 'not' as a general-purpose I / O port to use. At command you can arrange a Medium of Instruction SETB P3.7, and when the single-chip implementation of this Article directions, P3.7 will also become high, but users will not do so, because This usually will lead to the collapse of the system.
Four, the program implementation process: single-chip power-on reset in 8051 after the program counter (PC) in the value of'0000 ', so the procere always'0000' unit begin implementation of, that is to say: the system's ROM must exist in the'0000 'in this unit, and'0000' in the storage unit must be a command.
Friday, the stack: the stack is a region, are used to store data, the region does not have any unique position, that is a part of internal RAM, special is its data storage and access methods, namely, the so-called 'advanced after that last-in first-out ', and the stack has a special data transmission command, ie' PUSH 'and' POP ', there is a special unit specifically for its services, that is, the stack pointer SP, when they first PUSH instruction, the SP on (at the original value of the foundation on) automatically add one, whenever the implementation of a POP instruction, SP on (at the original value basis) minus one automatically. Because of the value of SP can be used to change directions, so as long as the stage at the beginning of the proceedings to change the value of the SP, you can put the stack set up the required memory units, such as at the beginning of the proceedings, with a MOV SP, # 5FH instructions when put on the stack from the memory moles installed in the unit 60H start. The normal procere at the beginning of the total that there is a stack pointer of the instruction set, because at startup, SP initial value of 07H, thus the stack from the beginning the next unit 08h, and 08h to 1Fh in the region 8031 is the second, Three, four working registers area, often used, this will lead to data chaos. The author has prepared a different program, not exactly the same instructions to initialize the stack, which is the author's customary problem. When set up the stack area, does not mean that the region as a dedicated memory, it can be as common as the use of memory region, but under normal circumstances programming will not put it as an ordinary memory use
10. 單片機中英文翻譯,5000字左右,十分感謝(花錢做畢業設計的不要回答了)
Getting Started with µVision2
The Keil Software 8051 development tools listed below are programs you use to compile your C code, assemble your assembly source files, link and locate object moles and libraries, create HEX files, and debug your target program.
µVision2 for Windows™ is an Integrated Development Environment that combines project management, source code editing, and program debugging in one single, powerful environment.
The C51 ANSI Optimizing C Cross Compiler creates relocatable object moles from your C source code.
The A51 Macro Assembler creates relocatable object moles from your 8051 assembly source code.
The BL51 Linker/Locator combines relocatable object moles created by the C51 Compiler and the A51 Assembler into absolute object moles.
The LIB51 Library Manager combines object moles into libraries that may be used by the linker.
The OH51 Object-HEX Converter creates Intel HEX files from absolute object moles.
The RTX-51 Real-time Operating System simplifies the design of complex, time-critical software projects.
Software Development Cycle
When you use the Keil Software tools, the project development cycle is roughly the same as it is for any other software development project.
1. Create a project, select the target chip from the device database, and configure the tool settings.
2. Create source files in C or assembly.
3. Build your application with the project manager.
4. Correct errors in source files.
5. Test the linked application.
µVision2 IDE
The µVision2 IDE combines project management, a rich-featured editor with interactive error correction, option setup, make facility, and on-line help. Use µVision2 to create your source files and organize them into a project that defines your target application. µVision2 automatically compiles, assembles, and links your embedded application and provides a single focal point for your development efforts.
LIB51 Library Manager
The LIB51 library manager allows you to create object library from the object files created by the compiler and assembler. Libraries are specially formatted, ordered program collections of object moles that may be used by the linker at a later time. When the linker processes a library, only those object moles in the library that are necessary to create the program are used.
BL51 Linker/Locator
The BL51 linker creates an absolute object mole using the object moles extracted from libraries and those created by the compiler and assembler. An absolute object file or mole contains no relocatable code or data. All code and data reside at fixed memory locations. The absolute object file may be used:
To program an EPROM or other memory devices,
With the µVision2 Debugger for simulation and target debugging,
With an in-circuit emulator for the program testing.
µVision2 Debugger
The µVision2 symbolic, source-level debugger is ideally suited for fast, reliable program debugging. The debugger includes a high-speed simulator that let you simulate an entire 8051 system including on-chip peripherals and external hardware. The attributes of the chip you use are automatically configured when you select the device from the Device Database.
The µVision2 Debugger provides several ways for you to test your programs on
real target hardware:
Install the MON51 Target Monitor on your target system and download your program using the Monitor-51 interface built-in to the µVision2 Debugger.
Use the Advanced GDI interface to attach use the µVision2 Debugger front end with your target system.
Monitor-51
The µVision2 Debugger supports target debugging using Monitor-51. The monitor program resides in the memory of your target hardware and communicates with the µVision2 Debugger using the serial port of the 8051 and a COM port of your PC. With Monitor-51, µVision2 lets you perform source-level, symbolic debugging on your target hardware.
RTX51 Real-Time Operating System
The RTX51 real-time operating system is a multitasking kernel for the 8051 microcontroller family. The RTX51 real-time kernel simplifies the system design, programming, and debugging of complex applications where fast reaction to time critical events is essential. The kernel is fully integrated into the C51 Compiler and is easy to use. Task description tables and operating system consistency are automatically controlled by the BL51 linker/locator.
C51 Optimizing C Cross Compiler
The Keil C51 Cross Compiler is an ANSI C Compiler that was written
specifically to generate fast, compact code for the 8051 microcontroller family.
The C51 Compiler generates object code that matches the efficiency and speed
of assembly programming.
Using a high-level language like C has many advantages over assembly language
programming:
Knowledge of the processor instruction set is not required. Rudimentary knowledge of the memory structure of the 8051 CPU is desirable (but not necessary).
Details like register allocation and addressing of the various memory types and data types is managed by the compiler.
Programs get a formal structure (which is imposed by the C programming language) and can be divided into separate functions. This contributes to source code reusability as well as better overall application structure.
The ability to combine variable selection with specific operations improves program readability.
Keywords and operational functions that more nearly resemble the human thought process may be used.
Programming and program test time is drastically reced.
The C run-time library contains many standard routines such as: formatted output, numeric conversions, and floating-point arithmetic.
Existing program parts can be more easily included into new programs because of molar program construction techniques.
The language C is a very portable language (based on the ANSI standard) that enjoys wide popular support and is easily obtained for most systems.
Existing program investments can be quickly adapted to other processors as needed.
Code Optimizations
The C51 Compiler is an aggressive optimizing compiler that takes numerous steps to ensure that the code generated and output to the object file is the most efficient (smallest and/or fastest) code possible. The compiler analyzes the generated code to proce the most efficient instruction sequences. This ensures that your C program runs as quickly and effectively as possible in the least amount of code space.
The C51 Compiler provides nine different levels of optimizing. Each increasing level includes the optimizations of levels below it. The following is a list of all optimizations currently performed by the C51 Compiler.
General Optimizations
Constant Folding: Constant values occurring in an expression or address calculation are combined as a single constant.
Jump Optimizing: Jumps are inverted or extended to the final target address when the program efficiency is thereby increased.
Dead Code Elimination: Code that cannot be reached (dead code) is removed from the program.
Register Variables: Automatic variables and function arguments are located in registers whenever possible. No data memory space is reserved for these variables.
Parameter Passing Via Registers: A maximum of three function arguments
may be passed in registers.
Global Common Subexpression Elimination: Identical subexpressions or address calculations that occur multiple times in a function are recognized and calculated only once whenever possible.
Common Tail Merging: Common instruction blocks are merged together using jump instructions.
Re-use Common Entry Code: Common instruction sequences are moved in front of a function to rece code size.
Common Block Subroutines: Multiple instruction sequences are packed into subroutines. Instructions are rearranged to maximize the block size.
中文譯文
Keil C 簡介
Keil Software 的8051開發工具提供以下程序,你可以用它們來編譯你的C源碼,匯編你的匯編源程序,連接和重定位你的目標文件和庫文件,創建HEX文件,調試你的目標程序。
Windows應用程序uVision2是一個集成開發環境,它把項目管理,源代碼編輯,程序調試等集成到一個功能強大的環境中。
C51美國標准優化C交叉編譯器從你的C源代碼產生可重定位的目標文件。
A51宏匯編器從你的8051匯編源代碼產生可重定位的目標文件。
BL51連接/重定位器組合你的由C51和A51產生的可重定位的目標文件,生成絕對目標文件。
LIB51庫管理器組合你的目標文件,生成可以被連接器使用的庫文件。
OH51目標文件到HEX格式的轉換器從絕對目標文件創建Intel HEX 格式的文件。
RTX-51實時操作系統簡化了復雜和對時間要求敏感的軟體項目。
軟體開發流程
當你使用Keil Software工具時,你的項目開發流程和其它軟體開發項目的流程極其相似。
1. 創建一個項目,從器件庫中選擇目標器件,配置工具設置。
2. 用C語言或匯編語言創建源程序。
3. 用項目管理器實現你的應用。
4. 修改源程序中的錯誤。
5. 測試,連接應用。
uVision2 IDE
uVision2 集成開發環境集成了一個項目管理器,一個功能豐富、有錯誤提示的編輯器,以及設置選項,生成工具,在線幫助。利用uVision2創建你的源代碼並把它們組織到一個能確定你的目標應用的項目中去。uVision2自動編譯,匯編,連接你的嵌入式應用,並為你的開發提供一個單一的焦點。
C51編譯器和A51匯編器
源代碼由uVision2 IDE創建,並被C51編譯或A51匯編。編譯器和匯編器從源代碼生成可重定位的目標文件。Keil C51編譯器完全遵照ANSI C語言標准,支持C語言的所有標准特性。另外,直接支持8051結構的幾個特性被添加到裡面。Keil A51宏匯編器支持8051及其派生系列的全部指令集。
LIB51 庫管理器
LIB51庫管理器允許你從由編譯器或匯編器生成的目標文件創建目標庫。庫是一種被特別地組織過並在以後可以被連接重用的對象模塊。當連接器處理一個庫時,僅僅那些被使用的目標模塊才被真正使用。
BL51 連接器/定位器
BL51 連接器/定位器利用從庫中提取的目標模塊和由編譯器或匯編器生成的目標模塊創建一個絕對地址的目標模塊。一個絕對地址目標模塊或文件包含不可重定位的代碼和數據。所有的代碼和數據被安置在固定的存儲器單元中。此絕對地址目標文件可以用來:
寫入EPROM或其它存儲器件。
由uVision2調試器使用來模擬和調試。
由模擬器用來測試程序。
uVision2 調試器
uVision2源代碼級調試器是一個理想地快速,可靠的程序調試器。此調試器包含一個高速模擬器,能夠讓你模擬整個8051系統,包括片上外圍器件和外部硬體。當你從器件庫中選擇器件時,這個器件的特性將自動配置。
uVision2調試器為你在實際目標板上測試你的程序提供了幾種方法:
安裝MON51目標監控器到你的目標系統並且通過Monitor-51介面下載你的程序。
利用高級的GDI(AGDI)介面,把uVision2調試器綁定到你的目標系統。
Monitor-51
uVision2調試器支持用Monitor-51進行目標板調試。此監控程序駐留在你的目標板的 存儲器里,它利用串口和uVision2調試器進行通信。利用Monitor-51,uVision2調試器 可以對你的目標硬體實行源代碼級的調試。
RTX51實時操作系統
RTX51實時操作系統是一個針對8051系列的多任務核。RTX51實時內核從本質上簡化了對實時事件反應速度要求高的復雜應用系統的設計,編程和調試。RTX51實時內核是完全集成到C51編譯器中的,從而方便使用。任務描述表和操作系統的連接由BL51連接器/定位器自動控制。
C51優化的C語言交叉編譯器
Keil C51交叉編譯器是一個基於ANSI C標準的針對8051系列MCU的C編譯器,生成的可執行代碼快速、緊湊,在運行效率和速度上可以和匯編程序得到的代碼相媲美。
和匯編語言相比,用C語言這樣的高級語言有很多優勢,比如:
對處理器的指令集不必了解,8051 CPU的基本結構可以了解,但不是必須的。
寄存器的分配以及各種變數和數據的定址都由編譯器完成。
程序擁有了正式的結構(由C語言帶來的),並且能被分成多個單獨的子函數。這使整個應用系統的結構變得清晰,同時讓源代碼變得可重復使用。
選擇特定的操作符來操作變數的能力提高了源代碼的可讀性。
可以運用和人的思維很接近的詞彙和演算法表達式。
編寫程序和調試程序的時間得到很大程度的縮短。
C運行連接庫包含一些標準的子程序,如:格式化輸出,數字轉換,浮點運算。
由於程序的模塊結構技術,使得現有的程序段可以很容易的包含到新的程序中去。
ANSI 標準的C語言是一種豐常方便的,獲得廣泛應用的,在絕大部分系統中都能夠很容易得到的語言。
因此,如果需要,現有的程序可以很快地移植到其他的處理器上,節省投資。
代碼優化
C51是一個傑出的優化編譯器,它通過很多步驟以確保產生的代碼是最有效率的(最小和/或最快)。編譯器通過分析初步的代碼 產生最終的最有效率的代碼序列,以此來保證你的C語言程序佔用最少空間的同時運行的快而有效。
C51編譯器提供9個優化級別。每個高一級的優化級別都包括比它低的所有優化級別的優化內容。以下列出的是目前C51編譯器提供的所有優化級別的內容:
常量折疊:在表達式及定址過程中出現的常量被綜合為一個單個的常量。
跳轉優化:採用反轉跳轉或直接指向最終目的的跳轉,從而提升了程序的效率。
啞碼消除:永遠不可能執行到的代碼將自動從程序中剔除。
寄存器變數:只要可能,局部變數和函數參數被放在CPU寄存器中,不需要為這些變數再分配存儲器空間。
通過寄存器傳遞參數:最多三個參數通過寄存器傳遞。
消除全局公用的子表達式:只要可能,程序中多次出現的相同的子表達式或地址計算表達式將只計算一次。
合並相同代碼:利用跳轉指令,相同的代碼塊被合並。
重復使用入口代碼:需要多次使用的共同代碼被移到子程序的前面以縮減代碼長度。
公共塊子程序:需要重復使用的多條指令被提取組成子程序。指令被重新安排以最大化一個共用子程序的長度。
上面是搜來的建議去中國知網,那裡的很多也很權威