Author Topic: 64-bit Timer  (Read 7505 times)

0 Members and 1 Guest are viewing this topic.

Offline Md_AslamTopic starter

  • Contributor
  • Posts: 24
  • Country: in
64-bit Timer
« on: September 15, 2022, 05:22:41 am »
Can Anyone suggest me the 64-bit Timer/Counter IC, which can count the number of pulses of external signal say 10MHz?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 12496
  • Country: us
    • Personal site
Re: 64-bit Timer
« Reply #1 on: September 15, 2022, 05:41:10 am »
The easiest is any MCU and a combination of hardware/firmware counters. I doubt there is a standalone IC like this, there is literally zero market for it.
Alex
 
The following users thanked this post: SiliconWizard

Offline dietert1

  • Super Contributor
  • ***
  • Posts: 3024
  • Country: br
    • CADT Homepage
Re: 64-bit Timer
« Reply #2 on: September 15, 2022, 06:45:56 am »
Many years ago i designed a multichannel scaler for a high energy physics experiment. At the time we used a bank of counter chips (AM9513) that were 5x 16 bits counters, managed by a 68K processor. Overflows were handled by the firmware.

Nowadays one could use a FPGA to implement this board on one chip. Any modern MCU with it's timers will do the same, but it may require a little effort to get a counting gate correct to 100 nsec.

Regards, Dieter
« Last Edit: September 15, 2022, 07:48:21 am by dietert1 »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17828
  • Country: fr
Re: 64-bit Timer
« Reply #3 on: September 15, 2022, 06:38:19 pm »
MCU, or smallest FPGA you can find.

If you really want to do it with discrete logic though, you could use 4 cascaded 74LV8154 chips (16-bit counter, available.)
These are actually dual 16-bit counters which can be configured as 32-bit counters, so in theory you'd need only 2 of these chips, but oddly enough, for each IC, while the first counter has a carry out that can be used to chain it to the second counter to get a 32-bit counter, the second internal counter doesn't have a carry out, so you could not chain it directly to get 64-bit. You'd have to use 4 of them chained (and not use the second internal counter on each.) Still pretty cheap. (About $1 each.)
 

Offline FenTiger

  • Regular Contributor
  • *
  • Posts: 88
  • Country: gb
Re: 64-bit Timer
« Reply #4 on: September 15, 2022, 06:46:06 pm »
2^64 × 100ns ~= 58,500 years.

Do you really need a 64 bit counter?
 
The following users thanked this post: kgavionics, pcprogrammer

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 6140
  • Country: nl
Re: 64-bit Timer
« Reply #5 on: September 15, 2022, 07:25:07 pm »
Maybe he has a time machine and needs to check if his nuclear diamond battery really lasts that long :-DD

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17828
  • Country: fr
Re: 64-bit Timer
« Reply #6 on: September 15, 2022, 08:07:19 pm »
32-bit was probably not enough and he proably just thought of doubling it. Which suggests a mental approach of software, in which case using a MCU for this sounds like the most appropriate approach for the OP.

Otherwise 48 bits will be about 325 days. Might or might not be enough. We don't know. If it is, then my suggested solution could be made with just 3 of the chips I mentioned instead of 4. About $3 and dead easy.
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1811
  • Country: us
Re: 64-bit Timer
« Reply #7 on: September 15, 2022, 08:33:15 pm »
The Infineon XMC4000 series MCUs have 16-bit timers that you can cascade into 32-bit, 48-bit, and 64-bit timers.
"That's not even wrong" -- Wolfgang Pauli
 

Offline kgavionics

  • Regular Contributor
  • *
  • Posts: 232
  • Country: ca
Re: 64-bit Timer
« Reply #8 on: September 16, 2022, 11:06:19 am »
If there is not any 64bit counter on the market, probably there is no use for it! It must be an overkill for a firmware running on an MCU!
 

Offline Md_AslamTopic starter

  • Contributor
  • Posts: 24
  • Country: in
Re: 64-bit Timer
« Reply #9 on: September 19, 2022, 09:56:37 am »
2^64 × 100ns ~= 58,500 years.

Do you really need a 64 bit counter?

With 32-bit counter, which I have
2^32 x 100 = 429.4 Seconds
I need a counter which can count up to a month at least.

 

Offline Md_AslamTopic starter

  • Contributor
  • Posts: 24
  • Country: in
Re: 64-bit Timer
« Reply #10 on: September 19, 2022, 10:02:40 am »
32-bit was probably not enough and he proably just thought of doubling it. Which suggests a mental approach of software, in which case using a MCU for this sounds like the most appropriate approach for the OP.

Otherwise 48 bits will be about 325 days. Might or might not be enough. We don't know. If it is, then my suggested solution could be made with just 3 of the chips I mentioned instead of 4. About $3 and dead easy.

Yes You are right, 48-bit will work, thinking of doubling 32-bit is not logically correct, I will try cascading the 16-bit timer instead of looking for 64-bit Timer.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17828
  • Country: fr
