译码器chenyu_第1页
译码器chenyu_第2页
译码器chenyu_第3页
译码器chenyu_第4页
译码器chenyu_第5页
已阅读5页,还剩36页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 Class exerciserealize the logic function F with 3-to-8 decoder and logic gates.F = (X,Y,Z) ( 1, 2, 4, 5 )ABCG1G2AG2BY0Y1Y2Y3Y4Y5Y6Y774x1386.4 decoder 译码器Review of Last Classn6.4.1Binary Decoder (二进制译码器二进制译码器)nn-to- 2n decodernThe most common decoder circuit is an n-to-2n decoder or binary decoder.

2、Such a decoder has an n-bit binary input code and a 1-out-of-2n output code. Review of Last Class使能使能输入输入编码编码输出输出编码编码映射映射n位二进制码位二进制码2n中取中取1码码 0 X X 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 1 1 1 0 0 0inputsinputsEN I1 I0outputs Y3 Y2 Y1 Y0 The truth table for The truth table for a 2-to-4

3、binary decodera 2-to-4 binary decoderDesign it !Y3=EN.I1.I0Y2=EN.I1.I0Y1=EN.I1.I0Y0=EN.I1.I0Review of Last Classnn-to- 2n decoder2-to-4 2-to-4 decoderdecoderY0Y1Y2Y3I0I1ENYi = EN mi使能使能输入输入编码编码输出输出编码编码映射映射n位二进制码位二进制码2n中取中取1码码 0 X X 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 1 1 1 0 0 0input

4、sinputsEN I1 I0outputs Y3 Y2 Y1 Y0 The truth table for The truth table for a 2-to-4 binary decodera 2-to-4 binary decoder当输入使能端当输入使能端(EN)有效时有效时Yi = miDont care notation(无关符号无关符号)Review of Last Class6.4.2 Logic Symbols for Larger-Scale ElementsWith respect to active levels, its important to use a con

5、sistent convention to naming the internal signals and external pins.G1G2A-LG2B-LY0-LBCY7-LAReview of Last ClassnThe 74x138 is a commercially available MSI 3-to-8 decoder. n the 74x138 has active-low outputs. (P387)Review of Last Classm5M5Review of Last Class低位低位高位高位Yi = EN miG1G2A_LG2B_LENYi_L = Yi

6、= ( EN mi )EN = G1 G2A G2B = G1 G2A_L G2B_L Y0_LY1_LY7_LY2_LY3_LY4_LY5_LY6_LENm5用译码器和逻辑门实现逻辑函数总结用译码器和逻辑门实现逻辑函数总结F = (X,Y,Z) (0,3,6,7) = (X,Y,Z) (1,2,4,5)对于二进制译码器:对于二进制译码器:Yi = EN mi 当使能端有效时,当使能端有效时,Yi = mi对低电平有效输出:对低电平有效输出:Yi_L = Yi 当使能端有效时,当使能端有效时,Yi_L = mi = MiABCG1G2AG2BY0Y1Y2Y3Y4Y5Y6Y774x138用译码器

7、和逻辑门实现逻辑函数ZYXABCG1G2AG2BY0Y1Y2Y3Y4Y5Y6Y774x138F+5VF = (X,Y,Z) (0,3,6,7)当使能端有效时当使能端有效时Yi = mi对低电平有效输出:对低电平有效输出:Yi_L = Yi=mi用译码器和逻辑门实现逻辑函数ZYXABCG1G2AG2BY0Y1Y2Y3Y4Y5Y6Y774x138+5VFF = (X,Y,Z) (0,3,6,7)= M1 M2 M4 M5= m1 m2 m4 m5F = (X,Y,Z) ( 1, 2, 4, 5 )ZYXABCG1G2AG2BY0Y1Y2Y3Y4Y5Y6Y774x138+5VF 74x139 EN

8、74x139 Truth table? The 74x139 Dual 2-to-4 DecoderWhat is the equation for the external output signal 1Y0-L? 74x139 Truth table Example 3: The 74x139 Dual 2-to-4 Decoder1Y0-L=1G (1B 1A)How to design the 4-to-16 decoder?6.4.4 Cascading Binary Decoders (级联二进制译码器)级联二进制译码器)(P390)N0N1N2N3EN_L+5VD0_LD7_LD

9、8_LD15_L思路:思路: 1616个输出需要个输出需要 片片74x13874x138?Y0Y7ABCG1G2AG2BY0Y7ABCG1G2AG2BU1U2 任何时刻只有任何时刻只有一片在工作。一片在工作。 4 4个输入中,个输入中,哪些位控制片选哪些位控制片选哪些位控制输入哪些位控制输入Example 4:design the 4-to-16 decoderConsider: How to make a 5-to-32 Decoder with 3-to-8 Decoder? (思考:用思考:用74x138设计设计 5-32 译码器译码器)(32(32个输出需要多少片个输出需要多少片74x

10、138 74x138 ?) )( (控制任何时刻只有一片工作控制任何时刻只有一片工作) ) ( (利用使能端利用使能端) )Consider: How to make a 5-to-32 Decoder with 3-to-8 Decoder? (思考:用思考:用74x138设计设计 5-32 译码器译码器)Control inputs of three low-order bits of a 5-bit code word (5个输入的低个输入的低3位控制输入位控制输入)Control chips of two high-order bits of a 5-bit code word (5个

11、输入的高个输入的高2位控制片选位控制片选)Example 5:design the 5-to-32 decoderN4N3N2N1N0DEC0-7 DEC8-15 DEC16-23 DEC24-3100011011 74x139 (P391)BCD Decoder (二十进制译码器二十进制译码器)Inputs : 4-bit BCD codeOutputs :1-out-of 10 CodeY0Y9I0I1I2I3多余的多余的6 6个状态如何处理?个状态如何处理?输出均无效:拒绝输出均无效:拒绝“翻译翻译”作为任意项处理作为任意项处理 电路内部结构简单电路内部结构简单二二- -十十进进制制译译

