《单片机原理及应用考试复习知识点.pdf》由会员分享,可在线阅读,更多相关《单片机原理及应用考试复习知识点.pdf(10页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、学习资料收集于网络,仅供参考学习资料单片机原理及应用考试复习知识点第 1 章 计算机基础知识考试知识点:1、各种进制之间的转换(1)各种进制转换为十进制数方法:各位按权展开相加即可。(2)十进制数转换为各种进制方法:整数部分采用“除基取余法”,小数部分采用“乘基取整法”。(3)二进制数与十六进制数之间的相互转换方法:每四位二进制转换为一位十六进制数。2、带符号数的三种表示方法(1)原码:机器数的原始表示,最高位为符号位(0+1-),其余各位为数值位。(2)反码:正数的反码与原码相同。负数的反码把原码的最高位不变,其余各位求反。(3)补码:正数的补码与原码相同。负数的补码为反码加1。原码、反码的
2、表示范围:-127+127,补码的表示范围:-128+127。3、计算机中使用的编码(1)BCD 码:每 4 位二进制数对应1 位十进制数。(2)ASCII 码:7 位二进制数表示字符。09 的 ASCII 码 30H39H,A 的 ASCII 码41H,a的 ASCII 码 61H。第 2 章 80C51 单片机的硬件结构考试知识点:1、80C51 单片机的内部逻辑结构单片机是把CPU、存储器、输入输出接口、定时/计数器和时钟电路集成到一块芯片上的微型计算机,主要由以下几个部分组成。(1)中央处理器CPU 包括运算器和控制器。运算电路以ALU 为核心,完成算术运算和逻辑运算,运算结果存放于A
3、CC 中,运算结果的特征存放于PSW 中。控制电路是单片机的指挥控制部件,保证单片机各部分能自动而协调地工作。程序计数器 PC 是一个 16 位寄存器,PC 的内容为将要执行的下一条指令地址,具有自动加1 功能,以实现程序的顺序执行。(2)存储器分类:随机存取存储器RAM:能读能写,信息在关机后消失。可分为静态RAM(SRAM)和动态 RAM(DRAM)两种。只读存储器:信息在关机后不会消失。掩膜 ROM:信息在出厂时由厂家一次性写入。可编程 PROM:信息由用户一次性写入。学习资料收集于网络,仅供参考学习资料可擦除可编程EPROM:写入后的内容可由紫外线照射擦除。电可擦除可编程EEPROM:
4、可用电信号进行清除和改写。存储容量:存储容量指存储器可以容纳的二进制信息量,M 位地址总线、N 位数据总线的存储器容量为 2MN 位。80C51 单片机的存储器有内部RAM(128B,高 128B 为专用寄存器)、外部 RAM(64KB)、内部 ROM(4KB 掩膜 ROM)、外部 ROM(64KB)。(3)输入输出接口4 个 8 位并行 I/O 口(P0、P1、P2、P3)(4)其它资源一个全双工串行口、5 个中断源、2个 16 位的定时/计数器、时钟电路。2、80C51 单片机的信号引脚(1)电源部分:VCC 接+5V、VSS 接地。(2)时钟电路部分:XTAL1 和 XTAL2 接晶振。
5、1 个机器周期=6 个状态=12 个拍节6MHZ 的晶体机器周期2us,12MHZ 的晶体机器周期1us。(3)I/O 口部分:P0 8 位数据总线/地址总线低8 位、P1用户口、P2地址高 8 位、P3第二功能。(4)控制部分:地址锁存控制信号ALE,用于控制把P0 口输出的低8 位地址送入锁存器锁存地起来。外部程序存储器读选通信号PSEN,低电平有效,以实现外部ROM 单元的读操作。访问程序存储器控制信号EA,低电平时只读外部ROM,高电平时先读内部ROM,再读外部 ROM。复位信号RST,当输入的复位信号延续2 个机器周期以上高电平时即为有效。复位值:PC=0000H,SP=07H,P0
6、=0FFH。3、内部 RAM 的基本结构与功能80C51 的内部数据存储器低128 单元区,称为内部RAM,地址为007FH。(1)寄存器区(00 1FH)共分为 4 组,组号依次为0、1、2、3,每组有8 个寄存器,在组中按R7R0 编号。由PSW 中 RS1、RS0 位的状态组合来决定哪一组。(2)位寻址区(20H2FH)可对单元中的每一位进行位操作,16 个字节单元共128个可寻址位,位地址为 007FH。位起始地址D0=(字节地址-20H)*8(3)用户 RAM 区(30H7FH)堆栈、缓冲区堆栈是在内部RAM 中开辟的,最大特点就是“后进先出”的数据操作原则。两项功能:保护断点和保护
7、现场。两种操作:进栈和出栈。SP堆栈指针,它的内容就是堆栈栈顶单元的地址。4、专用寄存器(内部数据存储器高128 单元)(1)累加器A(ACC)(2)寄存器B(3)程序状态字PSW CY进位标志位,最高位的进位或借位。AC半进位标志位,低4 位向高 4位的进位或借位。OV溢出标志位,同符号数相加,结果为异符号,有溢出;异符号数相减,结果和文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR
8、2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV
9、9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2
10、A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:
11、CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7
12、HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 Z
13、N2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编
14、码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1学习资料收集于网络,仅供参考学习资料减数符号相同,有溢出。P A 中 1 的个数,奇数个P=1,偶数个P=0。(4)数据指针DPTR:80C51 中惟一一个供用户使用的16 位寄存器。高 8 位 DPH,低8 位 DPL。第 3 章 80C51 单片机指令系统考试知识点:1、寻址方式(1)立即寻址(#data,#data16)例:MOV A,#00H(2)直接寻址(direct)内部 RAM:00 7FH、特殊功能寄存器例:MOV A,00H(3)寄存器寻址(A、B、Rn、DPTR)(4)寄存器间接寻址(Ri、DPTR
15、)例:MOVX A,DPTR(5)变址寻址(A+DPTR,A+PC)例:MOVC A,A+DPTR(6)位寻址(bit)202FH:007FH、特殊功能寄存器例:MOV C,00H(7)相对寻址(rel)例:JZ rel 2、数据传送类指令(1)内部 RAM 数据传送指令MOV 目的,源;目的源交换指令:XCH A,direct/Rn/Ri;A 和源交换XCHD A,Ri;只换低 4 位SWAP A;A 的高低 4 位交换注意:A 作目的操作数会影响P。PUSH direct POP direct(2)外部 RAM 数据传送指令MOVX A,Ri/DPTR;外部地址内容A MOVXRi/DPT
16、R,A;A外部地址内容(3)ROM 数据传送指令MOVC A,A+DPTR/A+PC;查表指令3、算术运算指令(1)加法指令ADD/ADDC A,#data/direct/Rn/Ri;会影响CY、AC、OV、P INC A/direct/Rn/Ri/DPTR;加 1,P DA A;十进制调整,大于9 加 6(2)减法指令SUBB A,#data/direct/Rn/Ri;会影响CY、AC、OV、P DEC A/direct/Rn/Ri;减 1(3)乘除指令MUL AB;(A)*(B)BA,会影响CY=0,OV,P DIV AB;(A)/(B)的商 A,余数 B 4、逻辑运算及移动指令文档编码:
17、CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7
18、HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 Z
19、N2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编
20、码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z
21、7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6
22、 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文
23、档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1学习资料收集于网络,仅供参考学习资料(1)逻辑运算指令ANL/ORL/XRL A,#data/direct/Rn/Ri ANL/ORL/XRL direct,A/#data 与清 0,或置1,异或取反CLR/CPL A;清 0 和取反(2)移位指令RL/RR/RLC/RRC
24、 A 注意:每左移一位相当于乘2,每右移一位相当于除2,带进位的移会影响CY 和 P。5、控制转移类指令(1)无条件转移指令LJMP addr16;addr16PC,64KB AJMP addr11;(PC)+2 PC,addr11PC100,2KB SJMP rel;(PC)+2+rel PC,256B JMP A+DPTR;(A)+(DPTR)PC,64KB(2)条件转移指令累加器 A 判 0 转移指令JZ rel;A 为 0 JNZ rel;A 不为 0 比较不相等转移指令CJNE A/Rn/Ri,#data,rel CJNE A,direct,rel 注意:第一操作数和第二操作数不相等
25、,程序转移,若第一大于第二,CY=0,第一小于第二,CY=1。第一操作数和第二操作数相等,程序顺序执行,CY=0。减 1 不为 0 转移指令DJNZ Rn/direct,rel;(Rn/direct)-1 不为 0,程序转移。(3)调用和返回指令LCALL addr16;(PC)+3 PC,先入低8 位,再入高8 位,addr16PC ACALL addr11;(PC)+2 PC,先入低8 位,再入高8 位,addr11PC100 RET;先出高8 位,再出低8 位6、位操作类指令(1)位传送指令MOV C,bit MOV bit,C(2)位赋值指令CLR C/bit SETB C/bit(3
26、)位逻辑运算指令ANL/ORL C,bit 或/bit CPL C/bit 注意:实现逻辑表达式(4)位控制转移指令JC rel;(CY)=1 JNC rel;(CY)=0 JB bit,rel;(bit)=1 文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6
27、ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档
28、编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10
29、Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I
30、6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1
31、文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V
32、10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1学习资料收集于网络,仅供参考学习资料JNB bit,
33、rel;(bit)=0 JBC bit,rel;(bit)=1,转移,清0 第 4 章 80C51 单片机汇编语言程序设计考试知识点:1、汇编语言的语句格式【标号:】操作码【操作数】【;注释】标号:语句地址的标志符号。操作码:语句执行的操作内容,用指令助记符表示。操作数:为指令操作提供数据。注释:对语句的解释说明。2、伪指令起始地址 ORG、结束 END、赋值 EQU、字节 DB、字 DW、空 DS、位 BIT 3、汇编语言程序的基本结构形式(1)顺序结构(2)分支结构(3)循环结构:数据传送问题、求和问题4、定时程序例:延时100ms 的子程序,设晶振频率6MHZ。DELAY:MOV R5,
34、#250 LOOP2:MOV R4,#49 LOOP1:NOP NOP DJNZ R4,LOOP1 DJNZ R5,LOOP2 RET 5、查表程序(1)要查找的数据在表中的位置给A(2)表的首地址给DPTR(3)MOVC A,A+DPTR(4)数据表第 5 章 80C51 单片机的中断与定时考试知识点:1、中断源和中断请求标志位中断名称中断请求标志中断向量外部中断0 IE0 0003H T0 中断TF0 000BH 外部中断1 IE1 0013H T1 中断TF1 001BH 串行发送中断TI 0023H 串行接收中断RI 0023H 2、和中断相关的寄存器的设置文档编码:CR2F4K8V1
35、0Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7
36、I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E
37、1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8
38、V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4
39、O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G
40、2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4
41、K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1学习资料收集于网络,仅供参考学习资料(1)定时器控制寄存器TCON 格式如下:位D7 D6 D5 D4 D3 D2 D1 D0 TCON TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0 位地址8F 8E 8D 8C 8B 8A 89 88 IT0=0,为电平触发方式。低电平有
42、效。IT0=1,为边沿触发方式。输入脚上电平由高到低的负跳变有效。IE0=1,说明有中断请求,否则IE0=0。(2)中断允许控制寄存器IE 其各位的定义如下:位D7 D6 D5 D4 D3 D2 D1 D0 代号EA ES ET1 EX1 ET0 EX0 EA:开放或禁止所有中断。ES:开放或禁止串行通道中断。ET1:开放或禁止定时/计数器 T1 溢出中断。EX1:开放或禁止外部中断源1。ET0:开放或禁止定时/计数器 T0 溢出中断。EX0:开放或禁止外部中断源0。(3)中断优先级控制寄存器IP 各位的定义如下:位D7 D6 D5 D4 D3 D2 D1 D0 代号PS PT1 PX1 PT
43、0 PX0 1 为高优先级、0 为低优先级。如果同级的多个中断请求同时出现,则按 CPU 查询次序确定哪个中断请求被响应。查询次序为:外部中断0、T0 中断、外部中断1、T1 中断、串行中断。3、响应中断的必要条件(1)有中断源发出中断请求。(2)中断允许寄存器IE 相应位置“1”,CPU 中断开放(EA=1)。(3)无同级或高级中断正在服务。(4)现行指令执行到最后一个机器周期且已结束。若现行指令为RETI 或需访问特殊功能寄存器IE 或 IP 的指令时,执行完该指令且其紧接着的指令也已执行完。中断响应的主要内容是由硬件自动生成一条长调用指令,指令格式为“LCALL addr16”。这里的
44、addr16 就是程序存储器中断区中相应中断的入口地址。4、中断程序设计(1)在 0000H 处存放一条无条件转移指令转到主程序。(2)在入口地址处存放一条无条件转移指令转到中断服务子程序。(3)设置触发方式(IT0/IT1)(4)设置 IE 和 IP。(5)设置 SP。(6)原地踏步。0INT0INT文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4
45、O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G
46、2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4
47、K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1
48、J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J
49、4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2
50、F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9X1J4O7I6 ZN2A8J4G2E1文档编码:CR2F4K8V10Z7 HV9