Hi , Can you help me to write the vhdl file for next delivery?
Design and implement a circuit that successively flashes digits from 0
to 9 on the 7-segment display HEX0. Each digit should be displayed for
about one second. Use a counter to determine the one-second interval.
The counter should be incremented by the 50 MHz clock signal provided on
the DE2 board (CLOCK_50 input signal, to be managed as a clock input
coming from the external world). Do not derive any other clock signals
in your design; make sure that all the flipflops in your circuit are
clocked directly by the 50 MHz clock signal.
Ber 2. wrote:> Can you help me to write the vhdl file for next delivery?
Show what you have, then maybe one will help you.
But I don't think anyone is going to do your homework completely...
Lothar M. wrote:> Ber 2. wrote:>> Can you help me to write the vhdl file for next delivery?> Show what you have, then maybe one will help you.> But I don't think anyone is going to do your homework completely...
Lothar M. wrote:> Show what you have
Why not implementing the 4 bit counter simplay as a counter from 0 to 9
in the flashing_LIGHTS entity?
1
libraryieee;
2
useieee.std_logic_1164.all;
3
4
entityflashing_LIGHTSis
5
port(CLOCK_50,KEY0:instd_logic;
6
HEX0:outstd_logic_vector(0to6));
7
endflashing_LIGHTS;
8
9
architecturesemi_behavioralofflashing_LIGHTSis
10
11
signalcount:integerrange0to9:=0;
12
signalcountsec:integerrange0to49999999:=0;
13
14
begin
15
16
clock<=CLOCK_50;
17
reset<=KEY0;
18
19
clock_counter:process(CLOCK_50,reset)
20
begin
21
ifreset='1'then
22
count_enable<='0';
23
elsifclock'eventandclock='1'then
24
ifcountsec=49999999then-- one second is gone
25
countsec<=0;
26
ifcount<9then-- each second: increment the digit counter
27
count<=count+1;
28
else
29
count<=0;
30
endif;
31
else
32
countsec<=count+1;
33
endif;
34
endif;
35
endprocess;
36
37
HEX0<="1111110"whencount=0else
38
"0110000"whencount=1else
39
...
40
"1111111"whencount=8else
41
"1110011";-- count=9
42
43
endsemi_behavioral;
If you must use those 2 components counter_4bit and segment_7_decoder,
then you will have to rip out the corresponding lines of code and put
them in their own entities...
BTW:
Have a look at the few lines above the reply edit box:
1
Reply
2
Rules — please read before posting
3
Post long source code as attachment, not in the text
4
...
5
Formatting options
6
...
7
[vhdl]VHDL code[/vhdl]
8
...
So pls attach VHDL code as *.vhdl file or use the [vhdl] tokens further
on.
This requirement is not satisfied:
Ber 2. wrote:> Each digit should be displayed for about one second.
Because the 25 Bit counter a is counting only 2**25 = 33554432 cycles
and therefore the display time is only 670ms per digit.