Altera_Forum
Honored Contributor
9 years agoScrolling Text - 7 Segment Display on DE0-CV
I would like to make scrolling text with the six 7 segment displays on the DE0-CV. I am trying to implement this project using VHDL. I am unsure how to approach this because I am unsure how to create an array that would cover all the pins from the six 7 segment displays. I do see that HEX0 has 7 assignments in the assignment editor and they are assigned like this (by using the system builder from the DE0-CV_v.1.2.1_SystemCD).http://www.alteraforum.com/forum/attachment.php?attachmentid=13067&stc=1
Would it be possible to create one output that could handle all the pins from the six 7 segment displays? I will also attach the vhdl code I have so far (mostly guessing and checking).LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY hexscroll IS
PORT(
CLOCK_50 : IN STD_LOGIC;
HEX0 : OUT STD_LOGIC_VECTOR(6 downto 0);
HEX1 : OUT STD_LOGIC_VECTOR(6 downto 0);
HEX2 : OUT STD_LOGIC_VECTOR(6 downto 0);
HEX3 : OUT STD_LOGIC_VECTOR(6 downto 0);
HEX4 : OUT STD_LOGIC_VECTOR(6 downto 0);
HEX5 : OUT STD_LOGIC_VECTOR(6 downto 0));
END hexscroll;
ARCHITECTURE blinkled OF hexscroll IS
SIGNAL pulse : STD_LOGIC_VECTOR (6 downto 0) := B"010_0100";--variable to hold value of LED
SIGNAL count : INTEGER RANGE 0 TO 49999999 := 0; --counter variable
TYPE HEX IS ARRAY (41 downto 0) OF STD_LOGIC;
BEGIN
counter:PROCESS (CLOCK_50)
BEGIN
IF CLOCK_50'EVENT AND CLOCK_50 = '1' THEN
IF count = 49999999 THEN
count <= 0;
pulse <= NOT pulse;
ELSE
count <= count + 1;
END IF;
END IF;
END PROCESS counter;
HEX0(6 downto 0) <= pulse;--B"111_1001";
--HEX0(6 downto 0) <= (others => pulse);
--HEX0(6 downto 0) <= B"111_1001";
--HEX1(6 downto 0) <= B"000_1000";
--HEX2(6 downto 0) <= B"000_1100";
--HEX3(6 downto 0) <= B"100_1000";
--HEX4(6 downto 0) <= B"000_0110";
--HEX5(6 downto 0) <= B"001_0010";
END blinkled;