I’m having a heck of a hard time trying to get a 595 working with the Spider. While I could simply be grasping here, I think the root of the problem is that CS never goes low.
In the attached screen shot, you can see the result of sending 0xFF to SPI. Ignore the clock edges, I was playing around with active high/low there.
However, no matter what I do, I can’t get enable to go low when done. Instead, strangely, MOSI goes low when done and stays there for some chunk of time - almost 6ms. With the clock off, MOSI shouldn’t matter, but I really want CS/Enable to follow the config setting.
public LedArray(int socketNumber)
{
_socket = Socket.GetSocket(socketNumber, true, this, null);
SPI.Configuration config = new SPI.Configuration(
false,
0,
0,
true,
true,
100);
Debug.Print("ChipSelectActiveState: " + config.ChipSelectActiveState);
_spi = new SPI(_socket, config, SPI.Sharing.Exclusive, this);
}
public void SetPattern(byte ledPattern)
{
_spi.Write(new byte[] { ledPattern });
}
I tried setting up SPI as shared as well, in case that was it. Nope.
This was going to be for my demo tonight, but I’m not so sure now
Pete