Skip to content
Snippets Groups Projects
Commit 2ecf4019 authored by Nils's avatar Nils
Browse files

endret baud_clk til puls

parent fee45795
No related branches found
No related tags found
No related merge requests found
...@@ -125,8 +125,7 @@ begin ...@@ -125,8 +125,7 @@ begin
when others => null; when others => null;
end case; end case;
-- WIP skal sende når den får write av controller if (baud_clk = '1' and last_baud_clk = '0') then
if (baud_clk = '1' and last_baud_clk = '0') or (baud_clk = '0' and last_baud_clk = '1') then
case tx_state is case tx_state is
when IDLE => when IDLE =>
TxD <= '1'; --UART er høy singal når det ikke sendes noe TxD <= '1'; --UART er høy singal når det ikke sendes noe
...@@ -164,9 +163,10 @@ begin ...@@ -164,9 +163,10 @@ begin
baud_clk <= '0'; baud_clk <= '0';
elsif rising_edge(clk) then elsif rising_edge(clk) then
if baud_count = division_factor(baud_rate) - 1 then if baud_count = division_factor(baud_rate) - 1 then
baud_clk <= not baud_clk; baud_clk <= '1';
baud_count <= 0; baud_count <= 0;
else else
baud_clk <= '0';
baud_count <= baud_count + 1; baud_count <= baud_count + 1;
end if; end if;
end if; end if;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment