SPI not working

I am having trouble with my Ethernet board (TOP MINI W5100) on an Elegoo Mega 2560. I believe I have traced it down to the SPI. I loaded the sample from the on-line Arduino Reference Digital Pot. It never generates SPI signals on the ICSP header. I printed the contents of SPCR in SPI.h beginTransaction. and it shows a 0x82. Looking at the ATmega 2560 data sheet, this indicates that the SPI is not even enabled ( bit 6=0). What am I doing wrong?

Well it might help if you posted your code and a schematic as wired including power and grounds. A frizzy thing does not count. I would also try some of the simple SPI programs to validate that the hardware works.

HI Gil,
Thanks for your interest. The code I tried is the sample shown in my 1st post. No hardware other than the Arduino and an oscilloscope.

However, I have since solved the problem by re-installing the IDE. I have no idea what is different but it now works.

I am glad it is working, have fun with it.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.