- when DONE =>
- null;
- end case;
-
- if spalte_up = '1' then
- if spalte = hspalte_max then
- if zeile = hzeile_max then
- spalte_next <= 1;
- zeile_next <= 1;
- s_done_next <= '1';
- else
- spalte_next <= 1;
- zeile_next <= zeile + 1;
- end if;
- else
- spalte_next <= spalte + 1; --overflow here!
- zeile_next <= zeile;
- end if;
- end if;
-
- end process output_pc;
-
- next_state_pc : process (state, rx_new, rx_data, btn_a, d_done, tx_done_i, s_done)
- begin
- state_next <= state;
- case state is
- when IDLE =>
- if (rx_new = '1' and rx_data = x"0a" ) or btn_a = '1' then
+ when PRINT_NO1 =>
+ tx_data_i_next <= x"28"; -- '('
+ new_i_next <= '1';
+ if tx_done = '1' then
+ state_next <= PRINT_NO1_WAIT;
+ end if;
+ when PRINT_NO1_WAIT =>
+ if tx_done = '0' then
+ state_next <= PRINT_NO2;
+ end if;
+ when PRINT_NO2 =>
+ tx_data_i_next <= zeile2char(std_logic_vector(to_unsigned(zeile,7)), 1);
+ new_i_next <= '1';
+ if tx_done = '1' then
+ state_next <= PRINT_NO2_WAIT;
+ end if;
+ when PRINT_NO2_WAIT =>
+ if tx_done = '0' then
+ state_next <= PRINT_NO3;
+ end if;
+ when PRINT_NO3 =>
+ tx_data_i_next <= zeile2char(std_logic_vector(to_unsigned(zeile,7)), 2);
+ new_i_next <= '1';
+ if tx_done = '1' then
+ state_next <= PRINT_NO3_WAIT;
+ end if;
+ when PRINT_NO3_WAIT =>
+ if tx_done = '0' then
+ state_next <= PRINT_NO4;
+ end if;
+ when PRINT_NO4 =>
+ tx_data_i_next <= x"29"; -- ')'
+ new_i_next <= '1';
+ if tx_done = '1' then
+ state_next <= PRINT_NO4_WAIT;
+ end if;
+ when PRINT_NO4_WAIT =>
+ if tx_done = '0' then
+ state_next <= PRINT_NO5;
+ end if;
+ when PRINT_NO5 =>
+ tx_data_i_next <= x"24"; -- '$'
+ new_i_next <= '1';
+ if tx_done = '1' then
+ state_next <= PRINT_NO5_WAIT;
+ end if;
+ when PRINT_NO5_WAIT =>
+ if tx_done = '0' then
+ state_next <= PRINT_NO6;
+ end if;
+ when PRINT_NO6 =>
+ tx_data_i_next <= x"20"; -- ' '
+ new_i_next <= '1';
+ if tx_done = '1' then