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.

frequency divider using counter

Status
Not open for further replies.

viyaaloth

Junior Member level 3
Junior Member level 3
Joined
Jul 15, 2016
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
India
Activity points
211
Hi ALL,

I need a clarification regarding frequency divider using counter.

Usually, If a counter with N bits, it will divide the frequency by 2^N.

Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
reg [19:0] counter;
 
   always@(posedge clk)  // clock frequency is 100MHZ
    begin 
        if(!reset_n)
            counter <= 0;
        else
        begin
            counter <= counter + 1'b1;
            clock   <= counter[16];
        end
    end



From the above snippet, what will be the frequency of "clock"
 
Last edited by a moderator:

Hi ALL,

I need a clarification regarding frequency divider using counter.

Usually, If a counter with N bits, it will divide the frequency by 2^N.

reg [19:0] counter;

always@(posedge clk) // clock frequency is 100MHZ
begin
if(!reset_n)
counter <= 0;
else
begin
counter <= counter + 1'b1;
clock <= counter[16];
end
end

From the above snippet, what will be the frequency of "clock"

hi

approximately 763 Hz (accurately :: 762.93)

regards
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top