7-Segment Displays Lecture L6.1 Section 6.3. Turning on an LED.

Slides:



Advertisements
Similar presentations
Adders Module M8.1 Section 6.2. Adders Half Adder Full Adder TTL Adder.
Advertisements

Modulo-N Counters Module M10.4 Section 7.2.
Encoders Module M9.3 Section 6.3. Encoders Priority Encoders TTL Encoders.
Demultiplexers Module M6.4 Section 6.4. Demultiplexers YIN 1 x 4 DeMUX d0d1 Y0 Y1 Y2 Y3 Y0 Y1 Y2 Y3 d1d0 0 0 YIN YIN YIN
Shift Registers Module M11.1 Section 7.3.
Seven Segment Display. What's A 7-Segment Display? A 7-segment display is a package with 7 bar-shaped LEDs arranged to allow the display of many useful.
LED Display. LED Typical LED forward bias voltage: 1.5 to 2.0 V Typical currents needed to light LED range from 2 to 15 mA.
Magnitude Comparator Lecture L6.4 Section 6.1.
Binary Counters Module M10.3 Section 7.2. Counters 3-Bit Up Counter 3-Bit Down Counter Up-Down Counter.
Digital to Analog (D/A) Converter Discussion D2.2.
7-Segment Displays Lecture L6.7 Section 6.5. Turning on an LED.
Binary-to-BCD Converter Lecture L6.2 Section 6.5 pp
1 Homework Reading –Tokheim, Section 5-10, 7-4 Machine Projects –Continue on MP4 Labs –Continue labs with your assigned section.
Using State Machines as Control Circuits Lecture L9.4.
Multiplier Lecture L7.3 Section 10.4 (p.276) Section 7.3 (Handout)
Multiplexers Lecture L6.4 Section 6.4.
Subtractors Module M8.2 Section 6.2. Subtractors Half Subtractor Full Subtractor Adder/Subtractor - 1 Adder/Subtractor - 2.
Designing State Machines Lecture L9.2 Handout Section 9.2.
Datapaths Lecture L10.2 Sections 10.2, ALU (Sect. 7.5 and Lab 6)
Arbitrary Waveforms Lecture L8.5 Section 7.2. CLK DQ !Q CLK DQ !Q CLK DQ !Q Q0Q0.D Q1 Q2 Q1.D Q2.D s s s s3 0 1.
Counters as State Machines Lecture L9.1 Handout Section 9.1.
Equality Detector Lecture L6.1 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
Flip-Flops Module M10.2 Section 7.1. D Latch Q !Q CLK D !S !R S R X 0 Q 0 !Q 0 D CLK Q !Q Note that Q follows D when the clock in high, and.
Binary Counters Lecture L8.3 Section 8.2. Counters 3-Bit Up Counter 3-Bit Down Counter Up-Down Counter.
Shifter Lecture L7.4 Group HW #4 Section 10.3.
Modulo-N Counters Lecture L8.4 Section 7.2. Counters Modulo-5 Counter 3-Bit Down Counter with Load and Timeout Modulo-N Down Counter.
Introduction to Computer Engineering by Richard E. Haskell Number Systems Module M3.1 Sections
Codes and Code Converters
Code Converters Module M7.1 Section 6.5. Code Converters Binary-to-BCD Converters ABEL TRUTH_TABLE Command.
Arithmetic Logic Unit (ALU) Lecture L7.5 Section 7.5.
Combinational Logic Discussion D2.5. Combinational Logic Combinational Logic inputsoutputs Outputs depend only on the current inputs.
Pulse-Width Modulated DAC Lecture 11.3 Section 11.5.
Multiplexers Module M6.1 Section 6.4. Multiplexers A 4-to-1 MUX TTL Multiplexer A 2-to-1 MUX.
2’s Complement 4-Bit Saturator
Adders Lecture L7.1 Section 6.2 Section 10.4 (pp )
Shifters Lecture L7.4 Section 7.4. MODULE shift TITLE 'shifter' DECLARATIONS " INPUT PINS " D3..D0 PIN 11,7,6,5; D = [D3..D0]; s2..s0 PIN 3,2,1; S.
Flip-Flops Lecture L8.2 Section 8.1. Recall the !S-!R Latch !S !R Q !Q !S !R Q !Q X Y nand 1 0 Set 1 0.
Digital to Analog (D/A) Converter Discussion D2.2.
Decoders Module M9.1 Section 6.3. Decoders TTL Decoders.
Arithmetic Logic Unit (ALU) Lecture L9.3 Lab 10. ALU CB = carry_borrow flag Z = zero flag (Z = 1 if Y = 0)
Shift Registers Lecture L6.6 Section Bit Shift Register.
Equality Detector Lecture L6.3 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
7-Segment Displays Module M7.2 Section 6.5. Turning on an LED Common Anode.
Address Decoders Lecture L6.10 Section 6.3. MOUSE Layout PROM 2716 RAM 6810 MPU 6802 PIA 6821 Address Bus (16 lines) Data Bus (8 lines) To outside world.
Lab 6 :Digital Display Decoder: 7 Segment LED display Slide #2 Slide #3 Slide #4 Slide #5 Slide #6 Slide #7 Display Decoder Fundamentals LT Control Input.
Lecture 13 Problems (Mano)
Module 2 – Digital I/O Output: Use the digital port to provide signals to display a number on a seven segment light emitting display (LED) display by wiring.
ITEC 352 Lecture 5 Low level components(3). Low level components Review Multiplexers Demultiplexer Minterm/Maxterm Karnaugh Map.
The miniDragon+ Board and CodeWarrior Lecture L2.1.
Lab 6 Module M8.3. EXPERIMENT 6: Adder/Subtractor PRE-LAB 1.Read and understand text Sec. 6.2, Adders and Subtractors, pages Using textbook.
Reaction Timer Project
1 Homework Reading –Tokheim, Section 5-1, 5-2, 5-3, 5-7, 5-8 Machine Projects –Continue on MP4 Labs –Continue labs with your assigned section.
1 CS 151: Digital Design Chapter 3: Combinational Logic Design 3-1Design Procedure CS 151: Digital Design.
Digital Systems Section 11 Decoders and Encoders.
Basic Electricity and Electronics Module Three Microprocessor Basics Copyright © Texas Education Agency, All rights reserved.
Tutorial 9 Module 8 – 8.1,8.2,8.3. Question 1 Distinguish between vectored and non-vectored interrupts with an example Build a hardware circuit that can.
Basic Electricity and Electronics Module Two Basic Electronics Copyright © Texas Education Agency, All rights reserved.
Full Adders Vector Notation Multiplexers and Decoders Ellen Spertus MCS 111 September 6, 2001.
Homework Reading Machine Projects Labs
Magnitude Comparator Module M5.2 Section 6.1.
Lab02 :Logic Gate Fundamentals:
Display Devices 7 segment led display.
Counters as State Machines
Shift Registers Lecture L8.6 Section 8.3.
Designing Digital Circuits Using Hardware Description Languages (HDLs)
Homework Reading Tokheim, Section 5-10, 7-4.
Design Example “Date of Birth Problem”
Magnitude Comparator Lecture L6.2 Section 6.1.
Find the value of g. Find the value of h. 105° h g 75°
Advanced Encryption Standard (AES)
Presentation transcript:

