资源描述
单击此处编辑母版标题样式,单击此处编辑母版文本样式,第二级,第三级,第四级,第五级,*,基于功能器件的组合逻辑,教学基本要求,1.,掌握编码、译码、加法器、数值比较器、数据选择器、数据分配器等各种逻辑功能的描述特点;,2.,了解实现上述各种逻辑功能的典型部件(,MSI,器件)的内部电路构成;,3.,通过阅读,MSI,器件的功能表掌握各功能器件的基本应用;,4.,掌握典型功能器件的扩展应用;,1,2.4,编码与编码器,2.4.1,编码的概念及常用编码,2.4.2,基于小规模门的编码电路设计,2.4.2,集成编码器,2,编码:把一个特定的信息用一个二进制数码来表示称为编码;,存在两类编码,编码器:,能将每一组输入信息或数目变换为相应二进码输出;即能,完成特定编码功能的逻辑电路;,数目的编码,信息的编码,2.4.1,编码的概念与分类,码制:在编制代码时需要遵循的规则;,3,几种常用编码,二,-,十进制(数)编码(,BCD,码),BCD,编码表,二进制(数)码,有权码:,8421,码、,2421,码、,5421,码、,4221,码,无权码:余,3,码、余,3,格雷码、右移码,二进制(信息)码,二进制数码和信息码表,典型码:格雷码、奇偶校验码、,ASCII,码,若需编码的一组信息有,N,项,则需要的二进制数码的位数,n,应满足:,4,2.4.2,编码器的小规模门电路实现,非优先编码器与优先编码器,非优先编码器:各个编码输入信号无优先权;若多个编码输入信号同时有效,输出可能不可预料。,优先编码器:各个编码输入信号按预先设定的优先级别,优先编码器只对其中优先权最高的信号进行编码。同时输入两个以上的有效编码信号,输出确定。,5,十个按键,输出代码,控制使能标志,1.,数字键盘输入,8421BCD,码编码器分析,(,1,)逻辑图,6,(,2,)功能表,输,入,输,出,S,0,S,1,S,2,S,3,S,4,S,5,S,6,S,7,S,8,S,9,D,8,D,4,D,2,D,1,GS,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,0,1,1,1,1,1,1,0,1,1,1,1,0,1,0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,0,1,1,1,1,0,1,1,1,1,1,1,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,0,0,0,0,1,该编码器为输入低电平有效,1.,键盘输入,8421BCD,码编码器,7,1.,优先编码器,74148,逻辑图,8,个信号输入端,I0,I7,使能输入端,(Is),3,个编码输出端,(,QcQbQa,),编码器工作状态标志,(,Qex,),输出使能标志,(Qs),2.4.3,集成电路编码器,8,3.,优先编码器,74148,的逻辑功能表,输,入,输,出,/Is,I0,I1,I2,I3,I4,I5,I6,I7,Qc,Qb,Qa,/,Qex,/Qs,H,H,H,H,H,H,L,H,H,H,H,H,H,H,H,H,H,H,H,L,L,L,L,L,L,L,H,L,L,H,L,L,H,L,H,L,L,H,H,L,H,L,L,H,L,L,H,H,H,L,H,H,L,H,L,L,H,H,H,H,H,L,L,L,H,L,L,H,H,H,H,H,H,L,H,L,H,L,L,H,H,H,H,H,H,H,H,L,L,H,L,L,H,H,H,H,H,H,H,H,H,H,L,H,/Is,=1,,,电路不工作,,/Qs,=,/,Qex,=1,,,QcQbQa,=111,/Is,=0,,,电路工作,无有效低电平输入,,QcQbQa,=111,,,/Qs,=0,,,/,Qex,=1,;,/Is,=0,,,电路工作,输入,I0I7,分别有低电平输入时,,QcQbQa,为,07,的编码输出,,/Qs=1,,,/,Qex,=0,。,9,引脚图,示意框图,2.,优先编码器,74148,的示意框图、引脚图,10,2.4.4,编码器的应用简介,1.,编码器的功能扩展,例:用,74LS148,扩展成为,16,线,-,4,线编码器。,16,线,-,4,线编码器,功能表。,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,3,2,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,1,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,11,2,片,148,,设定级别高低。,Y,EX,Y,12,Y,11,Y,10,S,148,Y,S,I,7,I,6,I,5,I,4,I,3,I,2,I,1,I,0,Y,EX,Y,22,Y,21,Y,20,S,148,Y,S,I,7,I,6,I,5,I,4,I,3,I,2,I,1,I,0,低位片,(1),高位片,(2),按,设定级别,利用,Y,S,和,S,端子进行片联设计。,Y,EX,Y,22,Y,21,Y,20,S,148,Y,S,I,7,I,6,I,5,I,4,I,3,I,2,I,1,I,0,Y,EX,Y,12,Y,11,Y,10,S,148,Y,S,I,7,I,6,I,5,I,4,I,3,I,2,I,1,I,0,低位片,(1),高位片,(2),12,Y,EX,Y,22,Y,21,Y,20,S,148,Y,S,I,7,I,6,I,5,I,4,I,3,I,2,I,1,I,0,Y,EX,Y,12,Y,11,Y,10,S,148,Y,S,I,7,I,6,I,5,I,4,I,3,I,2,I,1,I,0,低位片,(1),高位片,(2),关于输出的分析和处理。,反码输出形式时,,,利用扩展输出,Y,EX,端子功能。高位片工作时,输出为,Y,EX2,Y,22,Y,21,Y,20,,低位片工作时,输出为,Y,EX2,Y,12,Y,11,Y,10,。,13,Y,22,Y,21,Y,20,和,Y,12,Y,11,Y,10,用与门合并和,Y,EX2,构成,4,个输出端。,&,&,&,Y,EX,Y,22,Y,21,Y,20,S,高位片,(2),Y,S,I,7,I,6,I,5,I,4,I,3,I,2,I,1,I,0,Y,EX,Y,12,Y,11,Y,10,S,低位片,(1),Y,S,I,7,I,6,I,5,I,4,I,3,I,2,I,1,I,0,16,线,4,线优先编码器,14,高位片的,S,1,=0,,,首先允许对输入,A,8,A,15,编码,则,Y,S2,=1,,,S,1,=1,,,高位片编码时,低位片被封锁。此时,,Y,EX2,=0,,和,Y,22,Y,21,Y,20,构成,4,个反码输出端子。低位片输出端全为“,1”,。,若,A,8,A,15,都是高电平,(,无效输入,),,即均无编码请求,则,Y,S2,=0,,,S,1,=0,,,允许低位片对输入,A,0,A,7,编码。此时,,Y,EX2,=1,,和,Y,12,Y,11,Y,10,构成,4,个反码输出端子。高位片输出端全为“,1”,。,Z,3,=,Y,EX2,、,Z,2,=,Y,12,Y,22,、,Z,1,=,Y,11,Y,21,、,Z,0,=,Y,10,Y,20,构成四位二进制反码输出。,反码输出,16,4,线优先编码器电路如图,3.2.9,所示。,15,反码输出,16,线,-,4,线编码器,实际工程电路,3.3k*8,+5V,0 0,1 1,2 2,3,4,Y,EX,5,6,Y,S,7,S,148,0 0,1 1,2 2,3,4,Y,EX,5,6,Y,S,7,S,148,3.3k*8,+5V,&,&,&,Z,0,Z,1,Z,2,Z,3,16,几种,BCD,编码表,十进制数,8421,码,2421,码,4221,码,5121,码,余,3,码,右移码,余,3,格雷码,0,0000,0000,0000,0000,0011,00000,0010,1,0001,0001,0001,0001,0100,10000,0110,2,0010,0010,0010,0010,0101,11000,0111,3,0011,0011,0011,0011,0110,11100,0101,4,0100,0100,0110,0111,0111,11110,0100,5,0101,1011,0111,1000,1000,11111,1100,6,0110,1100,1100,1100,1001,01111,1101,7,0111,1101,1101,1101,1010,00111,1111,8,1000,1110,1110,1110,1011,00011,1110,9,1001,1111,1111,1111,1100,00001,1010,17,二进制数码和信息码表,N,自然进制数,格雷码,格雷码奇校验,8421,偶校验,N,自然进制数,格雷码,格雷码奇校验,8421,偶校验,0,0000,0000,00001,00000,8,1000,1100,11001,10001,1,0001,0001,00010,00011,9,1001,1101,11010,10010,2,0010,0011,00111,00101,10,1010,1111,11111,3,0011,0010,00100,00110,11,1011,1110,11100,4,0100,0110,01101,01001,12,1100,1010,10101,5,0101,0111,01110,01010,13,1101,1011,10110,6,0110,0101,01011,01100,14,1110,1001,10011,7,0111,0100,01000,01111,15,1111,1000,10001,18,
展开阅读全文