Min Pin requirment for 2.2" spi TFT LCD for photon for limit pin design?


I been playing with the photon maker kit for about a week. I am trying to design a systems that have 5 output, 5 input, i2c temp sensor(d1,d0) and 2.2" spi tft lcd using adafruit_ili9341. According to the docs, the photon have 16 usable GPIO, included WKP and DAC.

5out+5in+2tsensor = 12 pin taken, that leave me 4 pin for the 2.2" spi tft lcd.

Could I get away using just 4 pin for the 2.2" spi tft lcd with pin list (cs, reset, dc, sdi(mosi), sck, sdo(miso)) by using the pin listed below from adafruit_ili9341?

// A2 : SS(Slave Select)
// A3 : SCK(Serial Clock)
// A4 : MISO(Master In Slave Out)
// A5 : MOSI(Master Out Slave In)

My design only use the screen not the sd of the lcd.

Thank you for all your help in advance. :smile:

@sheng, I looked at the ILI9341 code in of my repos and found that even though there are functions to read FROM the display, none of these are actually used in the reset of the code. This means that you can omit connecting the MISO pin. The other pins you have to consider are RST and D/C. You could possibly get away with no RST line but you will need a GPIO for D/C. I don’t believe you can retask the MISO pin if you use hardware SPI. However, if you use software SPI, you could. In summary, you need the GPIO for the following display signals:

RST (maybe not)

Hope that helps!

Thank you, this helps! I wish there was a developing board for the P1 module or I can get a hold of of a P1 module. I contacted the sale but they say the P1 will not be available until Oct. :frowning:

@sheng, have you looked at the Sparkfun redboard?


@peekay123, I scan at it before, briefly. lol What throw me off was the 8 Digital I/O Pins, 6 Analog Input, I was expecting total 24. After reviewing your link, sparkfun broken the pins apart in sections. Guess I have one more part on my ordering list. :laughing:

If you don’t use Serial1 you can also use RX & TX as digital pins giving you 18 free pins

1 Like

@ScruffR. I rule the RX &TX out because of this Can the RX and TX pins be used as GPIO? messages. If I used RX&TX as GPIO it may cause more trouble then I want.

@sheng, that is an old post. I use the RX/TX lines in my latest RGB Matrix Panel shield and have had zero problems. :wink:

1 Like

@peekay123, really! I thought its do not touch pin since, tinker did not show the pins and after reading the old post I rule it out.

So to call it, its like pinMode(TX, OUTPUT); like an other GPIO? Are there any doc for this two pins? I am still new to this and don’t know where to find the latest docs.

I had an enhanced Tinker that successfully did even on the Core

It never made it into an official app, but it worked.

1 Like

Thank you @peekay123 and @ScruffR for helping out! :smile:

1 Like