# Seven-Segment Decoder - Oakland University

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 a q0 q1 q2 q3 seg7dec a b c d e

f g dp f b g e c d dp Turning on an LED No current no light +5V R

GAL output pin light +1.7V R R= 1 LED Current +5V +5V voltage = current +0.2V 0

LED 5 1.7 -3 15 x 10 GAL output pin = 220 ohms 7-Segment Display a +5V f b g e c

d a b c d e f g 7-Segment Display a f b g e

c d 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 b g e c d 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 a q0 q1 q2 q3 seg7dec a b c d e f g dp

f b g e c d dp a f b g e c d

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 a(n-1:0) n-line ALU2 b(n-1:0) sel(2:0) true = all 1s

false = all 0s 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> y(n-1:0) Digilab2 DIO1 Boards Four 7-segment displays dig1 dig2 dig3

dig4 Digilab2 Board Common Anodes Pins Pins A1 A2 A3 A4 AtoG(6 downto 0) Digilab XLA 7-segment displays LEDs pushbuttons switches Digilab Board dig4

dig3 dig2 dig1 Digilab XLA Board Common Anodes Pins Pins A4 A3 A2 A1 CA CB CC CD CE CF CG Top-level Design Lab 3 LD(1:8) ALU2 SW(5:8) seg7dec

a(3:0) y SW(1:4) y1 q AtoG AtoG(6:0) Display y on dig4 b(3:0) sel(2:0) 0001 BTN(1:3) 1

Lab3 A(1:4) ldg

## Recently Viewed Presentations

• How many chromosomes would a cell created through mitosis have in an organism with a bone cell with 26 chromosomes? * With your partner(s), move to a lab station with a microscope. Use the scanning, lower power, then high power...
• Bank Failures. a. Banks close and loose \$\$\$ b. People . default. ... OBJ #2 -Describe how the Great Depression affected people. Who was the president when it started, and what did he do to help? Who tried to help...
• Finally, you don't have to give up. all your games. and all your friends. just to play in a different room in the house.
• Chapter 8 Erosional Forces Section 8-2 Glaciers ... Esker! 2 Types of Glaciers Continental glaciers cover 10% of the Earth, mostly near Antarctica and Greenland. The continental glaciers are huge masses of Ice and snow, and are thicker than some...
• Overview GOLMEST Gain Attention Overview Learning Objectives/Lesson Purpose Method and Media Evaluation Safety Transition Gain Attention Draws students into topic. Should be related to material. Should actually get students attention. Samples: Videos, stories, jokes, etc. End with WIIFM. Overview What...
• Title: Poultry Farming Author: Holly Butt Last modified by: Claire Theobald Created Date: 5/24/2013 8:38:38 AM Document presentation format: On-screen Show (4:3)
• Weak Duality between Objective Values. The primal objective function evaluated at any feasible solution to a minimize primal is greater than or equal to ( ) the objective function value of the corresponding dual evaluated at any dual feasible solution....
• Control Flow Hijack DefensesCanaries, DEP, and ASLR. David Brumley. Carnegie Mellon University