count 5.0*10^6 pulses

Discussion in 'Embedded Systems and Microcontrollers' started by mauripelto, Sep 27, 2012.

  1. mauripelto

    Thread Starter New Member

    Sep 27, 2012
    2
    0
    I need to count up to 5*10^6 pulses per second from a photon detector. I think I can use a parallel port, but would a USB port be faster? I need an amplifier between the PC and the detector. Can anyone point me toward a circuit and can anyone suggest a C# code that will record the counts and an accompanying index number?

    Thanks,

    Mauri
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,431
    3,360
    What does the parallel port or USB have to do with the problem?

    You are counting at a 5MHz rate. That is not a difficult problem.
    TTL counters can easily count to 25MHz. Faster logic can go to 125MHz and even faster.

    What is an index number?
     
  3. mauripelto

    Thread Starter New Member

    Sep 27, 2012
    2
    0
    Thanks Mr. Chips,

    Index was a generic term. What I'm really recording is the step number from a stepping motor controller which rotates a diffraction grating in a spectrometer.

    The PC will contain the code for counting the pulses, (photon captures), storing the counts along with the stepping motor position as well as the stepping motor control.

    When I get farther along, I'll be starting a thread in Programming with detailed questions relative to parallel port controlling code in C#.

    I did learn in the meantime that parallel ports are fast, so I'll not bother with the USB 2.0 any longer.

    And thanks for reassuring me of the speed of TTL's. I'm wondering now if I have to build a hardware counter, instead of using the computer's logic to do the counting. Any thoughts on that?

    Mauri
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,431
    3,360
    Sometimes it is important to reveal the full picture of what you are attempting to do.
    So you are doing what we call "multichannel scaling" in the nuclear research field.
    You have a motor that steps a diffraction grating and a photon collection system that counts photons over a fixed "dwell time".

    You have to determine your maximum count rate and how many bits of data you wish to record. From there you can design a hardware counter to suit the specifications. Transferring the data to the PC is straight forward and you can use the parallel port, serial port or USB. The transfer rate might not be an issue unless you were doing some kind of dynamic experiment.
     
Loading...