2022年APS-单片机-english培训资料 .pdf

上传人:C****o 文档编号:39876293 上传时间:2022-09-08 格式:PDF 页数:7 大小:90.14KB
返回 下载 相关 举报
2022年APS-单片机-english培训资料 .pdf_第1页
第1页 / 共7页
2022年APS-单片机-english培训资料 .pdf_第2页
第2页 / 共7页
点击查看更多>>
资源描述

《2022年APS-单片机-english培训资料 .pdf》由会员分享,可在线阅读,更多相关《2022年APS-单片机-english培训资料 .pdf(7页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、APS-单 片 机-engl i sh名师资料总结-精品资料欢迎下载-名师精心整理-第 1 页,共 7 页 -1.微处理器(Microprocessor)、微型计算机(Microcomputer)、单片机(Single-Chip Microcomputer)的区别1.微处理器:本身不是计算机,但是小型计算机或微型计算机的控制和处理部分。A microprocessorincorporates(表 现 为)the functions of a computer s central processing unit(CPU)on a singleintegrated circuit,1(IC)or

2、at most a few integrated circuits(集成电路)2.微机:具有完整运算及控制功能的计算机,除微处理器(作为CPU)外,还包括存储器、接口适配器(输入/输出接口电路)及输入/输出(I/O)设备等。其中,微处理器由控制器、运算器和若干个寄存器组成;I/O 设备与微处理器的连接需要通过接口适配器;存储器是指微机内部的存储器(RAM、ROM 和 EPROM等)A microcomputeris a computer with a microprocessoras its central processing unit.It includes microprocessor,

3、memory,and input/output(I/O).They are physically small compared to mainframe(大 型 机)and minicomputers(小 型 机).Many microcomputers(when equipped with a keyboard and screen for input and output)are alsopersonal computers(in the generic sense).3.单片机:将微处理器、一定容量的RAM 和 ROM 及 I/O 口,定时器等电路集成在一块芯片上,构成单片微型计算机A

4、microcontroller(sometimes abbreviated(缩写)C,uC or MCU)is a small computer on a single integrated circuit containing a processor core,memory,and programmable input/output peripherals(外围器件).Program memory in the form of NOR flash or OTP ROM is also often included on chip,as well as a typically small am

5、ount of RAM.Microcontrollers are designed for embedded applications,in contrast to the microprocessors used in personal computers or other general purpose applications.2.微处理器:(计算机模型,图示)包括运算器和控制器,8 位微处理器中,数据单元由1 字节组成,16 位中由 2 字节组成。1.运算器:包括算术逻辑单元(Arithmetic&Logical Unit,ALU)、累加器、寄存器组成。ALU 的作用是把传送到微处理器

6、的数据进行算术或逻辑运算,数据来源于累加器和数据寄存器,结果存入累加器。ALU 执行不同的操作是由控制总线上的信号控制的。一个算术操作产生一个运算结果,一个逻辑运算产生一个判决。In computing,an arithmetic logic unit (ALU)is a digital circuit that performs arithmetic and logical operations.The ALU is a fundamental(基本的)building block of the central processing unit of a computer,and even t

7、he simplest microprocessors contain one for purposes such as maintaining timers.The processors found inside modern CPUs and graphics(图解计算)processing units(GPUs)accommodate(适应)very powerful and very complex ALUs;a single component may contain a number of ALUs.2.控制器:由程序计数器、指令寄存器、指令译码器、时序发生器和操作控制器等组成,是

8、发布命令的“决策机构”,即协调和指挥整个计算机系统的操作。主要功能:从内存中取出一条指令,并指出下一条指令在内存中的位置;对指令进行译码或测试,并产生相应的操作控制信号,以便执行规定的动作;指挥并控制CPU、内存和 I/O 设备之间的数据流动方向。控制器发出控制信号指挥运算器工作。In computing and especially in computer hardware,controller is a chip,an expansion card,or a stand-alone(独 立)device(usually called a control unit)that interfac

9、eswith a peripheral device.This may be a link between two parts of a computer(for example a memory controller that manages access to memory for the computer)or a controller on an 名师资料总结-精品资料欢迎下载-名师精心整理-第 2 页,共 7 页 -external(外部)device that manages the operation of(and connection with)that device.3.系统

10、总线(外部总线external bus):数据总线DB、地址总线AB、控制总线CB 4.CPU中的主要寄存器:1.累加器(A)accumulator:运算前用于保存操作数,运算后用于保存结果。an accumulator is a register in which intermediate arithmetic and logic results are stored.2.数据(缓冲)寄存器(DR):是通过数据总线向存储器和I/O 设备送(写)或取(读)数据的暂存单元。The Memory Data Register(MDR)is the register of a computer s c

11、ontrol unit that contains the data to be stored in the computer storage (e.g.RAM),or the data after a fetch from the computer storage.It acts like a buffer(缓存区)and holds anything that is copied from the memory ready for the processor to use it.3.指令寄存器(IR)及指令译码器(ID):IR 用于保存当前正在执行的一条指令,这条指令是从内存中取到数据寄存

12、器,然后再送到IR。ID 是对指令进行译码,译码后的指令将向控制器发出具体操作的特定信号。In computing,an instruction register(IR)is the part of a CPU s control unit that stores the instruction currently being executed or decoded4.程序计数器(PC):确定下一条指令的地址,保证程序连续执行。The program counter(PC)is a processor register that indicates where the computer is

13、in its instruction sequence.5.地址寄存器(AR):保存当前CPU 所要访问的内存单元或I/O 设备的地址。由于CPU 与内在之间存在着速度上的差别,所以必须使用AR 来保持地址信息,直到内存读/写操作完成。The Memory Address Register(MAR)is a CPU register that either stores the memory address from which data will be fetched to the CPU or the address to which data will be sent and store

14、d.5.存储器和I/O 接口:1.存储器:通过8 位地址总线和8 位数据总线与微型计算机相连,地址总线将一组8位二进制数从CPU 送到存储器的地址译码器,进而确定被选择的存储单元。存储器还接收CPU的控制信号,以确定执行读/写操作。Connect to microcomputer with the 8 bit address bus and 8 bit data bus,address bus can send a group of eight binary data from the CPU to the memory address decoder,and then to determin

15、e the selected storage unit.The storage also receives CPU control signals to determine the read/write operations2.I/O 接口及外设:外部设备与微处理器的连接必须经过接口适配器(I/O 接口),每个 I/O 接口及对应的外部设备都有一个固定的地址。The connection of external devices and microprocessor must go through the interface adapter(I/O interface),each I/O int

16、erface and the corresponding external device has a fixed address.6.单 片 机 常 用 数 制:二 进 制(Binary)、十 进 制(Deciaml)、十 六 进 制(Hexadecimal),只有二进制是计算机能直接处理的。7.计算机中常用编码:BCD(Binary Coded Decimal)和 ASCII(American Standard Code for Information Interchange)8.机器数:计算机中的二进制形式表示的数;Machine number:the computer expressed

17、 numbers in binary 真值:机器数所代表的数值名师资料总结-精品资料欢迎下载-名师精心整理-第 3 页,共 7 页 -True value:the value represented by the number of machines number正数的原original、反 negative、补 Complement 码相同;负数反码的绝对值+原码的绝对值127;The absolute value of the negative anti-code+the absolute value of the original code=127负数的补码的绝对值-1负数反码的绝对值;

18、The absolute value of the absolute value of the negative complement,-1=negative against the code 溢出:指有符号数的运算结果超出-128127 的表示范围,破坏了符号位。Overflow:refers to the result of the operation number of symbols of beyond the-128-127 range,and destroyed the sign bit 9.8XC51单片机,其中X(0:掩膜 ROM,7:EPROM、OTPROM,9:Flash

19、ROM)10.89C51单片机结构框图(图示)11.89C51单片机的基本组成The basic components of the microcontroller:1.一个 8 位的 80C51 微处理器(CPU)2.片内 256 字节数据存储器RAM/SFR(Special Function Register),用以存放可以读/写的数据。3.片内 4KB程序存储器Flash ROM,用以存放程序、一些原始数据和表格table。4.4 个 8 位并行(Parallel)I/O 端口(port)P0-P3,每个端口可输入或输出。5.两个 16 位定时器/计数器,每个都可以设置为计数方式,以对外

20、部事件计数,也可以设置为定时方式,并可以根据计数或定时的结果实现计算机控制。Two 16-bit timer/counters,each of which can be set for the count to count external events,can also be set for timing control computer,and according to the count or timing results 6.有 5 个中断源interrupt source、两个中断优先级interrupt priority level 的中断控制系统。7.一 个 全 双 工full

21、duplexUART(通 用 异 步 接 收 发 送 器Universal Asynchronous Receiver/Transmitter)的串行Serial I/O 口,用于实现单片机之间或单片机与PC间的串行通信(Used to implement serial communication between the microcontroller or MCU and PC.)。8.片内振荡器和时钟产生电路,但石英晶体和微调电容需要外接,最高允许振荡频率24MHz。On-chip oscillator and clock generation circuit,but the need f

22、or external quartz crystal and fine-tuning capacitor,the maximum allowable frequency of oscillation 9.与 8051 相比,具有节电工作方式,即休闲方式及掉电方式。工作频率可下降至0Hz,提供两种可用软件来选择的省电方式空闲方式(Idle Mode)和掉电方式(Power Down Mode),空闲方式中CPU停止工作,而RAM、定时/计数器、串行口和中断系统都继续工作,电流可降到正常的15%;掉电方式中,片内振荡器停止工作,一切工作暂停,只保存片内RAM 中的内容,直到下一次硬件复位为止,此时

23、电流降至15 微安以下,最小可到0.6 微安。Compared with 8051,with a power-saving work,leisure and power-down mode.Operating frequency can be reduced to 0Hz,available in two software selectable power saving-idle mode(Idle Mode)and power-down mode(Power Down,the Mode),the Idle 名师资料总结-精品资料欢迎下载-名师精心整理-第 4 页,共 7 页 -Mode st

24、ops the CPU,RAM,timer/counters,serial line port and interrupt system to continue working,the current can be reduced to 15%of normal;power down mode,the on-chip oscillator to stop working,all work was suspended,only to save the contents of the on-chip RAM,until the next hardware reset.The current dro

25、ps below 15 microamps minimum to 0.6 microamps.10.64KB 总线扩展控制器:当有多个单片机去竞争使用外部总线时,可以控制总线使用的优先权。When multiple MCU to compete using the external bus,you can control the bus priority.以上各部分通过片内8 位数据总线(DBUS)相连接。11.89C51的 CPU由控制器与运算器组成。1.运 算 器:包 括ALU,8位 暂 存 器1(TMP1)temporary)、暂 存 器2(TMP2),8 位累加器ACC,寄存器B 和程

