Code Converters - PowerPoint PPT Presentation

Code Converters

1 / 23
Code Converters

Code Converters

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

1. Code Converters Section 3-4 Mano & Kime

2. Code Converters • BCD-to Excess-3 Code Converter • Hex-to-Seven-Segment Decoder • Lab 3 – ALU2 • Arithmetic and Logic Instructions • 7-Segment Decoder

3. BCD-to Excess-3 Code Converter

4. Maps for BCD-to-Excess-3 Code Converter

5. Logic Diagram of BCD-to-Excess-3 Code Converter

6. Excess3 inp(3:0) outp(3:0)

7. Note: inp(3:0) = [A, B, C, D] outp(3:0) = [W, X, Y, Z]

8. Code Converters • BCD-to Excess-3 Code Converter • Hex-to-Seven-Segment Decoder • Lab 3 – ALU2 • Arithmetic and Logic Instructions • 7-Segment Decoder

9. Hex-to-Seven-Segment Decoder

10. Turning on an LED

11. 7-Segment Display

12. a f b g e c d 7-Segment Display a b c d e f g 0 1 1 1 1 1 1 0 1 0 1 1 0 0 0 0 2 1 1 0 1 1 0 1 3 1 1 1 1 0 0 1 4 0 1 1 0 0 1 1 5 1 0 1 1 0 1 1 6 1 0 1 1 1 1 1 7 1 1 1 0 0 0 0

13. a f b g e c d 7-Segment Display a b c d e f g 8 1 1 1 1 1 1 1 9 1 1 1 1 0 1 1 A 1 1 1 0 1 1 1 b 0 0 1 1 1 1 1 C 1 0 0 1 1 1 0 d 0 1 1 1 1 0 1 E 1 0 0 1 1 1 1 F 1 0 0 0 1 1 1

14. Hex-to-Seven-Segment Decoder

15. a f b g e c d Note: a – g LOW to turn ON

16. Code Converters • BCD-to Excess-3 Code Converter • Hex-to-Seven-Segment Decoder • Lab 3 – ALU2 • Arithmetic and Logic Instructions • 7-Segment Decoder

17. sel y Instruction name “000” a + b + “001” b - a - “010” a and b AND “011” a or b OR “100” a xor b XOR “101” true if a = 0 false otherwise 0= “110” true if a < 0 false otherwise 0< “111” true if b > a (unsigned) false otherwise U> ALU2 – Arithmetic and Logic Instructions true = all 1’s false = all 0’s

18. Digilab2 – DIO1 Boards Four 7-segment displays dig1 dig2 dig3 dig4

19. Digilab2 Board – Common Anodes Pins A1A2 A3 A4 Pins AtoG(6 downto 0)

20. Digilab XLA LEDs 7-segment displays pushbuttons switches

21. Digilab Board dig4 dig3 dig2 dig1

22. Digilab XLA Board – Common Anodes Pins A4A3 A2 A1 Pins CA CB CC CD CE CF CG

23. LD(1:8) ALU2 seg7dec SW(5:8) a(3:0) AtoG(6:0) y1 y q AtoG SW(1:4) b(3:0) sel(2:0) A(1:4) “0001” ldg BTN(1:3) ‘1’ Lab3 Top-level Design – Lab 3 Display y on dig4