Still stucked.
I've even try to get the simpliest connection. (code below)
But still get nothing.
:-(
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity simpleuart is
port(
clk : in std_logic; --freq = 27 MHz
lampka_txd : out std_logic;
uart_tx : out std_logic);
end simpleuart;
architecture simpleuart_arch of simpleuart is
signal send_clock : std_logic := '1';
constant N : natural := 5625; -- clock divider to get baud rate = 4800.
signal cntT : integer range 0 to 2812;
begin
send_clock_generator : process (clk)
begin
if(rising_edge(clk)) then
if (cntT = 2812) then
send_clock <= not (send_clock);
cntT <= 0;
else
cntT <= cntT + 1;
end if;
end if;
end process;
lampka_txd <= send_clock;
send : process (send_clock)
variable send_cnt : integer range 0 to 10 := 0;
begin
if (rising_edge(send_clock)) then
if (send_cnt = 0) then
uart_tx <= '0';
--lampka_txd <= '0'; -- !!!!!!!!!!!!!!!!!!!!!!!!
send_cnt := send_cnt + 1;
--lampki(send_cnt) <= '0';
--ready_to_send <= '0';
elsif (send_cnt > 0 and send_cnt <4) then
uart_tx <= '1';
--lampka_txd <= '1';
send_cnt := send_cnt + 1;
--lampki(send_cnt) <= '1';
--ready_to_send <= '0';
elsif (send_cnt < 9) then
uart_tx <= '0';
--lampka_txd <= '0';
send_cnt := send_cnt + 1;
--lampki(send_cnt) <= '0';
elsif (send_cnt = 9) then
uart_tx <= '1';
--lampka_txd <= '1';
--lampki(send_cnt) <= '1';
send_cnt :=0;
--ready_to_send <= '1';
end if;
end if;
end process;
end simpleuart_arch;