frequency divider using counter

Status
Not open for further replies.

viyaaloth

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

approximately 763 Hz (accurately :: 762.93)

regards
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…