2013-02-12 07:18 AM
Hi,
I am trying to control an ILI9341 LCD driver using FSMC interface. The CS driver pin is responsable of switching between sending Data or command and I think that I should connect it to one of the FSMC address lines but I am not sure wich one. Is there any document that can help through? It will be really helpful if someone can provide me a detailed document about the FSMC interface.2013-02-12 08:05 AM
I think that I should connect it to one of the FSMC address lines but I am not sure which one.
Pick one, and reflect that in the memory address offset you use to access the command/data spaces. Remember if using 16-bit bus the address pins have a right shifted representation, ie A15 externally will be A16 internally (+0x10000)
2013-02-12 08:34 AM
Thank you for the quick answer.
Actually I did. I picked the A0 address pin and NE4 as a chip select signal. That makes my base address as follow: 0x6C000000+2**(0+1)=0x6C000002.
Unlike ILI9320, I need to send a command then a serie of paramters as datas (the way it is done in the ILI9341 application note http://www.wdflcd.com/xz/ILI9341_AN_V0.6_20110311.pdf).
I wanted to know if i can control the RS signal provided by the A0 pin, so i can send the command first then datas, or the FSMC manage to switch RS automatically. If so, is there any diagram that shows how does the signal in A0 pin goes.
Thanks again.
2013-02-13 02:26 PM
Since I didn't get answer I will try to make myself more clear. In ILI9341 I need to send command then a serie of parameters as datas. So i need to specify if my information is a command or data by switching the RS state (Low for command and High for Data). The RS pin is connected to A0 signal. So my quetion is can I manipulate the state of A0 signal, and if not how can specify if I am sending a command or a data via the FSMC interface?
2013-03-25 07:34 AM
Hi,
You have to first calculate your base address. For example base address of Bank1 of NOR/SRAM Bank1~4 is 0x60000000.This address (0x60000000) is your command address.Then according to your Address line pin you have to calculate data address.For A16 you can callculate like this;RAM base address = 0X60020000 = 0X60000000 +2 ^ 16 * 2 = 0X60000000 + 0X20000 = 0X60020000 This address is your data address.Example code:#define Bank1_LCD_D ((uint32_t) 0x60020000) // Disp Data ADDR for A16#define Bank1_LCD_C ((uint32_t) 0x60000000) // Disp Reg ADDR void LCD_WR_REG(__IO u16 index){ ((*(__IO u16 *) (Bank1_LCD_C)) = ((u16)index));}void LCD_WR_CMD(__IO u16 index,__IO u16 val){ (*(__IO u16 *) (Bank1_LCD_C)) = ((u16)index); (*(__IO u16 *) (Bank1_LCD_D)) = ((u16)(val));}void LCD_WR_Data(__IO u16 val){ ((*(__IO u16 *) (Bank1_LCD_D)) = ((u16)(val)));}source: Have a nice day!2013-03-25 11:21 AM
Thanks a lot kilinc.mesih!! I already solved and tested it and it is going allright!!
I appreciate your help.2013-07-12 07:18 AM
hosS,
I'm also working with a display using this controller. It's my first time with a TFT and using the FSMC bus. Could you possibly help by sharing your hardware config and some config source code?Thanks!Kraig2015-07-24 02:32 AM