Library IEEE;
use IEEE.STD_LOGIC_SIGNED;
use IEEE.STD_LOGIC_UNSIGNED;
use ieee.std_logic_1164.all;
use IEEE.numeric_std.all;
entity ltestinggpiowithdelay is
port( GPIO_0 : in std_logic_vector(2 downto 0);
CLK : in std_logic;
DIN : in std_logic_vector (2 DOWNTO 0);
q : out std_logic_vector(2 downto 0));
end ltestinggpiowithdelay ;
architecture bufferwithGpio_arc of ltestinggpiowithdelay is
begin
process(GPIO_0)
begin
if (GPIO_0(0)='1') then q<=GPIO_0(2 downto 0);
else q<= "000";
end if;
end process;
clk_proc:process(CLK)
variable count:std_logic_vector(2 downto 0) := "000";
begin
if (CLK'EVENT AND CLK = '1') then
if GPIO_0(0) = '1' then
count := DIN;
else count := "count+1 >";
end if;
end if;
q <= count after 50 ns;
end process clk_proc;
end bufferwithGpio_arc;
mr daixiwen so my programming is basically to read the input from the PIR sensor and i would like to maintain the output for sometime when the PIR detects movement as to turn on a relay etc. please check whether my programming is correct or not. now when i compile the program it seems a new error stated( object with std_logic type cannot contain character 'C'object with std_logic type cannot contain character 'C').. i am already blank already. please guide me.