26、序状态寄存器PSW Program Status Word 等。ACC 经常作为一个运算数经TMP2 进入 ALU 输入端,与另一个来自TMP1 的运算数进行运算,结果又送回ACC。PSW 用于指示指令执行后的状态信息。ACC is often used as an operand(操作数)by TMP2 into the ALU input operator with the other from the TMP1 the operands conducted,the results sent back to the ACC.The PSW is used to indicate the s

27、tatus information of the instruction execution.B 寄存器在乘、除运算时用于存放操作数,也用来存放运算后的一部分结果,若无运算,则可作为通用寄存器使用。还有一个位累加器C用于处理位操作。B register multiply,and divide operations when used to store operands,also used to store part of the results of computing,in the absence of operation,can be used as general-purpose reg

28、isters.There is a bit accumulator C for handling bit operation.2.控制器:包括程序计数器PC、指令寄存器IR、指令译码器、振荡器及定时电路等。程序计数器由两个8 位计数器PCH及 PCL组成,共16 位,保存将要执行的下一条指令的地址。振荡器及定时电路需外接石英晶体和频率微调电容,其频率为 0-24MHz,该脉冲信号作为89C51工作的基本节拍,即时间最小单位。The program counter by two 8-bit counter PCH and PCL,a total of 16,save the address of

