How to read/write NOE,NWE,RS and CS pins of LCD Interface created using FSMC?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-18 3:07 AM
Hello 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.
- Labels:
-
FMC-FSMC
-
STM32CubeMX
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-18 3:21 AM
..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-18 3:25 AM
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.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-18 3:32 AM
unable to understand your answer. if possible please elaborate ..thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-18 3:41 AM
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.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-18 3:47 AM
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 ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-18 5:29 AM
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
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-18 5:39 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-18 6:40 AM
>>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.
Up vote any posts that you find helpful, it shows what's working..
