LEDs 7-Segment Displays

Slides:



Advertisements
Similar presentations
2’s Complement 4-Bit Saturator
Advertisements

Counters Discussion D8.3.
Traffic light contoller using FSM
Modulo-N Counters Module M10.4 Section 7.2.
Verilog in transistor level using Microwind
CPSC 321 Computer Architecture Andreas Klappenecker
CDA 3100 Recitation Week 11.
Verilog.
Supplement on Verilog adder examples
EE 361 Fall 2003University of Hawaii1 Hardware Design Tips EE 361 University of Hawaii.
Shift Registers Module M11.1 Section 7.3.
Verilog Modules for Common Digital Functions
7-Segment Displays Lecture L6.1 Section 6.3. Turning on an LED.
Table 7.1 Verilog Operators.
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.
//HDL Example 6-1 // //Behavioral description of //Universal shift register // Fig. 6-7 and Table 6-3 module shftreg.
ECE 272 Xilinx Tutorial. Workshop Goals Learn how to use Xilinx to: Draw a schematic Create a symbol Generate a testbench Simulate your circuit.
7-Segment Displays Lecture L6.7 Section 6.5. Turning on an LED.
Top-level VHDL Designs
Pulse-Width Modulated DAC
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.
Introduction to Verilog (Behavioral Modeling). Agenda Gate Delays and User-Defined Primitives Behavioral Modeling Design Examples Hands-on Practice.
Binary Counters Lecture L8.3 Section 8.2. Counters 3-Bit Up Counter 3-Bit Down Counter Up-Down Counter.
Arbitrary Waveform Discussion 12.2 Example 34. Recall Divide-by-8 Counter Use q2, q1, q0 as inputs to a combinational circuit to produce an arbitrary.
Counters Discussion 12.1 Example 33. Counters 3-Bit, Divide-by-8 Counter 3-Bit Behavioral Counter in Verilog Modulo-5 Counter An N-Bit Counter.
2-to-1 Multiplexer: if Statement Discussion D7.1 Example 4.
Digilent Spartan 3 Board Discussion D3.3
7-Segment Displays Module M7.2 Section 6.5. Turning on an LED Common Anode.
Generic Multiplexers: Parameters Discussion D7.5 Example 8.
Multiplexers Lecture L6.6v Section 6.2. Multiplexers A Digital Switch A 2-to-1 MUX A 4-to-1 MUX A Quad 2-to-1 MUX The Verilog if…else Statement TTL Multiplexer.
Introduction to Verilog Multiplexers. Introduction to Verilog Verilog Hardware Description Language (Verilog HDL) released by Gateway Design Automation.
Top-level Verilog Designs Discussion D9.1 Example 12.
D Flip-Flops in Verilog Discussion 10.3 Example 27.
Quad 2-to-1 Multiplexer Discussion D7.4 Example 7.
Digital Logic Review Discussion D8.7.
7-Segment Display DIO1 Board Verilog.
VHDL Examples Subra Ganesan Reference: Professor Haskell’s Notes,
Code Converters Section 3-4 Mano & Kime.
Figure 1.1 The Altera UP 3 FPGA Development board
Engineering 100 Section 250 Combinational Logic -- Examples 9/13/2010.
Verilog Intro: Part 2. Procedural Blocks There are two types of procedural blocks in Verilog. – initial for single-pass behavior: initial blocks execute.
Figure 6.1. A 2-to-1 multiplexer.
The miniDragon+ Board and CodeWarrior Lecture L2.1.
Concepts of Engineering and Technology Copyright © Texas Education Agency, All rights reserved.
Introduction Verilog is a HARDWARE DESCRIPTION LANGUAGE (HDL) A hardware description language is a language or means used to describe or model a digital.
Detectors (UV-Vis) 1. Phototube 2. Photomultiplier Tube (PMT) 3. Si Photodiode 4. Photodiode Array (PDA) 5. Charge Coupled Device (CCD) 6. Charge Injection.
Assignment 7  參考 Verilog_Numbers_Displays.pdf ,並完成實驗。
Traffic Lights Discussion D8.3a. Recall Divide-by-8 Counter Use Q2, Q1, Q0 as inputs to a combinational circuit to produce an arbitrary waveform. s0 0.
LECTURE OUTLINE Electronic Properties 2 Electronic Properties 2.
ELECTRONICS An electronics system has 3 parts – input, process, output.
1 Higher Physics Unit 3 Optoelectronics Semiconductors.
Finite State Machine (FSM) Nattha Jindapetch December 2008.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL State Machines Anselmo Lastra.
ECEN 248 Lab 2: Logic Minimization and Karnaugh Maps
1 Electrical Fundamentals We need some understanding of electrical fundamentals to do the lab exercises. Electric Circuit Consists of: –Power Source: Battery,
Multiplexers Section Topics Multiplexers – Definition – Examples – Verilog Modeling.
ECE 448 Lab 3 FPGA Design Flow Based on Xilinx ISE and ISim. Using Seven-Segment Displays, Buttons, and Switches.
1 4-Integrating Peripherals in Embedded Systems (cont.)
Transistors According to Dictionary.com a transistor is:
Designing Combinational Logic Circuits in Verilog - 1
TODAY’S OUTLINE Verilog Codings Concurrent and Sequential If-else
Logic Gates.
COMP211 Computer Logic Design Introduction to the DE2 Board
ENG6530 Reconfigurable Computing Systems
Logic Design Review – 2 Basic Combinational Circuits
Discussion D8.1 Kerns & Irwin Sections , 10-10
Designing Digital Circuits Using Hardware Description Languages (HDLs)
Lab 1. Introduction to the DE2 Board
Lecture 4. Introduction to the DE2 Board
Reconfigurable Computing (EN2911X, Fall07)
Presentation transcript:

