X-Ray PIN diode TTL signal


im new to arduino but im already used to programming in C++ and Visual Basic.
Im working with a X-Ray PIN diode detector in a synchrotron radiation laboratory.

The device im using is http://www.xenocs.com/files/Product_Data_sheet_LD/ACC-05_X-ray_Pindiode_detector_system-02-LD.pdf

I can read the X-Ray intensity thru the Fout plug, which is a TTL signal with frequency that ranges from 0-500kHz (That is proportional to the photon flux on the diode). I have a arduino UNO R3 board.

I want the arduino board to make an average of the TTL frequency over 1/10 second and write the information on the serial.
I have read here that the maximum sampling rate of arduino UNO is about 125kHz, which is way below the 500kHz cap frequency of the detector.

anyone know if this is true? can i read the 500kHz signal with arduino uno?

sorry for bad english hehe =] thank you for your attention.


(First Google hit)

I have read here that the maximum sampling rate of arduino UNO is about 125kHz
That is for ADC - as you work with TTL signal you do not need the ADC to consider - just measure the frequency of that TTL signal…

Page has moved

(First Google hit)


but im avoiding using other hardware than arduino. i tried connecting the TTL source to arduino with a simple code, but it started failing with frequencies higher than 1kHz.

i used a similar code to this one (this one has a bug, but the one i used was working fine <1kHz)

int pino = 13;
int t0;
int tf;
int delta;
int counter;
int TTL = HIGH;
float freq;

void setup() {
void loop() {
  t0 = millis();
  TTL = digitalRead(pino);
  while ((millis()-t0) > delta) {
    if (digitalRead(pino) != TTL){
      if (TTL == HIGH){TTL = LOW;}
      else {TTL = HIGH;}
    counter = counter + 1;  
  freq = counter/(2*(delta / 1000));

im wondering about using a few flip-flops to reduce the output frequency.

If you want it to work above 1kHz, you’ll need to use micros, not millis

im avoiding using other hardware than arduino.

Did you look at the link I posted?