cancel
Showing results for 
Search instead for 
Did you mean: 

Hi I am using STM32F413ZHT6 controller along with ZF5S-40-01-T-WT-TR which is 8 bit parallel display for my application design. I want to know if dedicated MCU pins need to be assigned for interfacing this lcd specially for RD,WR,CS,reset etc pins

kumar singh
Associate II

Can we assign to any of the gpio for driving lcd? Does ST provide any driver for 8 bit lcd interface?

1 ACCEPTED SOLUTION

Accepted Solutions
berendi
Principal

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.

View solution in original post

6 REPLIES 6
berendi
Principal

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.

kumar singh
Associate II

Sorry, my bad! I copied connector part number instead of lcd display. display with touch part number is NHD-2.8-240320AF-CSXP-FCTP.

berendi
Principal

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.

kumar singh
Associate II

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? 0690X00000DYeRqQAL.png0690X00000DYeRWQA1.png

berendi
Principal

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.

kumar singh
Associate II

Thanks Berendi for your great help. I will cross verify.