Design the baud rate synchronizes transmitter and receiver of UART

OP (Company: uet) #3197647
Design the baud rate synchronizes transmitter and receiver of UART. 
Clock divider in UART play important role as it provides appropriate 
frequency clock as per required by the baud rate. The calculation of 
baud rate divider required following formula:
No. of Counts= (FPGA Freq/Baud Rate)/2
Design a module which takes four Baud Rates 600,1200,2400,4800 and 
provide the divided clock freq. accordingly.


module ClockDivider(input Clk,output BClk,input [1:0]BSel);
//BClk-Baud Clock
//Clk-input Clock // BSel-Baud Rate Select, 00-600, 01-1200,10-2400, 
11-4800
Endmodule


how should i write the verilog code for this....
Please help me
Moderator (Company: Titel) #3197664
momina nisar wrote:
> how should i write the verilog code for this....
The firstmost step:
You should have a look how others did similar prescalers.

And then you take that formula and implement a counter which is reloaded 
with the appropriate value for the one of the 4 desired frequencies. 
About 10 lines of code and you're done...

Cihan Kalayci wrote:
> There is a clock divider example.
Seems to be the wrong HDL...  ;-)

Reply

A question of your own? This thread is over 13 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.