P
Prime
Guest
A happy new year to all !
Hi, I'm trying to do a simple binart count output to a bunch of leds and
running into problems. I am using the Xilinx XC2-XL board, and
programming the XC9572-XL chip. I have attached to this a group of 4 leds
(through a 74HC373). The problem is that instead of a binary output on
the leds I just get random patterns. I have verified that the latch is
correctly being held high for the 373.
I am sure that the leds are correctly wired up, because when I just
output set values to them, they light in the correct binary pattern.
- Do a binary count on the LEDS on the DIO4 Board
-- using XC9572, and a clock input.
-- This is setup for a 1.8MHz clock.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- Uncomment the following lines to use the declarations that are
-- provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
entity LedCount is
Port(
Clock : in std_logic;
Latch : out std_logic;
Leds : out std_logic_vector(7 downto 0);
OBLed : out std_logic
);
end LedCount;
architecture Behavioral of LedCount is
signal Count : std_logic_vector(19 downto 0);
signal LedCount : std_logic_vector(7 downto 0) := x"00";
begin
Latch <= '1';
A: Process(Clock)
begin
if Clock='1' and clock'event then
Count <= Count+1;
end if;
end process;
B: Process(Count)
begin
OBLed <= Count(19);
if (Count = x"FFFFF") then
LedCount <= LedCount + 1;
Leds <= LedCount;
end if;
end process;
end Behavioral;
If anyone can see anything obviously wrong with this I would be most
greatfull.
Also does anyone know any newbie (new to VHDL, I've been doing
electronics and programming for several years now ), guides for VHDL,
especially ones aimed towards the Xilinx chips/toolset.
Cheers.
Phill.
Hi, I'm trying to do a simple binart count output to a bunch of leds and
running into problems. I am using the Xilinx XC2-XL board, and
programming the XC9572-XL chip. I have attached to this a group of 4 leds
(through a 74HC373). The problem is that instead of a binary output on
the leds I just get random patterns. I have verified that the latch is
correctly being held high for the 373.
I am sure that the leds are correctly wired up, because when I just
output set values to them, they light in the correct binary pattern.
- Do a binary count on the LEDS on the DIO4 Board
-- using XC9572, and a clock input.
-- This is setup for a 1.8MHz clock.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- Uncomment the following lines to use the declarations that are
-- provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
entity LedCount is
Port(
Clock : in std_logic;
Latch : out std_logic;
Leds : out std_logic_vector(7 downto 0);
OBLed : out std_logic
);
end LedCount;
architecture Behavioral of LedCount is
signal Count : std_logic_vector(19 downto 0);
signal LedCount : std_logic_vector(7 downto 0) := x"00";
begin
Latch <= '1';
A: Process(Clock)
begin
if Clock='1' and clock'event then
Count <= Count+1;
end if;
end process;
B: Process(Count)
begin
OBLed <= Count(19);
if (Count = x"FFFFF") then
LedCount <= LedCount + 1;
Leds <= LedCount;
end if;
end process;
end Behavioral;
If anyone can see anything obviously wrong with this I would be most
greatfull.
Also does anyone know any newbie (new to VHDL, I've been doing
electronics and programming for several years now ), guides for VHDL,
especially ones aimed towards the Xilinx chips/toolset.
Cheers.
Phill.