on taking to be outer with it while inputting to go out to fail. When being used as introduction, should write\to a latch first. Every one with P0 mouth can drive 8 Model LS TTL load 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 resistance 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 large, P1 mouth high electricity at ordinary times, can is it draw electric current load to offer outwards, draw electric current load to offer outwards, draw the resistance on needn't answer and thinking. Here when the port is used as introduction, must write into 1 to the corresponding latch first too, make FET end relatively about 20,000 ohms because of 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 partly to urge, but mouth large a conversion controls some than P1.P3 mouth one multi-functional port, mouth getting many than P1 it have \doors and 4 buffers\P1 mouth just, can also use the second function of every pin, \functions one switch in fact, it determines to be to output data of latch to
output second signal of function. Act as W=At 1 o'clock, output Q end signal; act as Q=At 1 o'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 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 to visit to P3 mouth/at not lasting lining, there are inside hardware latch Qs=1. The operation principle 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 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 outer. Mouths are all accurate two-way mouths too. When the conduct is input, must write the corresponding 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 while restraining the high level from exporting P1~P3 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 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 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 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 throne signal (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 inside. Restore to the throne resistance of circuit generally, electric capacity parameter suitable 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 can restore to the throne not succeeding. Checking and can pop one's head and monitor the pin with the oscilloscope 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.
MCS-51系列单片机的功能和结构
MSC-51系列单片机具有一个单芯片电脑的结构和功能,它是英特尔公司的系列产品的名称。这家公司在1976年推出后,引进8位单芯片的MCS-48系列计算机后于1980年推出的8位的MCS-51系列单芯片计算机。诸如此类的单芯片电脑有很多种,如8051,8031,8751,80C51BH,80C31BH等,其基本组成,基本性能和指令系统都是相同的。8051是51系列单芯片电脑的代表。
一个单芯片的计算机是由以下几个部分组成:(1)一个8位的微处理器(CPU)。(2)片内数据存储器RAM(128B/256B),它只读/写数据,如结果不在操作过程中,最终结果要显示数据(3)程序存储器ROM/EPROM(4KB/8KB).是用来保存程序一些初步的数据和切片的形式。但一些单芯片电脑没有考虑ROM/EPROM,如8031,8032,80C51等等。(4)4个8路运行的I/O接口,P0,P1,P2,P3,每个接口可以用作入口,也可以用作出口。(5)两个定时/计数器, 每个定时方式也可以根据计算结果或定时控制实现计算机。(6)5个中断(7)一个全双工串行的
I/UART(通用异步接收器I口/发送器(UART)),它是实现单芯片电脑或单芯片计算机和计算机的串行通信使用。(8)振荡器和时钟产生电路,需要考虑石英晶体微调能力。允许振荡频率为12MHz,每个上述的部分都是通过内部数据总线连接。其中CPU是一个芯片计算机的核心,它是计算机的指挥中心,是由算术单元和控制器等部分组成。算术单元可以进行8位算术运算和逻辑运算,ALU单元是其中一种运算器,18个存储设备,暂存设备的积累设备进行协调,程序状态寄存器PSW积累了2个输入端的计数等检查暂时作为一个操作往往由人来操作,谁储存1输入的是它使操作去上暂时计数,另有一个操作的结果,回环协调。此外,协调往往是作为对8051内的数据传输转运站考虑。作为一般的微处理器,解码的顺序。振荡器和定时电路等的程序计数器是一个由8个计数器为2,总计16位。这是一个字节的地址,其实程序计数器,是将在个人电脑内进行。从而改变它的内容可以改变它的程序进行。在8051的单芯片电脑的电路,只需要外部石英晶体和频率微调电容,其频率范围为1.2MHz到12MHz。这种脉冲信号,作为8051的工作,即单位时间的最低基本节奏。8051是其他电脑一样,控制的基本工作在于和谐,就像一个管弦乐队,根据击败发挥是指挥。
有光盘(程序存储器,只能读取),并在8051片(数据存储器RAM,可以是可写可读,他们各自独立的内存地址空间,处理办法是,与一般的电脑记忆体相同。8051可8751的程序存储的存储容量4KB的程序切片,地址开始从0000H开始执行,维护的程序和形式不断使用。数据8051-8751的内存数据存储器128B)条8031,地址虚假00FH,中层结果存入操作使用,数据存储和数据暂时缓冲等。在这128B条内存,有32