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.

[SOLVED] Hz vs number of bits

Status
Not open for further replies.

tahirsengine

Member level 3
Joined
May 7, 2007
Messages
66
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
Germany
Activity points
1,929
My question is very elementary, yet tricky.

Say for example: I have a digital clock of 10MHz. I need to trigger an operation at 10ms.

So how many bits I will be needing, after counting which I will be at 10ms? (Number of bits in counter).

Please elaborate a little.

Thanks in advance.

- - - Updated - - -

Ok got answer. Sharing it for general info here.

For 10MHz, the time period for one cycle is 0.00000001 second. For counting a time of 10ms, we will divide 10m by .00000001. This will give us a count of 100000. So, we will count 100000 with a clock, that has a single cycle of .00000001 seconds in order to reach 10ms timings. So in order to count 100000 we need 17 bits(*11000011010100000‬).

Thanks anyway
 

Glad you enjoyed having a conversation with yourself, but there’s an easier way:

10E-3*10E6=100E3

Log(100E3) /log(2)=>17
 
Glad you enjoyed having a conversation with yourself, but there’s an easier way:

10E-3*10E6=100E3

Log(100E3) /log(2)=>17

My method is indeed difficult, but explains everything.
 

Glad you enjoyed having a conversation with yourself, but there’s an easier way:

10E-3*10E6=100E3

Log(100E3) /log(2)=>17

don't you need just 16 bits? since you only need to count to 100E3/2, toggle clk, count 100E3/2 again and toggle?
 

Hi,

don't you need just 16 bits? since you only need to count to 100E3/2, toggle clk, count 100E3/2 again and toggle?
Correct. For the counting.
But you need an extra bit (flip flop) for the "toggle".

Klaus
 

    V

    Points: 2
    Helpful Answer Positive Rating
Hi,


Correct. For the counting.
But you need an extra bit (flip flop) for the "toggle".

Klaus

Isn't it possible to add combi logic to represent a toggle enable?
 

Hi,

Yes, for "toggle enable"....but this is just a signal as input to the toggle flipflop.

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top