Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Serious VHDL help!

 
Thread Tools Search this Thread
Old 11-30-2007, 02:00 AM   #1
Default Serious VHDL help! Frequency division


I really need some help, Im in college taking a digital logic course.

Our final project is a digital counter that counts up to 60, using a mod 6 and mod 10 counter.

the problem i am having is coding a 25 bit frequency divider, im not very good at coding in VHDL, but if someone could help me out it would be seriously appreciated.

i spent like 5 hours working on this thing using a 25 bit johnson counter, but I just couldnt figure out how to get it to divide a frequency.

help appreciated.


p00ndawg

Last edited by p00ndawg : 11-30-2007 at 02:40 AM.
p00ndawg is offline   Reply With Quote
Old 12-01-2007, 01:14 PM   #2
p00ndawg
Junior Member
 
Join Date: Nov 2007
Posts: 3
Default
Please someone Help!




p00ndawg
p00ndawg is offline   Reply With Quote
Old 12-03-2007, 01:03 PM   #3
p00ndawg
Junior Member
 
Join Date: Nov 2007
Posts: 3
Default
Default Re: VHDL help, frequency Division
How would this work? does this successfully divide the 25 hz frequency from an ALTERA board to 1 hz??

Thanks for your response, but this problem should be fairly simple, I mean we never really went over VHDL and now we're expected to code somethign in the language, so I dont think it should be in our realm of reach, but jesus i am having so much trouble as well as my class mates.


help appreciated.




Library IEEE;
use IEEE.std_logic_1164.all;

entity Divider is
port (
CLK: in STD_LOGIC;
COUT: out STD_LOGIC
);
end Divider;

architecture Divider of Divider is

constant TIMECONST : integer := 59; --temp at 1 or 2 for simulation purposes
signal count0, count1, count2, count3: integer range 0 to 1000 := 0;
signal D: STD_LOGIC := '0';

begin
process (CLK)
begin
if (CLK'event and CLK = '1') then
count0 <= count0 + 1;
if (count0 = TIMECONST) then
count0 <= 0;
count1 <= count1 + 1;
elsif (count1 = TIMECONST) then
count1 <= 0;
count2 <= count2 + 1;
elsif (count2 = TIMECONST) then
count2 <= 0;
count3 <= count3 + 1;
elsif (count3 = TIMECONST) then
count3 <= 0;
D <= not D;
end if;
end if;

COUT <= D;

end process;
end Divider;
Reply With Quote


does this little piece of code do what I need?


p00ndawg
p00ndawg is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Some SERIOUS online video, amazing flasher8 DVD Video 2 12-18-2005 11:21 PM
Help me with a serious problem, please Paul A+ Certification 6 04-27-2005 12:04 PM
serious about buying a dvd recorder... hi DVD Video 18 12-22-2003 03:29 PM
Re: Serious Computer Problem hootnholler A+ Certification 1 11-24-2003 12:18 PM
Ulead DvdMF2 : Serious audio sync problem EtEroGeNeO DVD Video 6 09-15-2003 03:20 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46