【机械类文献翻译】51系列单片机的功能和结构
- 格式:pdf
- 大小:130.85 KB
- 文档页数:9
Structure and function of the MCS-51series Structure and function of the MCS-51series one-chip computer MCS-51 is a name of a piece of one-chip computer series which Intel Company produces.This company introduced8top-grade one-chip computers of MCS-51series in1980after introducing8one-chip computers of MCS-48 series in1976.It belong to a lot of kinds this line of one-chip computer the chips have,such as8051,8031,8751,80C51BH,80C31BH,etc.,their basic composition,basic performance and instruction system are all the same.8051daily representatives-51serial one-chip computers.An one-chip computer system is made up of several following parts: (1)One microprocessor of8(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 the procedure,some initial data and form in slice.But does not take ROM/EPROM within some one-chip computers,such as8031,8032,80C,etc..(4)Four8run side by side I/O interface P0four P3,each mouth can use as introduction,may use as exporting too.(5)Two timer/counter,each timer/counter 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 of 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 as12 megahertas 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 on8persons of arithmetic operation and unit ALU of logic operation while including one,the1storing device temporarilies of8,storing device 2temporarily,8's accumulation device ACC,register B and procedure stateregister PSW,etc.Person who accumulate ACC count by2input ends entered of checking etc.temporarily as one operation often,come from person who store1operation 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 on8051 inside.The same 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 of8for two,amounts to16.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 in8051 one-chip computers,only need outer quartz crystal and frequency to finely tune the electric capacity,its frequency range is its12MHZ of1.2MHZ. This pulse signal,as8051basic beats of working,namely the minimum unit of time.8051is the same as other computers,the work in harmony under the control of the basic beat,just like an orchestra according to the beat play that is commanded.There are ROM(procedure memory,can only read)and RAM in8051slices (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.Procedure8051memory and8751slice procedure memory capacity 4KB,address begin from0000H,used for preserving the procedure and form constant.Data8051-87518031of memory data memory128B,address false 00FH,use for middle result to deposit operation,the data are stored temporarily and the data are buffered etc..In RAM of this128B,there is unit of32byteses that can be appointed as the job register,this and general microprocessor is different,8051slice RAM and job register rank one formation the same to arrange the location.It is not very the same that the memory of MCS-51series one-chip computer and general 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 differentaddress space in a formation.While visiting the memory,corresponding 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.8051memories are divided into procedure memory space and data memory space on the physics structure,there are four memory spaces 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 memory address space is divided into three kinds:(1)In the slice,arrange blocks of FFFFH,0000H of location,in unison outside the slice(use 16addresses).(2)The data memory address space outside one of64KB,the address is arranged from0000H64KB FFFFH(with16addresses)too to the location.(3)Data memory address space of256B(use8addresses).Three above-mentioned memory space addresses overlap,for distinguishing and designing the order symbol of different data transmission in the instruction system of8051:CPU visit slice,ROM order spend MOVC,visit block RAM order uses MOVX outside the slice,RAM order uses MOV to visit in slice.8051one-chip computer have four8walk abreast I/O port,call P0,P1, P2and P3.Each port is8accurate two-way mouths,accounts for32pins altogether.Every one I/O line can be used as introduction and exported independently.Each port 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 these may serve as accurate two-way mouth of I/O in common use.Expand among the system of memory outside having slice,P2mouth see high8address off;P0mouth is a two-way bus, send the introduction of8low addresses and data/export in timesharing The circuit of8051one-chip computers and four 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.Loadability and interface of port have certain requirement,because output grade,P0of mouth and P1end output,P3of mouth grade different at structure,so,the load ability and interface of its door demand to have nothing in common with each other.P0mouth is different from other mouths, its output grade draws the resistance supremly.When using it as the mouth 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 P0mouth can drive8Model LS TTL load to export.P1mouth is an accurate two-way mouth too,used as I/O in common use.Different from P0mouth 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 resistance is regular.Another one can is it lead to work with close at two state,make its President resistance value change approximate 0or group value heavy two situation very.When it is0that the resistance is approximate,can draw the pin to the high level fast;When resistance value is very large,P1mouth,in order to hinder the introduction state high.Output as P1mouth high electricity at ordinary times,can is it draw electric current load to offer outwards,draw the resistance on needn't answer and thenning.Here when the port is used as introduction, must write into1to the corresponding latch first too,make FET end. Relatively about20,000ohms because of the load resistance in scene and because40,000ohms,will not exert an influence on the data that are input. The structure of P2some mouth is similar to P0mouth,there are MUX switches.Is it similar to mouth partly to urge,but mouth large a conversion controls some than P1.P3mouth one multi-functional port, mouth getting many than P1it have"and"3door and4buffer".Two part these,make her besides accurate two-way function with P1mouth just,can also use the second function of every pin,"and"door3function one switch in fact,it determines to be to output data of latch to output second signal of function.Act as W=At1o'clock,output Q end signal;Act as Q=At 1o'clock,can output W line signal.At the time of programming,it is that the first function is still the second function but needn't havesoftware that set up P3mouth 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 P3mouth/at not lasting lining,there are inside hardware latch Qs=1.The operation principle of P3mouth is similar to P1mouth.Output grade,P3of mouth,P1of P1,connect with inside have load resistance of drawing,every one of they can drive4Model LS TTL load to output.As while inputting the mouth,any TTL or NMOS circuit can drive P1of8051one-chip computers as P3mouth in 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 corresponding port latch with1first.As to80C51one-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 while restraining the high level from exporting P1~P3Being restored to the throne is the operation of initializing of an one-chip computer.Its main function is to turn PC into0000H initially,make the one-chip computer begin to hold the conduct procedure from unit0000H.Except that the ones that enter the system are initialized normally,as because procedure operate it make mistakes or operate there aren't 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 signal in8051China RST pin.Restore to the throne signal high level effective,should sustain24shake cycle (namely2machine cycles)the above its effective times.If6of frequency of utilization brilliant to shake,restore to the throne signal duration should exceed4delicate to finish restoring 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 thronesignal(RST)hand over to Schmitt's trigger,restore 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 suitable for6brilliant to shake,can is it restore to the throne signal high level duration greater than2machine 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 can restore to the throne not succeeding. Checking and can pop one's 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 circuit group holding value carry on the experiment to change.51系列单片机的功能和结构结构和功能的监控监-51系列之一--计算机芯片监控监-51名是一幅一个电脑晶片,英特尔公司生产系列.这家公司推出8级一个计算机芯片监控监-51系列之后,于1980年8引入一个计算机芯片监控监,于1976年48系列.。