Skip to main content
Shri
Associate II
Jun 18, 2022 10:07 AM UTC
Question

How to read/write NOE,NWE,RS and CS pins of LCD Interface created using FSMC?

0693W00000NsEKjQAN.pngHello all, I want to interface my STM32f407vgtx microcontroller with ILI9325 lcd and for this I have initialized FSMC as per my requirements. But to properly communicate with ILI9325 LCD , I want to read/write pins named NOE, NWE, CS , Cmd/Data .

Can we have some APIs available to do this. Please help.

This topic has been closed for replies.

8 replies

Shri
ShriAuthor
Associate II
Jun 18, 2022 10:21 AM UTC

..

Tesla DeLorean
Guru
Jun 18, 2022 10:25 AM UTC

Not really how this works.

For pins on the Address bus side you'd formulate ​a memory access address within the memory that translates to those pins being high or low.

For the data bus, bits within that word.​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Shri
ShriAuthor
Associate II
Jun 18, 2022 10:32 AM UTC

unable to understand your answer. if possible please elaborate ..thanks

Tesla DeLorean
Guru
Jun 18, 2022 10:41 AM UTC

Interacting with the external memory drives the pins of the FSMC.

Figure the memory address the processor is using here, use a pointer up in the 0x60000000 range.​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Shri
ShriAuthor
Associate II
Jun 18, 2022 10:47 AM UTC

yes, for command and data pins to read/write i am using 0x60000000 and 0x60010000(as i used A16 correct me if i am wrong). But unable to find any way to read/write pins like NOE,NWE,CS ..

Tesla DeLorean
Guru
Jun 18, 2022 12:29 PM UTC

And you'd need to do this why? It's an external memory interface.The control pins are driven by the FSMC peripheral as part of a memory interaction, the timing controlled by the configuration.

The pins should be readable via GPIOx->IDR

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Shri
ShriAuthor
Associate II
Jun 18, 2022 12:39 PM UTC

For various reasons:

(1)To write some commands i have to forcefully set the write pin (NWE)to high while read pin(NOE) to low.

(2)To read/write data from RDR(read data register) /WDR(write data register i have set the RS register(address select).

How FSMC know that whether I want reading or writing?

i am now confused and thinking to use GPIOs instead of FSMC. Can't we have Individual addresses like in case of RS Pin for each pin so that i can change it accordingly ? Please help.