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

Reply

VHDL - clockdivider with enable

 
Thread Tools Search this Thread
Old 05-15-2005, 08:41 PM   #1
Default clockdivider with enable


I need to make a vga controller but I have a problem.
The clock is 48 Mhz,so i have to divide it by two to have 24 Mhz for
640 by 480 pixels.
but the clock input should be the real clock 48 Mhz en there's also an
enable input and by this input we can get the correct(needed)
frequency of 24 MHz.
I don't know how to do this and how this exactly works,but it has to
be done this way,maybe somebody can write a little bit code for me?
Are explain howthis thing works.
thanks a lot!!


jo
  Reply With Quote
Old 05-15-2005, 10:31 PM   #2
james
 
Posts: n/a
Default Re: clockdivider with enable
On 15 May 2005 12:41:59 -0700, (jo) wrote:

>I need to make a vga controller but I have a problem.
>The clock is 48 Mhz,so i have to divide it by two to have 24 Mhz for
>640 by 480 pixels.
>but the clock input should be the real clock 48 Mhz en there's also an
>enable input and by this input we can get the correct(needed)
>frequency of 24 MHz.
>I don't know how to do this and how this exactly works,but it has to
>be done this way,maybe somebody can write a little bit code for me?
>Are explain howthis thing works.
>thanks a lot!!

*****

A simple JK flip flop will divide by 2 nicely. That can be made from
two D flip flops.

james


james
  Reply With Quote
Old 05-16-2005, 08:33 AM   #3
jo.spreutels@gmail.com
 
Posts: n/a
Default Re: clockdivider with enable
I know how to divide a clock buth how does this works in combination
with the enable input?



jo.spreutels@gmail.com
  Reply With Quote
Old 05-16-2005, 02:48 PM   #4
Stefcio Z.
 
Posts: n/a
Default Re: clockdivider with enable
On 15 May 2005 12:41:59 -0700, (jo) wrote:

>I need to make a vga controller but I have a problem.
>The clock is 48 Mhz,so i have to divide it by two to have 24 Mhz for
>640 by 480 pixels.
>but the clock input should be the real clock 48 Mhz en there's also an
>enable input and by this input we can get the correct(needed)
>frequency of 24 MHz.
>I don't know how to do this and how this exactly works,but it has to
>be done this way,maybe somebody can write a little bit code for me?
>Are explain howthis thing works.
>thanks a lot!!


Should it be something like this?

architecture PreScaler of PreScaler is
signal Qint: STD_LOGIC_VECTOR(26 downto 0);
begin

process (CLK, RESET)
begin
if RESET = '1' then
Qint <= (others => '0');
elsif Clk'event and Clk='1' then
if CEI = '1' then
if Qint = 1 then
Qint <= (others => '0');
else
Qint <= Qint + 1;
end if;
end if;
end if;
end process;

CEO <= '1' when Qint = 1 else '0';

end PreScaler;

Next, you should map port CEO to CE in your design.

--
Lukasz Z.


Stefcio Z.
  Reply With Quote
Old 05-17-2005, 01:58 AM   #5
james
 
Posts: n/a
Default Re: clockdivider with enable
On 16 May 2005 00:33:58 -0700, wrote:

>I know how to divide a clock buth how does this works in combination
>with the enable input?

****

A simple method though not always the best way is to gate the clock
with an "AND" gate.

james


james
  Reply With Quote
Old 05-17-2005, 08:03 AM   #6
Mohammed A khader
 
Posts: n/a
Default Re: clockdivider with enable
HI Jo,

> The clock is 48 Mhz,so i have to divide it by two to have 24 Mhz
> but the clock input should be the real clock 48 Mhz en there's also

an
> enable input


What are you targetting for FPGA or ASIC ?
And from where is this enable input coming(I mean relation between
enable and clk).

-- Mohammed A Khader.


jo wrote:
> I need to make a vga controller but I have a problem.
> The clock is 48 Mhz,so i have to divide it by two to have 24 Mhz for
> 640 by 480 pixels.
> but the clock input should be the real clock 48 Mhz en there's also

an
> enable input and by this input we can get the correct(needed)
> frequency of 24 MHz.
> I don't know how to do this and how this exactly works,but it has to
> be done this way,maybe somebody can write a little bit code for me?
> Are explain howthis thing works.
> thanks a lot!!




Mohammed A khader
  Reply With Quote
Old 05-17-2005, 12:23 PM   #7
jo.spreutels@gmail.com
 
Posts: n/a
Default Re: clockdivider with enable
i'm targetting fpga.
But I've decided to leave the enable foe now ,since nothing is coming
on the screen.
I'm gonna post it as a new topic vga controller.
Maybe you can have a quick look to see if you notice something wrong.

thanks for the help



jo.spreutels@gmail.com
  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
Firewall wont enable on cisco 857 router matmay3021 Hardware 0 10-08-2008 09:59 AM
PIX 501 [ERR]vpdn enable outside waqas001 General Help Related Topics 0 04-22-2008 12:08 PM
AAA authentication problem for enable mode access leopard Hardware 1 07-02-2007 08:08 AM
Spoke to Spoke Enhanced Config (ASA-PIX) NEED HELP ASAP!! T-Mak Hardware 1 10-27-2006 11:56 AM
How to enable communication between VLANS on a singlel switch makhan Hardware 1 10-26-2006 08:39 AM




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