If your SPI host is bit-banging and has some control over the timing, I hav e two ideas that I've used before:
1) Embed CS in the data. Several ways to do this, but one way that I've us ed requires that data not normally change when the shift clock is high (or low, pick one). So for normal operation, you would set the MOSI data, puls e SCK high then low, then change the data and repeat. Most SPI devices are okay with that. If you can do that, then you can look for transitions on MOSI when SCK is high, which will indicate the beginning of CS. You can th en count clock cycles to the end of CS, or use the opposite data transition to signal the end of CS. Lots of variations on this theme are possible.
2) Embed non-SPI control signals in an SPI stream. This is most easily exp lained by pulling up the schematic of a 74HC595 shift register with output flip flop. Connect MOSI to the serial in (pin 14), SCK to the shift clock (pin 11) and inverted ~CS to the output register clock (pin 12). Now, ever y time you send data to your SPI device, before you assert CS, you send a f ew bits, which get loaded into the shift register. Then when you assert CS , those bits get clocked into the output register. Meanwhile, your SPI dev ice wasn't paying attention to those control bits while they were being shi fted, because CS wasn't asserted.
Note that it isn't necessary to actually send data to the SPI device to cha nge the control signals. Just shift the bits, pulse CS low and high again. BUT every time you access the SPI device, you _will_ need to always pre-s end your control bits. Depending on how many control bits you have, you ca n toggle them at a decent speed.
Some gotchas: some SPI devices get confused by a CS asserting without bits being clocked, so you need to either make sure yours isn't one of them, or only change control bits along with a valid SPI command. Also, avoid the temptation to make one of your control signals reset the SPI device. Many devices get upset when their reset input asserts/deasserts when CS is low. Even if the data sheet doesn't mention it, assume the worst. Lastly, I've never tried idea (1) and (2) at the same time. Exercise for the reader, a nd all. JMac