12、码码器器0 0 0 0 0 0 0 10 0 1 00 0 1 10 1 0 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 01 1 1 10 1 1 1 1 1 1 1 1 11 0 1 1 1 1 1 1 1 11 1 0 1 1 1 1 1 1 11 1 1 0 1 1 1 1 1 11 1 1 1 0 1 1 1 1 11 1 1 1 1 0 1 1 1 11 1 1 1 1 1 0 1 1 11 1 1 1 1 1 1 0 1 11 1 1 1 1 1 1 1 0 11 1 1 1 1 1

13、1 1 1 01 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1I3 I2 I1 I00123456789Y0_L Y9_L伪伪码码任任 意意 项项6.4.8 Seven-Segment Decoders (七段显示译码器七段显示译码器) (P408)abcdefg dp公共阴极公共阴极abcdefgd pNormally use ( (常用的有常用的有) ):Light-Emitting Diodes(LED, ,半

14、导体数码管半导体数码管)Liquid-Crystal Display(LCD, ,液晶数码管液晶数码管)abcdefg dp公共阳极公共阳极nInput code: 4-bit BCD 输入信号:BCD码(用A3A2A1A0表示)nOutput Code: Seven-Segment Code 输出:七段码(的驱动信号)a g 1 表示亮(On),0 表示灭(Off)abcdefg111111011011010011111Seven-Segment Decoders(七段显示译码器)七七段段显显示示译译码码器器的的真真值值表表0 0 0 0 0 0 0 10 0 1 00 0 1 10 1 0

15、 00 1 0 10 1 1 00 1 1 11 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 01 1 1 11 1 1 1 1 1 00 1 1 0 0 0 01 1 0 1 1 0 11 1 1 1 0 0 10 1 1 0 0 1 11 0 1 1 0 1 10 0 1 1 1 1 11 1 1 0 0 0 01 1 1 1 1 1 11 1 1 0 0 1 10 0 0 1 1 0 10 0 1 1 0 0 10 1 0 0 0 1 11 0 0 1 0 1 10 0 0 1 1 1 10 0 0 0 0 0 0A3 A2 A1 A0a

16、b c d e f g01234567891011121314156.5 Encoder编码编码 ENCODER (P408)nIf the devices output code has fewer bits than the input code, the device is usually called an encoder. nProbably the simplest encoder to build is a 2n-to-n or binary encoder. encoder(编码器)(编码器)Binary encoder Y0Y1Y2I0I1I71 0 0 0 0 0 0 0

17、0 0 00 1 0 0 0 0 0 0 0 0 10 0 1 0 0 0 0 0 0 1 00 0 0 1 0 0 0 0 0 1 10 0 0 0 1 0 0 0 1 0 00 0 0 0 0 1 0 0 1 0 10 0 0 0 0 0 1 0 1 1 00 0 0 0 0 0 0 1 1 1 1I0 I1 I2 I3 I4 I5 I6 I7 Y2 Y1 Y0The truth table for a 8-to-3 binary decoder2ninputsnoutputsencoder (编码器)(编码器)Y0 = I1 + I3 + I5 + I7Y1 = I2 + I3 + I6

18、 + I7Y2 = I4 + I5 + I6 + I7前提:任何时刻只有前提:任何时刻只有 一个输入端有效。一个输入端有效。1 0 0 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 0 0 10 0 1 0 0 0 0 0 0 1 00 0 0 1 0 0 0 0 0 1 10 0 0 0 1 0 0 0 1 0 00 0 0 0 0 1 0 0 1 0 10 0 0 0 0 0 1 0 1 1 00 0 0 0 0 0 0 1 1 1 1I0 I1 I2 I3 I4 I5 I6 I7 Y2 Y1 Y0The truth table for a 8-to-3 binary de

19、coderBinary encoder Y0Y1Y2I0I1I72ninputsnoutputsencoder (编码器)(编码器)Y0 = I1 + I3 + I5 + I7Y1 = I2 + I3 + I6 + I7Y2 = I4 + I5 + I6 + I7前提:任何时刻只有前提:任何时刻只有 一个输入端有效。一个输入端有效。Trouble:When more than One Inputs are asserted?优先级(优先级(prioritypriority)1 0 0 0 0 0 0 0 0 0 00 1 0 0 0 0 0 0 0 0 10 0 1 0 0 0 0 0 0 1

20、 00 0 0 1 0 0 0 0 0 1 10 0 0 0 1 0 0 0 1 0 00 0 0 0 0 1 0 0 1 0 10 0 0 0 0 0 1 0 1 1 00 0 0 0 0 0 0 1 1 1 1I0 I1 I2 I3 I4 I5 I6 I7 Y2 Y1 Y0The truth table for a 8-to-3 binary decoderIf multiple requests can be made simultaneously , how can the encoding device decide which? nThe solution is to assign

21、 priority to the input lines, so that when multiple requests are asserted, the encoding device produces the number of the highest-priority requestor. Such a device is called a priority encoder. (P408)6.5.1 Priority Encoders (P410 ) (优先编码器)A2A1A0IDLEI7I6I5I4I3I2I1I0将将 I0I7 转换为转换为 H0H7,保证其中,任何时刻只有一个有效保证其中,任何时刻只有一个有效H7 = I7H6 = I6 I7H5 = I5 I6 I7H0 = I0 I1 I2 I6 I7A2 = H4 + H5 + H6 + H7A1 = H2 + H3 + H6 + H7A0 =

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论