cancel
Showing results for 
Search instead for 
Did you mean: 

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

Shri
Associate II

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.

8 REPLIES 8
Shri
Associate II

..

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
Up vote any posts that you find helpful, it shows what's working..

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

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

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 ..

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
Up vote any posts that you find helpful, it shows what's working..

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.

>>How FSMC know that whether I want reading or writing?

The MCU is either trying to LOAD or STORE to a memory location

When you read a memory location in the external memory space it performs a read action on the bus/memory. When you write data back it performs a write operation, the MCU and peripherals are designed to do this without you fiddling with the pins via secondary methods.

The RS pin should be connected to an ADDRESS PIN on the bus, it's state is a reflection of the memory address being accessed, in binary.

My expectation is the NOE / NWE will be high most of the time, only one will be LOW, depending on the memory region being accessed falls in the range it is decoding for, and the READ/WRITE based on the action being performed, where only one is active (low) at a time.

Perhaps use GPIO, your grasp of MCU buses and interfaces seems at that level.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..