2017-02-19 03:30 PM
I am trying to implement FSMC in order to drive an ili9341 LCD in 8080 mode. However to distinguish between command and data I need to toggle the RS(register select pin) which according to reference manual AN2790 should be connected to pin Ax. It appears that the Ax pin is just always LOW, and I don't know how to toggle it.
I am using HAL_SRAM_Write8b(&hsram1, (uint32_t *)0x60000000, buff, sizeof(buff)); and it appears to work as I can toggle the LCD display on and off, which leads me to beleave that it recognises commands I just need to toggle Ax HIGH so that I can send paramaters.
I am using an stm32f407vgt6.
#stm32f4-discovery #lcd #fsmc #tft #sramSolved! Go to Solution.
2017-02-19 08:00 PM
You posed a question about A16, I provided you the context for the 0x60000000 + 0x20000 for the 16-bit case, and your 8-bit case.
For A0
(1 << 0) = 0x1 // 8-bit
(1 << (0 + 1)) = 0x2 // 16-bit
For Ax
(1 << x) // 8-bit
(1 << (x + 1)) // 16-bit
2017-02-19 04:58 PM
Access an address where the address bit in question get to be high. ie 0x60008000 (A15 8-bit mode, A14 16-bit mode)
2017-02-19 06:24 PM
If I can just find where the addresses are mapped I would understand. If there is like a table with the mappings that would be super helpful. I have looked around everywhere and everyone uses addresses:
0x60020000 for ram and 0x60000000 for command but they all use 16bit mode.
I am using 8bit mode and I want with A
The attachment is an excerpt from the TFT LCD document mentioned above and lists some addresses for A0 and A4, but I don't know how they get those values
________________ Attachments : Capture.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hytb&d=%2Fa%2F0X0000000bDn%2FVNLXzyubon3CnRO5595EfwhL4DmecMNll_fH4Zt.XUw&asPdf=false2017-02-19 06:54 PM
The 16-bit bus doesn't need an A0 pin so the address bits on the bus shift, it's explained in either the Data Sheet or Reference Manual on the FSMC if you need some confirmation. It is a binary bus, you really shouldn't need a table.
(1 << 16) = 0x10000 // 8-bit
(1 << (16 + 1)) = 0x20000 // 16-bit
2017-02-19 07:51 PM
Why are you still shifting it left 16bits if in your first example it is 8bit mode?
Is it because I am using A16?
2017-02-19 08:00 PM
You posed a question about A16, I provided you the context for the 0x60000000 + 0x20000 for the 16-bit case, and your 8-bit case.
For A0
(1 << 0) = 0x1 // 8-bit
(1 << (0 + 1)) = 0x2 // 16-bit
For Ax
(1 << x) // 8-bit
(1 << (x + 1)) // 16-bit
2017-02-19 08:19 PM
Thanks for all the help, that worked