cancel
Showing results for 
Search instead for 
Did you mean: 

LCD interfacing with SPI Communication

deep ch
Associate II
Posted on December 25, 2017 at 15:52

Hello All,

I would like to understand the LCD Interfacing with the SPI Communications.

Fo LCD,

I Think it would be a one communication.

I am using STMCUBEMX

I am assigning few pins to the others like usb-Device n usb Host.

Controller I am using : STM32F417IH6-176PINS

in that case, for lcd interfacing it shows only the

1)Half duplex Slave

2)receive only master

in above case, will which option I will have to select to send the String to the LCD.

Or do you have any idea.

Regards

Deep

#lcd-interfacing #stm32f417ih6 #spi-communication
7 REPLIES 7
T J
Lead
Posted on December 25, 2017 at 21:23

there are so many options for the 176pin package...

you can select a different SPI ports to use different pins and have full functionality.

deep ch
Associate II
Posted on December 26, 2017 at 04:49

For the LCD to operate on the SPI.

Does it needs full duplex communication or Half duplex from the Master..?

What configurations it requires..?

Posted on December 26, 2017 at 18:14

Review the documentation for the LCD, it should explain the expectations. Got no idea here what you are using.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on December 26, 2017 at 23:19

definitely the LCD needs bidirectional SPI, full duplex is best.

i haven't seen an LCD with half duplex SPI..

Posted on December 28, 2017 at 15:38

ST7735R in a common SPI configuration has an SD card attached to the board.  Resolution of the display is 128 x 160.  The controller has an SPI MOSI, but the pin is shared with MISO on the controller chip.  You'd need half duplex there.  For Deep:  the reason you can only pick two configurations is that the other pins are already in use, so as mentioned, either pick another SPI interface completely or remap the pins so that none are used.  If you're using an EPSON S1D13781, it will not share the interface (MISO is set low when chip is not selected, not tristated).  You must add a 74LS125  section to enforce tristate, run the 125 enable from CS on the display chip.

I've tried using half duplex masters, but I never got clocks from the CPU.  You might want to think of adding an LS125/LS126 pair, controlling them with a separate RW line, and thus rerouting the MISO signal from the display back to the master MISO.  That might work.

If you can't read the display, then you must buffer the entire display memory in the CPU for read/modify/write operations.

So yes, definitely situations where you don't have full access to the LCD for reading.  (a peculiarity of this chip, perhaps others, in what they call 3 wire serial or 4 wire serial.  4 wire serial is NOT MISO/MOSI).

LMI2
Lead
Posted on December 28, 2017 at 19:24

I once used a cheap display from China where read/write was hardwired as write only. It was on Arduino where they got libraries for the LCD. So, sometimes, you have to forget read modify write and so on.

Posted on December 28, 2017 at 20:14

Arduino shields and designs want to minimize pin count at all costs.  Hardwiring to write is frequent (and less than helpful, at least put in a jumper to give you a choice!).

The St7735R chip is designed not to have a read function when in serial mode.  It is used in either SPI or parallel mode (I suspect, mostly).  However, the Chinese display board makers have these only rarely in parallel mode, and generally in I2C or SPI mode.