Reading Analogue Voltage signal using Arduino Due

Hey Everybody,

I'm using an Arduino Due microcontroller whose frequency (Clock Rate) = 84 MHz
And I'm trying to read voltage signal through a normal socket (power frequency) = 50 Hz through a step down transformer ..
and I need to take 260 sample signals for the voltage sine wave .. !
So could anyone help how could i manage the frequency of the microcontroller to perform such a task .. !

Thanks a lot .. :slight_smile:

You don't manage the frequency of the micro, you manage the frequency of the readings. Where did the figure of 260 come from and over what period do you need to take the readings ? This will give you the interval between readings which can then be used in your program.

set start time to now using millis() or micros() as appropriate
start of loop
  if now - start time >= reading interval
    take the reading
    reset the start time
  end if
end of loop

Look at the BlinkWithoutDelay example program to see an example of using that technique.