So you have an eight bit parallel library and you want to modify it to SPI?... Some of those TFT's support direct SPI and the libraries are already written.... How big is the screen... Worst case! Yes you can modify the library t output via a MCP230017....
Hi,
No, its already running on SPI using the Adafruit set up, with the 3 spi lines plus D/C and the CS and Reset pins
https://www.adafruit.com/product/2478
Its just that our program, originally written on the mega2560 uses libraries for most of its functions.
I've been trying to run the program on the smaller Uno /Nano** but we are 2 pins short for the library functions, eg 8 input sensors, 4 pwm outputs, 6 i/o for the TFT , 2 for I2C and 2 for comms.
We can use the Expander chip for directly coded control of the other outputs, but we really need to move 2 pins from direct library control and the TFT CS and RST seem the best ones. ( CS could be hardwired low as nothing else on SPI and Reset on low, is said to be not required, but have tried various code combinations to the above but it does not like to run without them ?)
Yes you can modify the library t output via a MCP230017....
We are only C++ beginners, is it that easy to modify a library such as the adafruit one to output CS and RST to the MCP chip ??
Any pointers appreciated.
https://github.com/adafruit/Adafruit_ILI9341
thanks
** our friend has written the code with a little help from me and he has done a pcb to act as a very large shield to the mega2560, but it would be much better if we could reduce the size by running it on the nano with a MCP chip.
The code runs does run ok on the nano and the tft display is still fast enough, its just a way of freeing 2 i/o pins to the MCP chip.