I have NOT been successful in getting the interrupt pin on the port expander to work. Now settling for a polling routine which should be OK as well - once I get more experience with the commands.
The nice thing is you can use multiple MCP23S17s all using the same 4 SPI lines - as well as the same chip select - if you turn on HAEN (hardware addressing enable). Once I get my project further down the road - I will attempt to use the same chip select as the TFT.
By the way, there is a new SPI command available; it is called spi.setfrequency and seems to work nicely! According to my logic analyzer, the ESP shifts the SPI clock back and forth from 20MHz for the TFT display to 10MHz which is what I have set the spi.setfrequency to.
I noticed Mike hasen't quite gotten it into the documentation but I have worked with mike over the weekend to test it for him and it worked for me - others need to test and confirm as well.
Usage: spi.setfrequency = 10000000 - for 10MHz as an example.
Caveat is that you MUST use this if the ESP has written or read anything to/from the TFT, once that is understood, you simply place the statement right before you access your slower devices. It seems anytime the ESP accesses the TFT, it uses its native clock speed of 20MHz and does not reduce speed when through accessing as other libraries do. Many devices can and do run at that clock speed but I didn't want to push the MCP datasheet too much although there are many posts on other forums which state that the 10MHz speed is quite conservative. I will try it at 20MHz later today which, in theory, will not make me 'sprinkle' the spi.setfrequency commands throughout the code.
I am certain Mike will enhance this even further once he puts more SPI features in so we can use more peripherals - he just needs more space with the builds.
Thanks again Mike!
- Albert Einstein