7-Segment Displays Lecture L6.1 Section 6.3

Turning on an LED

This is what we use in Lab

7-Segment Display

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

7-Segment Display a b c d e f g a b c d e f g A b C d E F

K-Map for Segment e D3 D2 D1 D D3 & D2 D1 & !D0 !D2 & !D0 e = D3 & D2 # !D2 & !D0 # D3 & D1 # D1 & !D0 D3 & D1

MODULE hex7seg INTERFACE ([D3..D0] -> [a,b,c,d,e,f,g]); TITLE 'hex to seven segment display decoder' " a " --- hex-to-seven-segment decoder " f| g |b " --- " e| d |c " --- DECLARATIONS " Input Pins " D3..D0 PIN; D = [D3..D0]; " 4-bit input vector " Output Pins " [a,b,c,d,e,f,g] PIN ISTYPE 'com'; " 7-segment LED display segs = [a,b,c,d,e,f,g]; hex7seg.abl Makes this module available in higher-level modules

a b c d e f g A b C d E F ; EQUATIONS when (D == 0) then segs = 7E; when (D == 1) then segs = 30; when (D == 2) then segs = 6D; when (D == 3) then segs = 79; when (D == 4) then segs = 33; when (D == 5) then segs = 5B; when (D == 6) then segs = 5F; when (D == 7) then segs = 70; when (D == 8) then segs = 7F; when (D == 9) then segs = 7B; when (D == 0A) then segs = 77; when (D == 0B) then segs = 1F; when (D == 0C) then segs = 4E; when (D == 0D) then segs = 3D; when (D == 0E) then segs = 4F; when (D == 0F) then segs = 47; END hex7seg hex7seg.abl (cont.) HEX

