bonjour,
j'utilise une carte d'evaluation altera pour developper un programme en vhdl avec quartus2.
Dans mon programme j'ai fait des blocs pour pouvoir gerer des choses avec des boutons poussoirs de la carte, seulement ca ne marche pas tres bien.
On m'a conseillé de faire un anti rebond pour que les boutons marchent du premier coup mais je ne sais pas trop comment faire.Code:Library ieee; Use ieee.std_logic_1164.all; Use ieee.numeric_std.all; Use ieee.std_logic_unsigned.all; entity Choix_bits_adc is PORT ( Bouton1 : in std_logic; Bouton2 : in std_logic; Bouton3 : in std_logic; B1 : out std_logic; B2 : out std_logic; B3 : out std_logic; RESET : in std_logic ); end Choix_bits_adc; architecture DESCRIPTION of Choix_bits_adc is signal signal_B1 : std_logic:='0'; signal signal_B2 : std_logic:='0'; signal signal_B3 : std_logic:='0'; begin Pchoixbits : process ( Bouton1, Bouton2, Bouton3) begin if (RESET ='1') then if ( Bouton1 ='1' and Bouton1'event) then signal_B1 <= not(signal_B1);--allumer led 1 quand actif end if; if ( Bouton2 ='1' and Bouton2'event) then signal_B2 <= not(signal_B2);--allumer led 2 quand actif end if; if ( Bouton3 ='1' and Bouton3'event) then signal_B3 <= not(signal_B3);--allumer led 3 quand actif end if; else signal_B1 <= '0'; signal_B2 <= '0'; signal_B3 <= '0'; end if; end process; B1 <= signal_B1; B2 <= signal_B2; B3 <= signal_B3; end DESCRIPTION;
-----