2020-03-03 11:34 PM
Can we assign to any of the gpio for driving lcd? Does ST provide any driver for 8 bit lcd interface?
Solved! Go to Solution.
2020-03-04 03:26 AM
Using the FSMC controller makes it possible to map the LCD controller interface directly into the MCU address space, so writing command and data bytes would become simple memory writes, no need to toggle GPIO pins between each write. In this case the pinout is fixed, but it gives more performance to the application, even DMA transfers to the display would be possible. RD and WR should go to the respective pins of FSMC (see the pin mapping table in the datasheet), LCD CS = one of FSMC_NE1 ... FSMC_NE4, C/D = any one of the FSMC_A0 ... FSMC_A25 pins. Touch I2C pins should be connected to an I2C interface on the MCU, the rest is simple GPIO.
Without the FSMC controller, any GPIO connection would work (except for I2C of course). I'd recommend connecting the LCD data pins in the same order to a single GPIO port, e.g. DB0-DB15 to Px0-Px15 on the MCU for 16 bit mode, or DB8-DB15 to Px0-Px7 for 8 bit mode, otherwise sorting out the data bits would become a nightmare. There is some example code for this mode in the datasheet, apparently using the SPL library. Performance would be much worse than the FSMC mode.
2020-03-03 11:56 PM
ZF5S-40-01-T-WT-TR is not a display, it's a ZIF connector.
Get the part number and the datasheet of the display and its controller.
2020-03-04 12:03 AM
2020-03-04 03:26 AM
Using the FSMC controller makes it possible to map the LCD controller interface directly into the MCU address space, so writing command and data bytes would become simple memory writes, no need to toggle GPIO pins between each write. In this case the pinout is fixed, but it gives more performance to the application, even DMA transfers to the display would be possible. RD and WR should go to the respective pins of FSMC (see the pin mapping table in the datasheet), LCD CS = one of FSMC_NE1 ... FSMC_NE4, C/D = any one of the FSMC_A0 ... FSMC_A25 pins. Touch I2C pins should be connected to an I2C interface on the MCU, the rest is simple GPIO.
Without the FSMC controller, any GPIO connection would work (except for I2C of course). I'd recommend connecting the LCD data pins in the same order to a single GPIO port, e.g. DB0-DB15 to Px0-Px15 on the MCU for 16 bit mode, or DB8-DB15 to Px0-Px7 for 8 bit mode, otherwise sorting out the data bits would become a nightmare. There is some example code for this mode in the datasheet, apparently using the SPL library. Performance would be much worse than the FSMC mode.
2020-03-04 04:15 AM
Hi Berendi,
Thanks for your detailed explanation. I will connect as per your suggestion. Can you please help me to know about the RD and WR pin connection which pin should i use for it?
2020-03-04 04:22 AM
I think that FSMC_NOE is RD, and FSMC_NWE is WR, but you should rather check it yourself using the display datasheet and the FSMC chapter in the reference manual.
2020-03-04 04:33 AM
Thanks Berendi for your great help. I will cross verify.