executing optical sensors with vhdl

Guest #4814315
Rate this post
useful
not useful
Hello everybody, and thank you for having me here with you.
i'm having troubles executing this optical sensor module that i created 
physically using VHDL in collaboration with DE-2/115
the pic i added should explain what i am trying to do... i want to be 
able to make this work by pressing one of the buttons on my board which 
cause a LED to light
this is the code i've written so far:
and for some reason it's not working :/

LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
USE IEEE.STD_LOGIC_ARITH.ALL;
entity mouse_lab IS
port(reset,clock_in: in STD_LOGIC;
IF2: IN STD_LOGIC;
LED1: OUT STD_LOGIC);
END mouse_lab;
architecture behave OF mouse_lab IS
BEGIN
PROCESS (clock_in,IF2)
BEGIN
if reset = '0' then
led1 <='1';
else
IF clock_in'event and clock_in = '1' then
if IF2 = '0' then
led1 <='0';
else
led1 <='1';
end if;
end if;
end if;
END process;
END behave;
Attached files:

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now