SPI clock not working

Hi,

I have a sainsmart Mega 2560 which I have been using for a while. I never had to use SPI until this morning and I could not get the connection to work.

I started probing with my scpoe and found I had nothing but a very faint signal on the SCK pin (ICSP header as well as pin 52).

I then tried this:

void setup() {
** for (int i=50;i<54;i++){**
** pinMode(i,OUTPUT);**
** }**
** for (int j=50;j<54;j++){**
** digitalWrite(j,HIGH);**
** }**
}
void loop() {
}

I get 4.7V from pin 50,51 and 53 but only 1.3-1.5V from pin 52.

Any idea why??

Did you try adding SPI.begin() in setup?
https://www.arduino.cc/en/Reference/SPIBegin

Yes i did, not in the sketch I posted here but in the sketch I'm trying to use SPI in.

In the sketch in my post I'm only trying to bring SPI pins to 5v...

My board can't bring pin 52(spi SCK) to 5V. This is what I don't understand. Is it normal?

Just curious, exactly what sort of clock are you using?

I’m sorry Nick I’m not sure I understand.

Oops. I thought you are using an SPI clock module, which I have never heard of, probably for good reason. I now realise you are simply referring to the signal on a pin.