--- Quote Start ---
Start by drawing your design. The www can help you. Use your favorite search engine and search for UART or rs232.
--- Quote End ---
--- Quote Start ---
Probably further details ie block diagram would be helpful to illustrate your target implementation.
--- Quote End ---
this is my code (out1 is clock 9600 from component that conected to this component code):
library ieee;
use ieee.std_logic_1164.all;
--here, there is one more "use ieee" that i do not remember (not numeric)
entity rxd is
port( out1: in std_logic; --clock 9600hz
rxd: std_logic;
led: std_logic; --to check if the data "00111111" is recieved
);
end entity;
architecture arc_rxd of rxd is
signal cnt: integer:=0; --to check the 8 bit of data
signal word: std_logic_vector(7 downto 0); --to put the data in signal
type state_type is(start_bit,check_bits,stop_bit,data_out);
signal state: state_type;
begin
process(out1,rxd)
begin
if(out1='1' and out1'event)then
case state is
when start_bit =>
if(rxd='0')then -- check start bit
state<=check_bits;
elsif(rxd='1')then
state<=start_bit;
end if;
when check_bits =>
cnt<=cnt+1;
if(cnt<8)then
word(cnt)<=rxd;
elsif(cnt=8)then
state<=stop_bit;
cnt<=0;
end if;
when stop_bit =>
if(rxd='1')then
state<=data_out;
end if;
when data_out => --this state check if the data "00111111" is recieved
if(word="00111111")then
led<='1';
else
led<='0';
state<=start_bit;
end if;
end case;
end if;
end process;
i get the data from mvme162... on hyper terminal i see words that mvme162 transmit... i need to check if the letter/char "?" is there.. if is there led<='1'... (?=00111111 in ascii).