LEDs 7-Segment Displays Discussion 7.2 Sections 10-2, 10-4, 13-8

Covalent bonds -- Insulator http://electronics.howstuffworks.com/diode1.htm

Semiconductors Adding a very small amount of B or Ga to Si makes a p-type semi-conductor with a missing electron (a hole) Adding a very small amount of P or As to Si makes an n-type semi-conductor with an extra electron

Diodes + - http://www.mtmi.vu.lt/pfk/funkc_dariniai/diod/index.html

Light Emmitting Diode LED hn + - http://electronics.howstuffworks.com/led1.htm

Turning on an LED

Turning on an LED This is what we use in Lab

7-Segment Display

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 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

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 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

7-Segment Display Truth table D a b c d e f g 0 1 1 1 1 1 1 0 seg7dec D(3:0) AtoG(6:0) Truth table D 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 D 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

K-Map for Segment e e = D3 & D2 | ~D2 & ~D0 | D3 & D1 | D1 & ~D0 00 01 11 10 D3 D2 00 1 1 01 1 D1 & ~D0 D3 & D2 11 1 1 1 1 10 1 1 1 D3 & D1 ~D2 & ~D0

7-Segment Display Behavior Verilog seg7dec D(3:0) AtoG(6:0) case(D) 0: AtoG = 7'b1111110; 1: AtoG = 7'b0110000; 2: AtoG = 7'b1101101; 3: AtoG = 7'b1111001; 4: AtoG = 7'b0110011; 5: AtoG = 7'b1011011; 6: AtoG = 7'b1011111; 7: AtoG = 7'b1110000; 8: AtoG = 7'b1111111; 9: AtoG = 7'b1111011; 'hA: AtoG = 7'b1110111; 'hb: AtoG = 7'b0011111; 'hC: AtoG = 7'b1001110; 'hd: AtoG = 7'b0111101; 'hE: AtoG = 7'b1001111; 'hF: AtoG = 7'b1000111; default: AtoG = 7'b1111110; // 0 endcase Behavior seg7dec D(3:0) AtoG(6:0)

Verilog hex7seg.v a f b g e c d module hex7seg(D,AtoG); input [3:0] D; output [6:0] AtoG; reg [6:0] AtoG; always @(D) case(D) 0: AtoG = 7'b1111110; 1: AtoG = 7'b0110000; 2: AtoG = 7'b1101101; 3: AtoG = 7'b1111001; 4: AtoG = 7'b0110011; 5: AtoG = 7'b1011011; 6: AtoG = 7'b1011111; 7: AtoG = 7'b1110000; 8: AtoG = 7'b1111111; 9: AtoG = 7'b1111011; 'hA: AtoG = 7'b1110111; 'hb: AtoG = 7'b0011111; 'hC: AtoG = 7'b1001110; 'hd: AtoG = 7'b0111101; 'hE: AtoG = 7'b1001111; 'hF: AtoG = 7'b1000111; default: AtoG = 7'b1111110; // 0 endcase endmodule hex7seg.v Verilog a b c d e f g

SW7seg.v Verilog AAtoGG AtoG // Title : Toggle switches to 7-Segment Display // Author : R. E. Haskell module SW7seg(SW,LEDR,AtoG,AAtoGG); input [7:0] SW; output [7:0]LEDR; output [6:0] AtoG; output [6:0] AAtoGG; wire [6:0] AtoG; wire [6:0] AAtoGG; wire [7:0] LEDR; assign LEDR = SW; hex7seg d7L(.D(SW[7:4]),.AtoG(AAtoGG)); hex7seg d7R(.D(SW[3:0]),.AtoG(AtoG)); endmodule AAtoGG AtoG

Wiring up the top-level design in Verilog AAtoGG AtoG hex7seg d7L(.D(SW[7:4]),.AtoG(AAtoGG)); hex7seg d7R(.D(SW[3:0]),.AtoG(AtoG));

Wiring up the top-level design in Verilog AAtoGG AtoG hex7seg d7L(.D(SW[7:4]),.AtoG(AAtoGG)); hex7seg d7R(.D(SW[3:0]),.AtoG(AtoG));

SW7seg.ucf #PACE: Start of PACE I/O Pin Assignments NET "AAtoGG<0>" LOC = "p66" ; NET "AAtoGG<1>" LOC = "p65" ; NET "AAtoGG<2>" LOC = "p63" ; NET "AAtoGG<3>" LOC = "p62" ; NET "AAtoGG<4>" LOC = "p61" ; NET "AAtoGG<5>" LOC = "p58" ; NET "AAtoGG<6>" LOC = "p57" ; NET "AtoG<0>" LOC = "p17" ; NET "AtoG<1>" LOC = "p14" ; NET "AtoG<2>" LOC = "p19" ; NET "AtoG<3>" LOC = "p21" ; NET "AtoG<4>" LOC = "p23" ; NET "AtoG<5>" LOC = "p18" ; NET "AtoG<6>" LOC = "p15" ; NET "LEDR<0>" LOC = "p44" ; NET "LEDR<1>" LOC = "p43" ; NET "LEDR<2>" LOC = "p41" ; NET "LEDR<3>" LOC = "p40" ; NET "LEDR<4>" LOC = "p39" ; NET "LEDR<5>" LOC = "p37" ; NET "LEDR<7>" LOC = "p35" ; NET "SW<0>" LOC = "p1" ; NET "SW<1>" LOC = "p2" ; NET "SW<2>" LOC = "p3" ; NET "SW<3>" LOC = "p4" ; NET "SW<4>" LOC = "p5" ; NET "SW<5>" LOC = "p6" ; NET "SW<6>" LOC = "p7" ; NET "SW<7>" LOC = "p11" ; SW7seg.ucf

hex7seg.v