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

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.