Variable for SS-Pin (Display) points nowhere (pin number 99)
The slave select pin variable is not a pointer. It can't "point nowhere". It can contain a useless value.
Is this a good idea?
It's a wonderful idea. If you can explain how the NOT gate is going to know that the data out of the SPI pins is coming from the display library vs coming from the SD library. When you accept that the only way that the NOT gate can know that is if one pin is high while another is low, you might as well just use those two pins as chip select pins.
sgt_johnny:
Is this a good idea? Any other way to do it?
First things first - are you aware that you can use all the analog pins as digital pins - that might solve the problem?
Assuming you are already using all the analog pins then I wonder if @PaulS is being a bit pessimistic here.
I think what you are suggesting is that the SS Pin should be connected directly to the SD Card device and through an inverter to the Display device. That should allow either one of them to be selected at any one time but it would preclude the option of de-selecting both of them.
It seems worth experimenting with. And you will probably get the answer far quicker with a short test program.