Hello all,
I’m a little bit confused.
I have both Arduino UNO and MKR1000 wifi.
I load on both these very simple sketch:
unsigned int samples = 1000;
unsigned long time;
unsigned long duration;
unsigned int dummy_input;
void setup()
{
Serial.begin(9600); // baud rate for the serial communication
}
void loop()
{
time = micros();
for (int i = 0; i < samples; i++) {
dummy_input = analogRead(0);
}
duration = micros() - time;
Serial.println(duration);
}
It will corrispond to the real analog sample rate on serial, right ?
On UNO board the average on 100 readings is 0.112 millis
On MKR1000 board the average value is 0.423 millis
I really tought MKR was faster than UNO because the 48MHz vs 12Mhz clock speed and becuse the SAMD21 core and because of these Board Overview!!!
First rows says : The Digital-to-Analog converter (DAC) converts a digital value to an analog voltage. The SAM DAC module has one channel with 10-bit resolution and is capable of converting up to 350 kilo samples per second (ksps).
Arduino UNO should have only 9.6ksps!!!
Why it isn’t ? Can some one explain the arcane please ? =(
Is it possible to speed it up also with prescaler modification or other tricks ?