High Speed Digital DAQ: what do I look for in a microcontroller?

Discussion in 'Embedded Systems and Microcontrollers' started by atdunwoody, Sep 2, 2016.

  1. atdunwoody

    Thread Starter New Member

    Sep 2, 2016
    I'm working on a project where I need to record digital pulses from a photon counting head with a width of 30 ns that have a minimum space of 70 ns between each pulse. The pulse frequency is irregular, but the pulses are run through a LLD comparator and a pulse shaper and show up as a nicely shaped square wave before I process them.

    I am looking to use a PIC microcontroller as a counter, but I am unsure what specifications to look for (number of timers, bit count of timers, MIPS #, etc..) Does anyone have any suggestions or starting points?

    Thanks a lot for the help.
  2. hexreader

    Active Member

    Apr 16, 2011
    If all that you want to do is count the number of pulses, a wide variety of PICs will do the job. Just look for external clock input on a single timer. Typically maximum square wave input speed would be 50 or 60MHz, so your input should be within spec.

    MIPS barely matters, unless processing power is needed to do something with the count.

    My favorite PIC is PIC18F46K22, but many other PICs would do.

    A second timer is probably desirable for taking periodic count samples, but I do not know what you intend to do with the count once you get it.
  3. dannyf

    Well-Known Member

    Sep 13, 2015
    for minimum part count, you want to look for a mcu with an asynchronous timer. most but not all PICs do that. None of the AVRs do that.

    For highe input frequency or a mcu with synchronous timers, you can use an external prescaler to lower the input frequency. Then you may have to decide if you want to read the prescaler or not.

    20Mhz is generally the upper limit without an external prescaler.
    atdunwoody likes this.
  4. atdunwoody

    Thread Starter New Member

    Sep 2, 2016
  5. NorthGuy

    Active Member

    Jun 28, 2014
    If you only want to count pulses, almost any PIC will do, such as PIC12F1501. The PIC you have selected is huge overkill.

    If you want to measure individual pulses, it's much harder, requires faster PIC, and the best you can do is probably 10ns resolution or so.