Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > clockdivider with enable

Reply
Thread Tools

clockdivider with enable

 
 
jo
Guest
Posts: n/a
 
      05-15-2005
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!!
 
Reply With Quote
 
 
 
 
james
Guest
Posts: n/a
 
      05-15-2005
On 15 May 2005 12:41:59 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (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
 
Reply With Quote
 
 
 
 
jo.spreutels@gmail.com
Guest
Posts: n/a
 
      05-16-2005
I know how to divide a clock buth how does this works in combination
with the enable input?

 
Reply With Quote
 
Stefcio Z.
Guest
Posts: n/a
 
      05-16-2005
On 15 May 2005 12:41:59 -0700, (E-Mail Removed) (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.
 
Reply With Quote
 
james
Guest
Posts: n/a
 
      05-17-2005
On 16 May 2005 00:33:58 -0700, (E-Mail Removed) 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
 
Reply With Quote
 
Mohammed A khader
Guest
Posts: n/a
 
      05-17-2005
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!!


 
Reply With Quote
 
jo.spreutels@gmail.com
Guest
Posts: n/a
 
      05-17-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to enable people to pay me....(enable credit card payments in my web app) Patrick ASP .Net 1 11-10-2005 11:07 AM
Looking for iexplanations for Intel PROset/Wireless or Microsoft client and "Enable Radio" AK Wireless Networking 5 02-16-2005 11:01 PM
error message when trying to enable Internet Connection Sharing =?Utf-8?B?R2FtZXJtYW41Mg==?= Wireless Networking 0 01-25-2005 04:15 AM
Adapters to Enable an hp Printer to Wireless =?Utf-8?B?YmVuZWRpY3Qx?= Wireless Networking 1 12-26-2004 01:01 AM
How to enable WPA in XP SP2 Steve Wireless Networking 1 11-10-2004 06:00 PM



Advertisments