# Why is my SPI clock voltage lower at higher frequencies?

I measured that the SPI-Clock of my Arduino Nano in my project didn't reach near 5V. So I quickly tested with a new one, nothing attached except a (mydaq) scope.

I measured the SPI clock:
2.5 V @ 8 Mhz;
3.6 V @ 4 Mhz;
5 V @ 1 Mhz.

I think the graph looks like that because the low max sample of the mydaq, so I dont worry to much about that. The MISO could reach about 5V but why is the clock voltage lower at higher frequencies? And how to reach 5V?

``````#include <SPI.h>

void setup() {
SPI.begin();
SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
}

void loop() {
SPI.transfer(1);
}
``````

I also tried SPI mode 2 or 3 @8Mhz, idle state was 4,7 V but Vp-p again only 1,9 V.

• It's not a lower voltage. You're just trying to measure it with something that is not capable of measuring it. To read a signal of 4MHz you need minimum 8Msps. For 8MHz you need minimum 16Msps. You cannot get the voltage with just a fraction of the samples you need to recover the waveform. Plus there will be a certain amount of low pass filtering happening massively reducing the frequencies this "mydaq" thing can read. Jan 7, 2022 at 21:07
• @Majenko I wondered why I can reach 5V at MOSI then? but now I transfered binary 1010 1010 @ 8Mhz and the MOSI line reading also "dropped". Thank you, that made a lot of sense actually :) Time for upgrade Jan 7, 2022 at 21:49
• You can use a peak detector to get an idea of the maximum voltage, and another one for the minimum, if you don't have a high enough sampling rate. Jan 7, 2022 at 22:33