ON,OFF = 1,0; " for common cathode 16; EQUATIONS "[ a, b, c, d, e, f, g ] when (D == 0) then segs = [ ON, ON, ON, ON, ON, ON, OFF]; when (D == 1) then segs = [OFF, ON, ON, OFF,OFF,OFF,OFF]; when (D == 2) then segs = [ ON, ON, OFF,ON, ON, OFF, ON]; when (D == 3) then segs = [ ON, ON, ON, ON, OFF,OFF, ON]; when (D == 4) then segs = [OFF, ON, ON, OFF,OFF,ON, ON]; when (D == 5) then segs = [ ON, OFF,ON, ON, OFF,ON, ON]; when (D == 6) then segs = [ ON, OFF,ON, ON, ON, ON, ON]; when (D == 7) then segs = [ ON, ON, ON, OFF,OFF,OFF,OFF]; when (D == 8) then segs = [ ON, ON, ON, ON, ON, ON, ON]; when (D == 9) then segs = [ ON, ON, ON, ON, OFF,ON, ON]; when (D == 0A) then segs = [ ON, ON, ON, OFF,ON, ON, ON]; when (D == 0B) then segs = [OFF, OFF,ON, ON, ON, ON, ON]; when (D == 0C) then segs = [ ON, OFF,OFF,ON, ON, ON, OFF]; when (D == 0D) then segs = [OFF, ON, ON, ON, ON, OFF, ON]; when (D == 0E) then segs = [ ON, OFF,OFF,ON, ON, ON, ON]; when (D == 0F) then segs = [ ON, OFF,OFF,OFF,ON, ON, ON]; END hex7seg Alternate form of EQUATIONS

