0% found this document useful (0 votes)
18 views

Code Converters: Section 3-4 Mano & Kime

This document discusses code converters and components used in Lab 3 including a BCD-to-excess-3 code converter, a hex-to-seven-segment decoder, and an ALU2. It provides details on how these components work, such as how the code converter maps binary codes to excess-3 codes and how the hex-to-seven-segment decoder turns on specific LED segments to display numbers and letters. It also describes the Digilab board and how the top-level design is used to display results from the ALU2 on the seven-segment displays.

Uploaded by

ramanaidu1
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Code Converters: Section 3-4 Mano & Kime

This document discusses code converters and components used in Lab 3 including a BCD-to-excess-3 code converter, a hex-to-seven-segment decoder, and an ALU2. It provides details on how these components work, such as how the code converter maps binary codes to excess-3 codes and how the hex-to-seven-segment decoder turns on specific LED segments to display numbers and letters. It also describes the Digilab board and how the top-level design is used to display results from the ALU2 on the seven-segment displays.

Uploaded by

ramanaidu1
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

Code Converters

Section 3-4 Mano & Kime

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

BCD-to Excess-3 Code Converter

Maps for BCD-to-Excess-3 Code Converter

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

inp(3:0)

Excess3

outp(3:0)

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

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

Hex-to-Seven-Segment Decoder

q0 q1 q2 q3 seg7dec

a b c d e f g dp

Turning on an LED
No current +5V R LED no light +5V GAL output pin 1

Current +5V R R= voltage current = +1.7V LED

light +0.2V GAL output pin 0

5 - 1.7 s -3 = 220 ohm 15 x 10

7-Segment Display
a +5V f g b

7-Segment Display
a
f g e c b

0 1 2 3 4 5 6 7

a 1 0 1 1 0 1 1 1

b 1 1 1 1 1 0 0 1

c 1 1 0 1 1 1 1 1

d 1 0 1 1 0 1 1 0

e 1 0 1 0 0 0 1 0

f 1 0 0 0 1 1 1 0

g 0 0 1 1 1 1 1 0

7-Segment Display
a
f g e c b

8 9 A b C d E F

a 1 1 1 0 1 0 1 1

b 1 1 1 0 0 1 0 0

c 1 1 1 1 0 1 0 0

d 1 1 0 1 1 1 1 0

e 1 0 1 1 1 1 1 1

f 1 1 1 1 1 0 1 1

g 1 1 1 1 0 1 1 1

Hex-to-Seven-Segment Decoder
q0 q1 q2 q3 seg7dec a b c d e f g dp

a f g e c d b

Note: a g LOW to turn ON

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

ALU2 Arithmetic and Logic Instructions


sel
a(n-1:0) b(n-1:0) n-line ALU2

y a+b b-a a and b a or b a xor b true if a = 0 false otherwise true if a < 0 false otherwise true if b > a (unsigned) false otherwise

Instruction name + AND OR XOR 0= 0< U>

000
y(n-1:0)

001 010

sel(2:0)

011 100

true = all 1s false = all 0s

101 110 111

Digilab2 DIO1 Boards

Four 7-segment displays

dig1

dig2

dig3

dig4

Digilab2 Board Common Anodes


Pins A1 A2 A3 A4

Pins

AtoG(6 downto 0)

Digilab XLA

7-segment displays

LEDs pushbuttons

switches

Digilab Board

dig4

dig3

dig2

dig1

Digilab XLA Board Common Anodes


Pins A4 A3 A2 A1

Pins

CA CB CC CD CE CF CG

Top-level Design Lab 3


LD(1:8) ALU2 SW(5:8) SW(1:4) a(3:0) y b(3:0) sel(2:0) 0001 BTN(1:3) 1
y1

seg7dec q
AtoG

AtoG(6:0)

Display y on dig4
A(1:4)

ldg

Lab3

You might also like