#### p11

##### Banned

Code:

```
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 14:43:01 05/22/2015
-- Design Name:
-- Module Name: lcd - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity lcd is
Port ( lcd : out STD_LOGIC_vector ( 7 downto 0);
rs : out STD_LOGIC;
rw : out STD_LOGIC;
enable: out std_logic);
end lcd;
architecture Behavioral of lcd is
begin
lcd ( 7 downto 4 ) <= "0010" after 10 ns ;-------- 4 bit interface-----------
lcd ( 3 downto 0) <= "1000" after 10 ns ;
enable <= '0' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
lcd ( 7 downto 4 ) <= "0010" after 10 ns ;-------- 4 bit interface-----------
lcd ( 3 downto 0) <= "1000" after 10 ns ;
enable <= '1' after 10 ns ;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
lcd ( 7 downto 4 ) <= "0010" after 10 ns ;-------- 4 bit interface-----------
lcd ( 3 downto 0) <= "1000" after 10 ns ;
enable <= '0' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
----------reset display--------------
lcd ( 7 downto 4 ) <= "0000" after 10 ns ;
lcd ( 3 downto 0) <= "0001" after 10 ns ;
enable <= '0' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
lcd ( 7 downto 4 ) <= "0000" after 10 ns ;
lcd ( 3 downto 0) <= "0001" after 10 ns ;
enable <= '1' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
lcd ( 7 downto 4 ) <= "0000" after 10 ns ;
lcd ( 3 downto 0) <= "0001" after 10 ns ;
enable <= '0' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
-------------- display on------------------
lcd ( 7 downto 4 ) <= "0000" after 10 ns ;
lcd ( 3 downto 0) <= "1110" after 10 ns ;
enable <= '0' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
lcd ( 7 downto 4 ) <= "0000" after 10 ns ;
lcd ( 3 downto 0) <= "1110" after 10 ns ;
enable <= '1' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
lcd ( 7 downto 4 ) <= "0000" after 10 ns ;
lcd ( 3 downto 0) <= "1110" after 10 ns ;
enable <= '0' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
------------------ bring cursor to the 1st position -------------
lcd ( 7 downto 4 ) <= "1000" after 10 ns ;
lcd ( 3 downto 0) <= "0000" after 10 ns ;
enable <= '0' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
lcd ( 7 downto 4 ) <= "1000" after 10 ns ;
lcd ( 3 downto 0) <= "0000" after 10 ns ;
enable <= '1' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
lcd ( 7 downto 4 ) <= "1000" after 10 ns ;
lcd ( 3 downto 0) <= "0000" after 10 ns ;
enable <= '0' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
--------------------- data display---------------------
lcd ( 7 downto 4 ) <= "0101" after 10 ns ;--------displaying p-----------
lcd ( 3 downto 0) <= "0000" after 10 ns ;
enable <= '1' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
lcd ( 7 downto 4 ) <= "0101" after 10 ns ;--------displaying p-----------
lcd ( 3 downto 0) <= "0000" after 10 ns ;
enable <= '0' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
lcd ( 7 downto 4 ) <= "0101" after 10 ns ;--------displaying p-----------
lcd ( 3 downto 0) <= "0000" after 10 ns ;
enable <= '1' after 10 ns;
rw <= '0' after 10 ns;
rs <= '0' after 10 ns;
end Behavioral;
```

here i have tried to diiaplay p in the first location of the first row . i have run the program , there is no syntax error , but i cant understand is there any logical error specially involving delay ...plz let me know if there is any specific delay required between 2 statement executions . here for safety i have applied a delay of 10 ns after each instruction.