Commit ccc0875ff4d609424acc6ddeea279b6b05baace8
1 parent
d8ca565d
7Segment_display readme
Showing
1 changed file
with
33 additions
and
0 deletions
Show diff stats
7Segment_display/README.md
... | ... | @@ -75,6 +75,39 @@ end display; |
75 | 75 | |
76 | 76 | ## Explication de l'algorithme |
77 | 77 | |
78 | + ### Les signaux | |
79 | + | |
80 | + les signaux utilisés vont nous permettre d'avoir un code clean et plus ou moins factorié. | |
81 | + | |
82 | + ``` | |
83 | + architecture Behavioral of display is | |
84 | + | |
85 | + signal count_int : integer range 3 downto 0 := 0; | |
86 | + signal clk_enable : integer range 4999 downto 0 := 0; | |
87 | + signal clk_counter : integer range 2999999 downto 0 := 0; | |
88 | + constant nb0 : std_logic_vector(7 downto 0) := "11000000"; | |
89 | + constant nb1 : std_logic_vector(7 downto 0) := "11111001"; | |
90 | + constant nb2 : std_logic_vector(7 downto 0) := "10100100"; | |
91 | + constant nb3 : std_logic_vector(7 downto 0) := "10110000"; | |
92 | + constant nb4 : std_logic_vector(7 downto 0) := "10011001"; | |
93 | + constant nb5 : std_logic_vector(7 downto 0) := "10010010"; | |
94 | + constant nb6 : std_logic_vector(7 downto 0) := "10000010"; | |
95 | + constant nb7 : std_logic_vector(7 downto 0) := "11111000"; | |
96 | + constant nb8 : std_logic_vector(7 downto 0) := "10000000"; | |
97 | + constant nb9 : std_logic_vector(7 downto 0) := "10010000"; | |
98 | + constant seg0 : std_logic_vector(3 downto 0) := "1110"; | |
99 | + constant seg1 : std_logic_vector(3 downto 0) := "1101"; | |
100 | + constant seg2 : std_logic_vector(3 downto 0) := "1011"; | |
101 | + constant seg3 : std_logic_vector(3 downto 0) := "0111"; | |
102 | + signal chiffre4 : integer range 9 downto 0 := 0; | |
103 | + signal chiffre3 : integer range 9 downto 0 := 0; | |
104 | + signal chiffre2 : integer range 9 downto 0 := 0; | |
105 | + signal chiffre1 : integer range 9 downto 0 := 0; | |
106 | + | |
107 | + type mynumbers is array(9 downto 0) of std_logic_vector(7 downto 0); | |
108 | + signal numbers : mynumbers := (nb9,nb8,nb7,nb6,nb5,nb4,nb3,nb2,nb1,nb0); | |
109 | + ``` | |
110 | + | |
78 | 111 | ## Résultats |
79 | 112 | |
80 | 113 | - Nous avons dans un premier temps essayer d'afficher sur les 4 afficheurs sans recouvrement. C'est pour cela qu'il a fallu baisser la clock. | ... | ... |