UCGLib and ILI9341 on Arduino Nano - HW SPI Not Working

Hi all

I have a simple setup here with a Nano, connected via voltage dividers, to an ILI9341 2.2" TFT.

Using the constructor:

Ucglib_ILI9341_18x240x320_SWSPI ucg(13, 11, 9, 10, 8 );

The display works flawlessly, albiet a little slow for my tastes. I would love to get HWSPI to work to improve speeds a bit:

Ucglib_ILI9341_18x240x320_HWSPI ucg(9, 10, 8 );

Here's the problem: the above constructor results in a white screen and no display.

This is bizzare. I'm using the correct HW SPI pins for the nano, as seen in the SWSPI constructor above. Changing nothing about the circuit or the code, the HWSPI constructor doesn't work. I can't for the life of me figure out why. Many others have the ILI9341 working fine with the Nano and HWSPI.

Any help would be greatly appreciated.


From olikraus's example:

//Ucglib_ILI9341_18x240x320_SWSPI ucg(/*sclk=*/ 13, /*data=*/ 11, /*cd=*/ 9, /*cs=*/ 10, /*reset=*/ 8);
//Ucglib_ILI9341_18x240x320_HWSPI ucg(/*cd=*/ 9, /*cs=*/ 10, /*reset=*/ 8);

So your constructors should both work. Yes, that is a good strategy to try SW constructor first. You MUST have level shifters on each signal. Voltage dividers will do the same job. What value resistors?