a = (D0 & D2 & !D3 # !D1 & !D2 & D3 # !D0 & !D2 # D1 & !D3 # !D0 & D3 # D1 & D2); b = (D0 & D1 & !D3 # D0 & !D1 & D3 # !D0 & !D1 & !D3 # !D0 & !D2 # !D2 & !D3); c = (D2 & !D3 # !D2 & D3 # D0 & !D1 # !D1 & !D2 # D0 & !D2); Compiled Equations Note they are reduced

d = (D1 & !D2 & !D3 # D0 & !D1 & D2 # !D0 & D1 & D2 # D0 & !D2 & D3 # !D0 & !D1 & !D2 # !D1 & D3); e = (!D0 & !D2 # D2 & D3 # !D0 & D1 # D1 & D3); f = (!D1 & D2 & !D3 # !D2 & D3 # !D0 & !D1 # !D0 & D2 # D1 & D3); g = (!D1 & D2 & !D3 # D1 & !D2 # !D0 & D1 # !D2 & D3 # D0 & D3); Compiled Equations (cont.) Note that d is NOT completely reduced Make Karnaugh map for d

16; truth_table (D -> [ a, b, c, d, e, f, g ]) 0 -> [ ON, ON, ON, ON, ON, ON, OFF]; 1 -> [OFF, ON, ON, OFF, OFF, OFF, OFF]; 2 -> [ ON, ON, OFF, ON, ON, OFF, ON]; 3 -> [ ON, ON, ON, ON, OFF, OFF, ON]; 4 -> [OFF, ON, ON, OFF, OFF, ON, ON]; 5 -> [ ON, OFF, ON, ON, OFF, ON, ON]; 6 -> [ ON, OFF, ON, ON, ON, ON, ON]; 7 -> [ ON, ON, ON, OFF, OFF, OFF, OFF]; 8 -> [ ON, ON, ON, ON, ON, ON, ON]; 9 -> [ ON, ON, ON, ON, OFF, ON, ON]; 0A -> [ ON, ON, ON, OFF, ON, ON, ON]; 0B -> [OFF, OFF, ON, ON, ON, ON, ON]; 0C -> [ ON, OFF, OFF, ON, ON, ON, OFF]; 0D -> [OFF, ON, ON, ON, ON, OFF, ON]; 0E -> [ ON, OFF, OFF, ON, ON, ON, ON]; 0F -> [ ON, OFF, OFF, OFF, ON, ON, ON]; END hex7seg Another alternate form of EQUATIONS

a = (D3 & D2 & D1 & D0 # !D3 & D2 & D1 & D0 # !D3 & !D2 & D1 & D0 # !D3 & D2 & !D1 & D0 # D3 & !D2 & !D1 & D0 # D3 & D2 & D1 & !D0 # !D3 & D2 & D1 & !D0 # D3 & !D2 & D1 & !D0 # !D3 & !D2 & D1 & !D0 # D3 & D2 & !D1 & !D0 # D3 & !D2 & !D1 & !D0 # !D3 & !D2 & !D1 & !D0); b = (!D3 & D2 & D1 & D0 # !D3 & !D2 & D1 & D0 # D3 & D2 & !D1 & D0 # D3 & !D2 & !D1 & D0 # !D3 & !D2 & !D1 & D0 # D3 & !D2 & D1 & !D0 # !D3 & !D2 & D1 & !D0 # !D3 & D2 & !D1 & !D0 # D3 & !D2 & !D1 & !D0 # !D3 & !D2 & !D1 & !D0); Compiled Equations Note they are NOT reduced Sum of all minterms

c = (!D3 & D2 & D1 & D0 # D3 & !D2 & D1 & D0 # !D3 & !D2 & D1 & D0 # D3 & D2 & !D1 & D0 # !D3 & D2 & !D1 & D0 # D3 & !D2 & !D1 & D0 # !D3 & !D2 & !D1 & D0 # !D3 & D2 & D1 & !D0 # D3 & !D2 & D1 & !D0 # !D3 & D2 & !D1 & !D0 # D3 & !D2 & !D1 & !D0 # !D3 & !D2 & !D1 & !D0); d = (D3 & !D2 & D1 & D0 # !D3 & !D2 & D1 & D0 # D3 & D2 & !D1 & D0 # !D3 & D2 & !D1 & D0 # D3 & !D2 & !D1 & D0 # D3 & D2 & D1 & !D0 # !D3 & D2 & D1 & !D0 # !D3 & !D2 & D1 & !D0 # D3 & D2 & !D1 & !D0 # D3 & !D2 & !D1 & !D0 # !D3 & !D2 & !D1 & !D0);

e = (D3 & D2 & D1 & D0 # D3 & !D2 & D1 & D0 # D3 & D2 & !D1 & D0 # D3 & D2 & D1 & !D0 # !D3 & D2 & D1 & !D0 # D3 & !D2 & D1 & !D0 # !D3 & !D2 & D1 & !D0 # D3 & D2 & !D1 & !D0 # D3 & !D2 & !D1 & !D0 # !D3 & !D2 & !D1 & !D0); f = (D3 & D2 & D1 & D0 # D3 & !D2 & D1 & D0 # !D3 & D2 & !D1 & D0 # D3 & !D2 & !D1 & D0 # D3 & D2 & D1 & !D0 # !D3 & D2 & D1 & !D0 # D3 & !D2 & D1 & !D0 # D3 & D2 & !D1 & !D0 # !D3 & D2 & !D1 & !D0 # D3 & !D2 & !D1 & !D0 # !D3 & !D2 & !D1 & !D0);

g = (D3 & D2 & D1 & D0 # D3 & !D2 & D1 & D0 # !D3 & !D2 & D1 & D0 # D3 & D2 & !D1 & D0 # !D3 & D2 & !D1 & D0 # D3 & !D2 & !D1 & D0 # D3 & D2 & D1 & !D0 # !D3 & D2 & D1 & !D0 # D3 & !D2 & D1 & !D0 # !D3 & !D2 & D1 & !D0 # !D3 & D2 & !D1 & !D0 # D3 & !D2 & !D1 & !D0);

main7seg.abl

MODULE main7seg TITLE 'hex to seven segment display decoder' DECLARATIONS hex7seg INTERFACE([D3..D0] -> [a,b,c,d,e,f,g]); d7L FUNCTIONAL_BLOCK hex7seg; d7R FUNCTIONAL_BLOCK hex7seg; " Input Pins " L3..L0 PIN 11,7,6,5;" Left Switches S L = [L3..L0];" 4-bit input vector R3..R0 PIN 4,3,2,1;" Right Switches S R = [R3..R0];" 4-bit input vector

" Output Pins " [aa,bb,cc,dd,ee,ff,gg] PIN 57,58,61,62,63,65,66 ISTYPE 'com'; "Leftmost (tens) 7-segment LED display [a,b,c,d,e,f,g] PIN 15,18,23,21,19,14,17 ISTYPE 'com'; " Rightmost (units) 7-segment LED display EQUATIONS [aa,bb,cc,dd,ee,ff,gg] = d7L.[a,b,c,d,e,f,g]; d7L.[D3..D0] = L; [a,b,c,d,e,f,g] = d7R.[a,b,c,d,e,f,g]; d7R.[D3..D0] = R; END main7seg