29、 the next instruction to be executed.Oscillator and timing circuits need an external quartz crystal and frequency tuning capacitor,the frequency of 0-24MHz,basic beat of the pulse signal as the 89C51,the smallest time unit.12.单片机引脚结构图(图示)1.Vcc(40 脚,电源端,+5V)和 Vss(20 脚,接地端)2.外接晶体引脚XTAL1(19 脚)和XTAL2(18

30、 脚)。XTAL2接外部晶体和微调电容的一端,是内部振荡电路的输出端,XTAL1 接另一端,是内部振荡电路的输入端,振荡电路频率就是晶体的固有频率,要检查振荡电路是否正常工作,可用示波器查看XTAL2 端是否有脉冲输出。若采用外部时钟,则XTAL2 悬空,XTAL1接。External crystal pins XTAL1 is(19 feet)and XTAL2 are(18 feet).XTAL2 pick one end ofthe external crystal and fine-tuning capacitor,the output of the internal oscillat

31、ion circuitXTAL1 is connected to the other side,the input of the internal oscillation circuit,oscillation circuit frequency is the natural frequency of the crystal,to check the oscillationcircuit is working properly,can be used oscilloscope view XTAL2 whether the client is apulse output.If an 名师资料总结

32、-精品资料欢迎下载-名师精心整理-第 5 页,共 7 页 -external clock,XTAL2 should be left unconnected,XTAL1 is connected3.控制信号引脚RST、ALE、PSEN/和 EA/。RST(9 脚):保持两个机器周期高电平完成复位。ALE(Address latch enable,30 脚)89C51 正常工作时,ALE输出正脉冲信号,频率为振荡器频率的1/6,可以此判断芯片好坏。CPU访问片外存储器时,ALE输出信号作为锁存低8 位地址的控制信号。PSEN(Program Store Enable,29 脚)程序存储允许输出信号

