diff --git a/Tx.vhd b/Tx.vhd index f75d60233af25ad6b77927cfe31e9f4df5b0f13b..fdd4c50cb8e56cb30ca7e42f4ce2fdfdea819f6d 100644 --- a/Tx.vhd +++ b/Tx.vhd @@ -125,8 +125,7 @@ begin when others => null; end case; - -- WIP skal sende når den får write av controller - if (baud_clk = '1' and last_baud_clk = '0') or (baud_clk = '0' and last_baud_clk = '1') then + if (baud_clk = '1' and last_baud_clk = '0') then case tx_state is when IDLE => TxD <= '1'; --UART er høy singal når det ikke sendes noe @@ -164,9 +163,10 @@ begin baud_clk <= '0'; elsif rising_edge(clk) then if baud_count = division_factor(baud_rate) - 1 then - baud_clk <= not baud_clk; + baud_clk <= '1'; baud_count <= 0; else + baud_clk <= '0'; baud_count <= baud_count + 1; end if; end if;