1、MCS-51 系列单片机中英文资料对照外文翻译文献综述Structure and function of the MCS-51 seriesStructure and function of the MCS-51 series one-chip computer MCS-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 af
2、ter introducing 8 one-chip computers of MCS-48 series in 1976. It belong 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
3、serial one-chip computers.A one-chip computer system is made up of several following parts: (1) One microprocessor of 8 (CPU). ( 2) At slice data memory RAM (128B/256B),it use not depositing not can reading /data that write, such as result not middle of operation, final result and data wanted to sho
4、w, 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 as 8031, 8032.(4) Four 8 run side by side I/O interface P0 four P3, each mouth can use as introduction , may us
5、e 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 sy
6、stem of the source. (7) One all duplex 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 el
7、ectric capacity need outer. Allow oscillation frequency as 12 megahertz 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 un
8、it and controller , etc The arithmetic unit can carry on 8 persons of arithmetic operation and unit ALU of logic operation while including one, the 1 storing device temporaries of 8, storing device 2 temporarily, 8s accumulation device ACC, register B and procedure state register PSW, etc. Person wh
9、o accumulate ACC count by 2 input ends entered of checking 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 loop back ACC with another one. In addition, ACC is often regarded as the transfe
10、r station of data transmission on 8051 inside. The same as general microprocessor, it is the busiest register. Help remembering that agreeing with a express in the order. The controller includes the procedure counter, the order is deposited, the order deciphering, the oscillator and timing circuit,
11、etc. The procedure counter is made up of counter of 8 for 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
12、 one-chip computers, only need outer quartz crystal and 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 c
13、ontrol 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 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 gen
14、eral memory of computer. Procedure 8051 memory and 8751 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, using for middle result to deposit operation, the data are
15、stored temporarily and the data are buffered. In RAM of this 128B, there is unit of 32 bytes 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
16、memory of MCS-51 series 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 different address space i
17、n 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. 8051 memories are divided into procedure memory space and data memory space on
18、 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 st
19、ructure. 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 16 addresses). (2) The data memory address space outside one of 64KB, the address is arranged from 0000H 64KB F
20、FFFH (with 16 addresses) too to the location. (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
21、spend MOVC , visit block RAM order uses MOVX outside the slice, RAM order uses MOV to visit in slice.8051 one-chip computer have four 8 walk abreast I/O ports, 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 introduct
22、ion 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 pass away these self-same. Expand among the system of m
23、emory outside having slice, four ports these 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 cir
24、cuit of 8051 one-chip computers and four I/O ports is very ingenious in design. Familiar with I/O port logical circuit, not only help to use port correctly and rationally, and will inspire to designing the peripheral logical circuit of one-chip computer to some extent. Load ability and interface of
25、port have certain requirement, because 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 mouth, its output grade draws the resistance
26、 supremely. When using it as the mouth in common use, output grade is it leak circuit to turn on, 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
27、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
28、 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
29、 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 neednt answer and thinking. Here when the port is used as introduction, must write into 1 to the correspondi
30、ng 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
31、 mouth large a conversion controls some than P1.P3 mouth one multi-functional port, mouth getting many than P1 it have “3 doors and 4 buffers“. Two parts there, make her besides accurate two-way function with P1 mouth just, can also use the second function of every pin, “and“ door 3 functions one sw
32、itch 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 neednt have software th
33、at 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 gra
34、de, 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 grad
35、e 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 com
36、puter, 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 P1P3 Being
37、 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 proc
38、edure 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 signal in 8051 China RST pin. Restore to the throne signal hi
39、gh 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
40、 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, restore to the throne circuit sample to output , Schmitt of tri
41、gger 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 thron
42、e 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 po
43、p ones 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-
44、51 系列单片机的功能和结构MSC-51 系 列 单 片 机 具 有 一 个 单 芯 片 电 脑 的 结 构 和 功 能 , 它 是 英 特 尔公 司 的 系 列 产 品 的 名 称 。 这 家 公 司 在 1976 年 推 出 后 , 引 进 8 位 单 芯 片的 MCS-48 系 列 计 算 机 后 于 1980 年 推 出 的 8 位 的 MCS-51 系 列 单 芯 片 计算 机 。 诸 如 此 类 的 单 芯 片 电 脑 有 很 多 种 , 如8051, 8031, 8751, 80C51BH,80C31BH 等 , 其 基 本 组 成 , 基 本 性 能 和 指令 系 统 都 是
45、相 同 的 。 8051 是 51 系 列 单 芯 片 电 脑 的 代 表 。一 个 单 芯 片 的 计 算 机 是 由 以 下 几 个 部 分 组 成 : ( 1) 一 个 8 位 的 微处 理 器 ( CPU) 。 ( 2) 片 内 数 据 存 储 器 RAM( 128B/256B) ,它 只 读 /写 数据 , 如 结 果 不 在 操 作 过 程 中 , 最 终 结 果 要 显 示 数 据 ( 3) 程 序 存 储 器ROM/EPROM(4KB/8KB).是 用 来 保 存 程 序 一 些 初 步 的 数 据 和 切 片 的 形 式 。 但一 些 单 芯 片 电 脑 没 有 考 虑 RO
46、M/EPROM,如 8031, 8032, 80C51 等 等 。( 4) 4 个 8 路 运 行 的 I/O 接 口 , P0, P1, P2, P3, 每 个 接 口 可 以 用 作 入口 , 也 可 以 用 作 出 口 。 ( 5) 两 个 定 时 /计 数 器 , 每 个 定 时 方 式 也 可 以 根据 计 算 结 果 或 定 时 控 制 实 现 计 算 机 。 ( 6) 5 个 中 断 ( 7) 一 个 全 双 工 串 行的 I/UART( 通 用 异 步 接 收 器 I 口 /发 送 器 ( UART) ) , 它 是 实 现 单 芯 片 电脑 或 单 芯 片 计 算 机 和 计
47、 算 机 的 串 行 通 信 使 用 。 ( ) 振 荡 器 和 时 钟 产 生 电路 , 需 要 考 虑 石 英 晶 体 微 调 能 力 。 允 许 振 荡 频 率 为 12MHz, 每 个 上 述 的部 分 都 是 通 过 内 部 数 据 总 线 连 接 。 其 中 CPU 是 一 个 芯 片 计 算 机 的 核 心 ,它 是 计 算 机 的 指 挥 中 心 , 是 由 算 术 单 元 和 控 制 器 等 部 分 组 成 。 算 术 单 元 可以 进 行 位 算 术 运 算 和 逻 辑 运 算 , ALU 单 元 是 其 中 一 种 运 算 器 , 18 个 存储 设 备 , 暂 存 设
48、备 的 积 累 设 备 进 行 协 调 , 程 序 状 态 寄 存 器 PSW 积 累 了 2个 输 入 端 的 计 数 等 检 查 暂 时 作 为 一 个 操 作 往 往 由 人 来 操 作 , 谁 储 存 1 输入 的 是 它 使 操 作 去 上 暂 时 计 数 , 另 有 一 个 操 作 的 结 果 , 回 环 协 调 。 此 外 ,协 调 往 往 是 作 为 对 8051 内 的 数 据 传 输 转 运 站 考 虑 。 作 为 一 般 的 微 处 理 器 ,解 码 的 顺 序 。 振 荡 器 和 定 时 电 路 等 的 程 序 计 数 器 是 一 个 由 8 个 计 数 器 为2, 总
49、 计 16 位 。 这 是 一 个 字 节 的 地 址 , 其 实 程 序 计 数 器 , 是 将 在 个 人 电 脑内 进 行 。 从 而 改 变 它 的 内 容 可 以 改 变 它 的 程 序 进 行 。 在 8051 的 单 芯 片电 脑 的 电 路 , 只 需 要 外 部 石 英 晶 体 和 频 率 微 调 电 容 , 其 频 率 范 围 为1.2MHz 到 12MHz。 这 种 脉 冲 信 号 , 作 为 8051 的 工 作 , 即 单 位 时 间 的 最 低基 本 节 奏 。 8051 是 其 他 电 脑 一 样 , 控 制 的 基 本 工 作 在 于 和 谐 , 就 像 一 个管 弦 乐 队 , 根 据 击 败 发 挥 是 指 挥 。有 光 盘 ( 程 序 存 储 器 , 只 能 读 取 ) , 并 在 8051 片 ( 数 据 存 储 器RAM, 可 以 是 可 写 可 读 , 他 们 各 自 独 立 的 内 存 地 址 空 间 , 处 理 办 法 是 , 与一 般 的 电 脑 记 忆 体 相 同 。 8051 可 8751 的 程 序 存 储 的 存 储 容 量 4KB 的 程序 切 片 , 地 址 开 始 从 0000H 开 始 执 行 , 维 护 的 程 序 和 形 式 不 断 使 用 。 数据 8051-8751 的 内 存 数