Skip to main content
Shri
Associate II
June 18, 2022
Question

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

  • June 18, 2022
  • 3 replies
  • 4861 views

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.

3 replies

Shri
ShriAuthor
Associate II
June 18, 2022

..

Tesla DeLorean
Guru
June 18, 2022

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Shri
ShriAuthor
Associate II
June 18, 2022

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

Tesla DeLorean
Guru
June 18, 2022

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Shri
ShriAuthor
Associate II
June 18, 2022

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
June 18, 2022

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Shri
ShriAuthor
Associate II
June 18, 2022

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.