1 / 11

7-Segment Displays

7-Segment Displays. Digilent Spartan 3 Board Discussion D3.3. Spartan 3 Board. Spartan 3 Board. Turning on an LED Note: A zero turns on the LED. Spartan 3 Board. 7-Segment Decoder. a-g LOW to turn on segment. 7-Segment Display. seg7dec. q(3:0). AtoG(6:0). Truth table.

overton
Download Presentation

7-Segment Displays

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 7-Segment Displays Digilent Spartan 3 Board Discussion D3.3

  2. Spartan 3 Board

  3. Spartan 3 Board

  4. Turning on an LEDNote: A zero turns on the LED

  5. Spartan 3 Board

  6. 7-Segment Decoder a-g LOW to turn on segment

  7. 7-Segment Display seg7dec q(3:0) AtoG(6:0) Truth table q 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 q 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

  8. 7-Segment Decoder library IEEE; use IEEE.std_logic_1164.all; entity seg7dec is port (q: in STD_LOGIC_VECTOR(3 downto 0); AtoG: out STD_LOGIC_VECTOR(6 downto 0)); end seg7dec; seg7dec q(3:0) AtoG(6:0)

  9. architecture seg7dec_arch of seg7dec is begin process(q) begin case q is when "0000" => AtoG <= "0000001"; when "0001" => AtoG <= "1001111"; when "0010" => AtoG <= "0010010"; when "0011" => AtoG <= "0000110"; when "0100" => AtoG <= "1001100"; when "0101" => AtoG <= "0100100"; when "0110" => AtoG <= "0100000"; when "0111" => AtoG <= "0001101"; when "1000" => AtoG <= "0000000"; when "1001" => AtoG <= "0000100"; when "1010" => AtoG <= "0001000"; when "1011" => AtoG <= "1100000"; when "1100" => AtoG <= "0110001"; when "1101" => AtoG <= "1000010"; when "1110" => AtoG <= "0110000"; whenothers => AtoG <= "0111000"; endcase; endprocess; end seg7dec_arch;

  10. 7-Segment Display VHDL -- seg7dec with q select AtoG <= "1001111" when "0001", --1 "0010010" when "0010", --2 "0000110" when "0011", --3 "1001100" when "0100", --4 "0100100" when "0101", --5 "0100000" when "0110", --6 "0001111" when "0111", --7 "0000000" when "1000", --8 "0000100" when "1001", --9 "0001000" when "1010", --A "1100000" when "1011", --b "0110001" when "1100", --C "1000010" when "1101", --d "0110000" when "1110", --E "0111000" when "1111", --F "0000001" when others; --0 Behavior (Active LOW) AtoG seg7dec q(3:0) AtoG(6:0)

  11. .ucf file NET "AN<0>" LOC = "E13" ; NET "AN<1>" LOC = "F14" ; NET "AN<2>" LOC = "G14" ; NET "AN<3>" LOC = "d14" ; NET "AtoG<6>" LOC = "E14" ; NET "AtoG<5>" LOC = "G13" ; NET "AtoG<4>" LOC = "N15" ; NET "AtoG<3>" LOC = "P15" ; NET "AtoG<2>" LOC = "R16" ; NET "AtoG<1>" LOC = "F13" ; NET "AtoG<0>" LOC = "N16" ; NET "dp" LOC = "P16" ;

More Related