




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、structure and function of the mcs-51 series one-chip computermcs-51 is a name of a piece of one-chip computer series which intel company produces. this company introduced 8 top-grade one-chip computers of mcs-51 series in 1980 after introducing 8 one-chip computers of mcs-48 series in 1976. it belon
2、g to a lot of kinds this line of one-chip computer the chips have,such as 8051, 8031, 8751, 80c51bh, 80c31bh,etc., their basic composition, basic performance and instruction system are all the same. 8051 daily representatives- 51 serial one-chip computersan one-chip computer system is made up of sev
3、eral following parts: (1) one microprocessor of 8 (cpu). (2) at slice data memory ram (128b/256b),it use not depositting not can reading /data that write,such as result not middle of operation, final result and data wanted to show,etc. (3) procedure memory rom/eprom (4kb/8kb ), is used to preserve t
4、he procedure , some initial data and form in slice. but does not take rom/eprom within some one-chip computers, such as 8031 , 8032, 80c ,etc.(4) four 8 run side by side i/o interface p0 four p3, each mouth can use as introduction , may use as exporting too. (5) two timer / counter, each timer / cou
5、nter may set up and count in the way, used to count to the external incident, can set up into a timing way too, and can according to count or result of timing realize the control of the computer. (6) five cut off cutting off the control system of the source . (7) one all duplexing serial i/o mouth o
6、f uart (universal asynchronous receiver/transmitter (uart) ), is it realize one-chip computer or one-chip computer and serial communication of computer to use for. (8) stretch oscillator and clock produce circuit, quartz crystal finely tune electric capacity need outer. allow oscillation frequency a
7、s 12 megahertzs now at most. every the above-mentioned part was joined through the inside data bus .among them, cpu is a core of the one-chip computer, it is the control of the computer and command centre, made up of such parts as arithmetic unit and controller ,etc. the arithmetic unit can carry on
8、 8 persons of arithmetic operation and unit alu of logic operation while including one, the 1 storing device temporarilies of 8, storing device 2 temporarily, 8s accumulation device acc, register b and procedure state register psw,etc. person who accumulate acc count by 2 input ends entered of check
9、ing etc. temporarily as one operation often, come from person who store 1 operation is it is it make operation to go on to count temporarily , operation result and loopback acc with another one. in addition, acc is often regarded as the transfer station of data transmission on 8051 inside . the same
10、 as general microprocessor, it is the busiest register. help remembering that agreeing with a expresses in the order. the controller includes the procedure counter , the order is depositted, the order decipher, the oscillator and timing circuit,etc. the procedure counter is made up of counter of 8 f
11、or two, amounts to 16. it is a byte address counter of the procedure in fact, the content is the next ia that will carried out in pc. the content which changes it can change the direction that the procedure carries out . shake the circuit in 8051 one-chip computers, only need outer quartz crystal an
12、d frequency to finely tune the electric capacity , its frequency range is its 12mhz of 1.2mhz. this pulse signal, as 8051 basic beats of working, namely the minimum unit of time. 8051 is the same as other computers, the work in harmony under the control of the basic beat , just like an orchestra acc
13、ording to the beat play that is commanded.there are rom (procedure memory , can only read ) and ram in 8051 slices (data memory, can is it can write ) two to read, they have each independent memory address space, dispose way to be the same with general memory of computer. procedure 8051 memory and 8
14、751 slice procedure memory capacity 4kb, address begin from 0000h, used for preserving the procedure and form constant. data 8051- 8751 8031 of memory data memory 128b, address false 00fh, use for middle result to deposit operation, the data are stored temporarily and the data are buffered etc. in r
15、am of this 128b, there is unit of 32 byteses that can be appointed as the job register, this and general microprocessor is different, 8051 slice ram and job register rank one formation the same to arrange the location. it is not very the same that the memory of mcs-51 series one-chip computer and ge
16、neral computer disposes the way in addition. general computer for first address space, rom and ram can arrange in different space within the range of this address at will , namely the addresses of rom and ram, with distributing different address space in a formation. while visiting the memory, corre
17、sponding and only an address memory unit,can rom, it can be ram too, and by visiting the order similarly. this kind of memory structure is called the structure of princeton. 8051 memories are divided into procedure memory space and data memory space on the physics structure, there are four memory sp
18、aces in all: the procedure stores in one and data memory space outside data memory and one in procedure memory space and one outside one, the structure forms of this kind of procedure device and data memory separated form data memory, called harvard structure. but use the angle from users, 8051 memo
19、ry address space is divided into three kinds: ( 1) in the slice , arrange blocks of ffffh , 0000h of location , in unison outside the slice (use 16 addresses). ( 2) the data memory address space outside one of 64kb, the address is arranged from 0000h 64kb ffffh (with 16 addresses ) too to the locati
20、on. ( 3) data memory address space of 256b (use 8 addresses). three above-mentioned memory space addresses overlap, for distinguishing and designing the order symbol of different data transmission in the instruction system of 8051: cpu visit slice, rom order spend movc , visit block ram order uses m
21、ovx outside the slice, ram order uses mov to visit in slice.8051 one-chip computer have four 8 walk abreast i/o port , call p0, p1, p2 and p3. each port is 8 accurate two-way mouths, accounts for 32 pins altogether. every one i/o line can be used as introduction and exported independently. each port
22、 includes a latch (namely special function register ), one exports the driver and a introduction buffer . make data can latch when outputting , data can buffer when making introduction , but four function of passway these self-same. expand among the system of memory outside having slice, four port t
23、hese may serve as accurate two-way mouth of i/o in common use. expand among the system of memory outside having slice, p2 mouth see high 8 address off; p0 mouth is a two-way bus , send the introduction of 8 low addresses and data / export in timesharing the circuit of 8051 one-chip computers and fou
24、r i/o ports is very ingenious in design. familiar with i/o port logical circuit, not only help to use ports correctly and rationally , and will inspire to designing the peripheral logical circuit of one-chip computer to some extent . load ability and interface of port have certain requirement, becau
25、se output grade, p0 of mouth and p1 end output, p3 of mouth grade different at structure, so, the load ability and interface of its door demand to have nothing in common with each other. p0 mouth is different from other mouths, its output grade draws the resistance supremly . when using it as the mo
26、uth in common use to use , output grade is it leak circuit to turn on , is it is it urge nmos draw the resistance on taking to be outer with it while inputting to go out to fail. when being used as introduction , should write 1 to a latch first . every one with p0 mouth can drive 8 model ls ttl load
27、 to export. p1 mouth is an accurate two-way mouth too, used as i/o in common use . different from p0 mouth output of circuit its, draw load resistance link with power on inside have. in fact, the resistance is that two effects are in charge of fet and together: one fet is in charge of load, its resi
28、stance is regular. another one can is it lead to work with close at two state , make its president resistance value change approximate 0 or group value heavy two situation very. when it is 0 that the resistance is approximate , can draw the pin to the high level fast ; when resistance value is very
29、large, p1 mouth, in order to hinder the introduction state high. output as p1 mouth high electricity at ordinary times , can is it draw electric current load to offer outwards , draw the resistance on neednt answer and thenning. here when the port is used as introduction , must write into 1 to the c
30、orresponding latch first too, make fet end . relatively about 20,000 ohms because of the load resistance in scene and because 40,000 ohms, will not exert an influence on the data that are input . the structure of p2 some mouth is similar to p0 mouth, there are mux switches. is it similar to mouth pa
31、rtly to urge, but mouth large a conversion controls some than p1. p3 mouth one multi-functional port, mouth getting many than p1 it have and 3 door and 4 buffer. two part these, make her besides accurate two-way function with p1 mouth just, can also use the second function of every pin . and door 3
32、function one switch in fact, it determines to be to output data of latch to output second signal of function. act as w =at 1 oclock, output q end signal; act as q =at 1 oclock, can output w line signal . at the time of programming, it is that the first function is still the second function but needn
33、t have software that set up p3 mouth in advance . it hardware not inside is the automatic to have two function outputted when cpu carries on sfr and seeks the location (the location or the byte ) to visit to p3 mouth /at not lasting lining, there are inside hardware latch qs =1.the operation princip
34、le of p3 mouth is similar to p1 mouth.output grade , p3 of mouth , p1 of p1 , connect with inside have load resistance of drawing , every one of they can drive 4 model ls ttl load to output. as while inputting the mouth, any ttl or nmos circuit can drive p1 of 8051 one-chip computers as p3 mouth in
35、a normal way . because draw resistance on output grade of them have, can open a way collector too or drain-source resistance is it urge to open a way, do not need to have the resistance of drawing outerly . mouths are all accurate two-way mouths too. when the conduct is input, must write the corresp
36、onding port latch with 1 first . as to 80c51 one-chip computer, port can only offer milliampere of output electric currents, is it output mouth go when urging one ordinary basing of transistor to regard as, should contact a resistance among the port and transistor base , in order to the electricity
37、while restraining the high level from exporting p1p3 being restored to the throne is the operation of initializing of an one-chip computer. its main function is to turn pc into 0000h initially , make the one-chip computer begin to hold the conduct procedure from unit 0000h. except that the ones that
38、 enter the system are initialized normally,as because procedure operate it make mistakes or operate there arent mistake, in order to extricate oneself from a predicament , need to be pressed and restored to the throne the key restarting too. it is an input end which is restored to the throne the sig
39、nal in 8051 china rst pin. restore to the throne signal high level effective , should sustain 24 shake cycle (namely 2 machine cycles ) the above its effective times. if 6 of frequency of utilization brilliant to shake, restore to the throne signal duration should exceed 4 delicate to finish restori
40、ng to the throne and operating. produce the logic picture of circuit which is restored to the throne the signal:restore to the throne the circuit and include two parts outside in the chip entirely. outside that circuit produce to restore to the throne signal (rst ) hand over to schmitts trigger, res
41、tore to the throne circuit sample to output , schmitt of trigger constantly in each s5p2 , machine of cycle in having one more , then just got and restored to the throne and operated the necessary signal insidly. restore to the throne resistance of circuit generally, electric capacity parameter suit
42、able for 6 brilliant to shake, can is it restore to the throne signal high level duration greater than 2 machine cycles to guarantee. being restored to the throne in the circuit is simple, its function is very important. pieces of one-chip computer system could normal running,should first check it c
43、an restore to the throne not succeeding. checking and can pop ones head and monitor the pin with the oscillograph tentatively, push and is restored to the throne the key, the wave form that observes and has enough range is exported (instantaneous), can also through is it restore to the throne circui
44、t group holding value carry on the experiment to change.mcs-51系列單片機的結構及功能mcs-51是intel公司生產的一個單片機系列的名稱。該公司繼1976年推出mcs-48系列8位單片機之后,又于1980年推出了mcs-51系列高檔8位單片機。屬于這一系列的單片機芯片有個單片機系統有以下幾部分組成:(1)一個8位的微處理器(cpu)。(2)片內數據存儲器ram(128b/256b),用以存放可以讀/寫的數據,如運算的中間結果,最終結果以及欲顯示的數據等。(3)片內程序存儲器rom/eprom(4kb/8kb),用以存放程序,一些原
45、始數據和表格。但也有一些單片機內部不帶rom/eprom,如8031,8032等。(4)四個8位并行i/o接口p0p3,每個口既可以用作輸入,也可以用作輸出。(5)兩個定時器/計數器,每個定時器/計數器都可以設置成計數方式,用以對外部件進行計數,也可以設置成定時方式,并可以根據計數或定時的結果實現計算機的控制。(6)五個中斷源的中斷控制系統。(7)一個全雙工uart(通用異步接收發送器)的串行i/o口,用于實現單片機之間或單片機與微機之間的串行通信。(8)片內振蕩器和時鐘產生電路,但石英晶體和微調電容需要外接。最高允許振蕩頻率為12mhz。以上各部分是通過內部數據總線相連接的。 其中,cpu是
46、單片機的核心,是計算機的控制和指揮中心,有運算器和控制器等部件組成。運算器包括一個可進行8位算術運算和邏輯運算的單元alu,8位的暫存器1,暫存器2,8位的累加器acc,寄存器b和程序狀態寄存器psw等.累加器acc經常作為一個運算數經暫存器2進入的輸入端,與另一個來自暫存器1的運算數進行運算,運算結果又回送acc。除此之外,acc在8051內部經常作為數據傳送的中轉站。同一般微處理器一樣,它是最繁忙的一個寄存器了。在指令中助記符a來表示。控制器包括程序計數器,指令寄存,指令譯碼,振蕩器及定時電路等。程序計數器有兩個8位的計數器組成,共16位。它實際上是程序的字節地址計數器,pc中內容是將要執
47、行的下一條指令地址。改變它的內容就可改變程序執行的方向。在8051單片機內有振蕩電路,只需外接石英晶體和頻率微調電容,其頻率范圍是1.2mhz12mhz.該脈沖信號就作為8051工作的基本節拍,即時間的最小單位。8051片內有rom(程序存儲器,只能讀)和ram(數據存儲器,可讀可寫)兩類,它們有各自獨立的存儲地址空間,與一般微機的存儲器配置方式不相同。程序存儲器 8051及8751的片內程序存儲器容量為4kb,地址從0000h開始,用于存放程序和表格常數。數據存儲器8051及8751、8031片內數據存儲器均為128b,地址偽007fh,用于存放運算的中間結果,數據暫存以及數據緩沖等。在這1
48、28b的ram中,有32個字節單元可指定為工作寄存器,這同一般微處理器不同,8051的片內ram和工作寄存器排在一個隊列里同一編址。另外mcs-51系列單片機與一般微機的存儲器配置方式很不相同。一般微機通常只有一個地址空間,rom和ram可以隨意安排在這一地址范圍內不同空間,即rom和ram的地址同在一個隊列里分配不同的地址空間。訪問存儲器時,一個地址對應唯一的存儲器單元,可以是rom,也可以是ram,并用同類訪問指令。此種存儲器結構稱為普林斯頓結構。8051的存儲器在物理結構上分為程序存儲器空間和數據存儲器空間,共有四個存儲空間:片內程序存儲和片外程序存儲空間以及片內數據存儲器和片外數據存儲
49、器空間,這種程序器和數據存儲器和數據存儲器分開的結構形式,稱為哈佛結構。但從用戶使用角度,8051存儲器地址空間分為三類:(1)片內,片外統一編址0000hffffh(用16位地址)。(2)64kb片外數據存儲器地址空間,地址也從0000hffffh(用16位地址)編址。(3)256b數據存儲器地址空間(用8位地址)。前述的三個存儲器空間地址是重疊的,為了區分起見在8051的指令系統設計了不同數據傳送指令符號:cpu訪問片內,片外rom指令用movc,訪問片外ram指令用movx,訪問片內ram指令用mov。8051單片機有四個8位并行i/o端口,稱p0,p1,p2和p3。每個端口都是8位準雙向口,共占32只引腳。每一條i/o線都能獨立地用作輸入和輸出。每個端口都包括一個鎖存器(即特殊功能寄存器),一個輸出驅動器和一輸入緩沖器。作輸出時數據可以鎖存,作輸入時數據可以緩沖,但這四個通道的功
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年山東菏澤工程技師學院招聘教師筆試真題
- 2024年朝陽師范學院高校招聘考試真題
- 非易失性存儲-洞察及研究
- 實驗室設計講課件
- 新型栽培基質-洞察及研究
- 福建省莆田市荔城區擢英中學2025屆英語七年級第二學期期中教學質量檢測試題含答案
- 嚴重燒傷患者心理障礙護理講課件
- 植入式設備防護方案-洞察及研究
- 2025屆葫蘆島龍港區六校聯考七年級英語第二學期期末聯考模擬試題含答案
- 湖北省黃石市汪仁中學2025年英語八年級第二學期期末質量跟蹤監視模擬試題含答案
- 健身房預售培訓課件
- 智能化熱模鍛技術
- 個人車位租賃合同電子版 個人車位租賃合同
- 普惠性托育機構申請托育中心情況說明基本簡介
- 外輪理貨業務基礎-理貨單證的制作
- 《水火箭制作》課件
- 網絡安全預防電信詐騙主題班會PPT
- 優秀物業管理項目評選方案
- 圖書管理系統畢業論文參考文獻精選,參考文獻
- 中國當代舊體詩選讀幻燈片
- 吉林省全省市縣鄉鎮衛生院街道社區衛生服務中心基本公共衛生服務醫療機構信息名單目錄995家
評論
0/150
提交評論