I am working on yet another industrial board (marrying an Arduino Mega and W5500 into a single board with built-in Ethernet and protected 10-30V DC inputs), and had a simple question regarding SPI.
Having worked mostly with I2C, I am an unabashed newcomer to SPI. I beat my head against the wall today for several hours with SPI trying to figure out why the chip select on the W5500 worked only with a specific pin on the Arduino (pin 10 on the Mega). I finally hooked everything up to my scope, turned on SPI decoding, and saw that the SPI bus behaved very differently when tying the chip to ground versus using pin 10 on the Mega. Different meaning it worked.
So, I put pin 10 on the scope and … when I expected to see a solid 3V3 signal, I saw a ~1MHz square wave.
I did a bit of reading, and I whereas I thought the chip select pin was a simple high/low, apparently it is more complicated.
Is it a correct understanding that CS is “synced” with MISO? As in, (for the W5500), MISO only goes low impedance when CS is high - and CS gets set high by the Master (the Arduino) when MOSI is done transmitting?
Now that I type this, it makes perfect sense. I think.