33、端,当89C51 由片外程序存储器取指令时,每个机器周期输出2 个脉冲,也可以作为芯片正常工作的依据。EA(Enable Address,31 脚)外部程序存储器地址允许输入端,接高电平时CPU只访问内部Flash ROM,接低电平时只访问外部ROM Control signal pins,RST,ALE,PSEN/and EA/RST(9 feet):to maintain two machine cycles high to complete reset.ALE(Address the latch the enable,30 feet)89C51 work properly,the ALE

34、 output positive pulse signal,a frequency of 1/6 of the oscillatorfrequency,you can determine the chip is good or bad.CPU to access off-chip memory,the ALE output signal as a latched low eight address control signal.PSEN(ProgramStore Enable,program memory,29 feet)to allow the output signal terminal,

35、when the89C51 chip program memory instruction fetch per machine cycle output two pulses can be used as the basis of the chip work.EA(Enable the Address,31 feet)from external program memory address to allow the input,then the high CPU access only to the internal Flash ROM,then the low access to exter

36、nal ROM4.输入/输出端口P0-P3。准双向,就是在作为输入口使用时,应先写1,其中P3口有复用功能。Input/output ports P0-P3.Quasi-bidirectional,that is used as the input,you should writea P3 port multiplexing function13.89C51存储器:程序存储器64KB ROM 和数据存储器64KB RAM。ROM 用于存放编好的程序和表格数据,片内的Flash ROM 为 4KB,地址为0000H-0FFFH,片外最多可扩至 64KB ROM,地址为1000H-FFFFH,片内

37、外统一编址。RAM 用于存放运算的中间结果、数据暂存和缓冲、标志位等,片内256 字节,地址从0000H-00FFH,片外从 0100H-FFFFH。片内低128 字节 RAM 是真正的RAM 区,其中有32 字节(00-1F)为指定的通用工作寄存器区,而高128 字节为特殊功能寄存器区(SFR)。89C51 64KB ROM and data memory for the memory:program memory,64KB of RAM.ROM for storing programmed procedures and table data,on-chip Flash ROM 4KBadd

38、ress 0000H-0FFFH in the chip can be expanded up to 64KB ROM,the address1000H-FFFFH,the piece inside and outside the unified addressing.RAM used to storeintermediate results of operations for temporary data storage and buffering flag,on-chip256-byte address from 0000H-00FFH,off-chip register 0100H.-F

39、FFFH.The lower 128 bytes of on-chip RAM is really the RAM area,of which there are 32 bytes(00-1F)for the specified general purpose working registers,while the upper 128 bytes of special function registers(SFRs)14.振荡周期:晶振的振荡周期,为最小的时序单位。Oscillation period:the period of oscillation of the crystal,the m

40、inimum timing unit机器周期:12 个振荡周期,是计算机执行一种基本操作的时间单位,若采用6MHz晶体振荡器,则为2 微秒。Machine cycle:12 cycles of oscillation,is the computer to perform a basic operation ofthe unit of time,if using a 6MHz crystal oscillator,compared with 2 microseconds名师资料总结-精品资料欢迎下载-名师精心整理-第 6 页,共 7 页 -指令周期:执行一条指令所需时间,由1-4 个机器周期组成

41、。Instruction cycle:execute one instruction time required for,1-4 machine cycles15.片内 RAM 空间用 MOV 指令,片外RAM 空间用 MOVX指令。On-chip RAM space with the MOV instruction,off-chip RAM space using the MOVX instruction16.数据传送指令:以寄存器Rn 为目的操作数的指令(图示)Data transfer instructions:to register,Rn is the destination operand command(icon)算术运算指令:例(3-1)逻辑操作指令:累加器A 清 0 指令(只影响标志位P):CLR A Accumulator A clear instructions(only affects the flag P)累加器 A 取反指令(不影响标志位):CPL A Accumulator A negated command(does not affect the flag)名师资料总结-精品资料欢迎下载-名师精心整理-第 7 页,共 7 页 -

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 高考资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