Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help needed for a code in vhdl-I want output 8kHz and 256khz

Status
Not open for further replies.

rekar33

Newbie level 2
Joined
May 8, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,294
help for a code vhdl

hi
please I am beginner in VHDL and I have a project I 24MHZ input and I want output 8kHz and 256khz but I do not know how, is that someone can help me to complete this program
I have to divide by 3000 for 8kHz and then what should I 8kHz multiply for 256khz and finish this entity is clk_div
port (
clk_24MHZ: in std logic;
clk_8KHZ: in std logic;
clk_256KHZ: in std logic);
clk_div end;
 

Re: help for a code vhdl

hi
search this forum for phase accumulator program, you will enter your input clock,output clock, and the program will generate the VHDL file for you.

I tried it , and it works well
hope that helps
 

    rekar33

    Points: 2
    Helpful Answer Positive Rating
help for a code vhdl

I think it's just a simple counter that divides by 96 for the 256KHz and by 3000 for the 8KHz.
 

Re: help for a code vhdl

I think it's just a simple counter that divides by 96 for the 256KHz
If you don't care for the difference between 250 and 256, it's O.K. A divider of 94 gives a better approximation, but still not exact.

A problem arises, if the 8 kHz signal is expected to be an integer part of the 256 kHz, or both frequencies to be exact for another reason, e.g. intended for an accurate real-time clock. In this case, there's no other solution than using an anolog PLL and multiplying the 24 MHz to 96 MHz first.

The said phase accumulator solution works as a fractional clock divider, generating an exact frequency (at least for the mean value) but involving a phase jitter, that may be unwanted, too. You can implement the required 1:93.75 divider as fractional divider directly, counting to 93 once and 94 three times, alternatingly.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top