Re: 64-bit Timer
« Reply #11 on: September 19, 2022, 06:03:47 pm »
Note that I overestimated the number of the required 16-bit counters mentioned above: for 48-bit, you'd only need 2 of these ICs (and 3 for 64-bit): the last one in the chain will provide the upper 32 bits since it's chainable internally. So 2 of these ICs for 48-bit, I think that's a simple and cheap enough solution.

Also note that this IC has an 8-bit "data bus", so you read the counter value by 8-bit chunks. (But just read the datasheet.)
« Last Edit: September 19, 2022, 06:06:05 pm by SiliconWizard »
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 4852
  • Country: us
Re: 64-bit Timer
« Reply #12 on: September 19, 2022, 08:14:07 pm »
If there is not any 64bit counter on the market, probably there is no use for it! It must be an overkill for a firmware running on an MCU!

There exist cheap enough MCUs that they are very often the most efficient (both cost and number of parts) for things that would have been done with discrete logic even just a few years ago. 
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1981
  • Country: us
Re: 64-bit Timer
« Reply #13 on: September 23, 2022, 07:15:02 am »
A while back I cascaded a couple of hardware timer peripherals in an MCU by tying the output pin of one to the input pin of the next. Worked perfectly and didn't require firmware intervention except for the MSb rollover. I don't recall the MCU I was using, and obviously you'd have to pick an MCU that exposes the required signals, but this is a way to do it in a single chip that can be configured with code.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 6140
  • Country: nl
Re: 64-bit Timer
« Reply #14 on: September 23, 2022, 07:59:10 am »
But then you also need the MCU being capable of taking a 10MHz signal as input to the timer.

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 6464
  • Country: nz
Re: 64-bit Timer
« Reply #15 on: September 23, 2022, 10:00:01 am »
But then you also need the MCU being capable of taking a 10MHz signal as input to the timer.

Even a 4 or 8 bit hardware counter with the overflow triggering an interrupt would be enough to let a $1 ATTiny or PIC handle the rest.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 6140
  • Country: nl
Re: 64-bit Timer
« Reply #16 on: September 23, 2022, 10:02:34 am »
Only then it is no longer the single chip solution like IDEngineer referred to.

... but this is a way to do it in a single chip that can be configured with code.

Offline DavidKo

  • Frequent Contributor
  • **
  • Posts: 310
  • Country: cz
Re: 64-bit Timer
« Reply #17 on: September 23, 2022, 10:14:16 am »
...


Yes You are right, 48-bit will work, thinking of doubling 32-bit is not logically correct, I will try cascading the 16-bit timer instead of looking for 64-bit Timer.

Than you can use 3x16 bit counter or 2x 16 bit + 1x 8bit, if 40bits are enough. Depends what devices you have on your table. Maybe 5x8 bit for testing on breadboard will be good enough. At 5V SN74HC590A should handle 16MHz clock.
« Last Edit: September 23, 2022, 10:34:34 am by DavidKo »
 

Offline hgl

  • Regular Contributor
  • *
  • Posts: 110
  • Country: de
Re: 64-bit Timer
« Reply #18 on: September 23, 2022, 10:21:27 am »
The stm32Fxx family has enough 16/32 bit counters and an internal wiring matrix to connect counters in series. A single Chip and Software only for configuration.

With a STM32F411 you can build e.g. a 32+32+16+16+16+16 = 128 bit counter. Have fun with testing  :-DD
 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1981
  • Country: us
Re: 64-bit Timer
« Reply #19 on: September 23, 2022, 01:35:30 pm »
But then you also need the MCU being capable of taking a 10MHz signal as input to the timer.
A quick glance at the spec sheet for the PIC18F, which is in the project I'm working on at the moment, reveals its CCP module can handle 40nS input periods (25MHz) with a 16MHz crystal and prescaler of 1. Higher prescaler settings permit the same multiples of input speed. So 10MHz isn't hard at all.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 6140
  • Country: nl
Re: 64-bit Timer
« Reply #20 on: September 23, 2022, 01:48:01 pm »
I was not saying it is hard, just that the MCU needs to be able to handle it. Have not checked but an Atmel AVR based MCU might not like this on its inputs.

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 4248
  • Country: us
Re: 64-bit Timer
« Reply #21 on: September 23, 2022, 02:16:22 pm »
I was not saying it is hard, just that the MCU needs to be able to handle it. Have not checked but an Atmel AVR based MCU might not like this on its inputs.

From this app note:

AVR205: Frequency Measurement Made Easy with Atmel tinyAVR and Atmel megaAVR
https://ww1.microchip.com/downloads/en/Appnotes/doc8365.pdf

the maximum frequency that you can reliably drive the external clock is f_clk/2.5 - and that's for symmetric (50% duty cycle) signals.
 
The following users thanked this post: pcprogrammer


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->