cancel
Showing results for 
Search instead for 
Did you mean: 

FSMC + ILI9341

khouja_houssem
Associate II
Posted on February 12, 2013 at 16:18

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.  
7 REPLIES 7
Posted on February 12, 2013 at 17:05

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)
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
khouja_houssem
Associate II
Posted on February 12, 2013 at 17:34

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.

khouja_houssem
Associate II
Posted on February 13, 2013 at 23:26

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? 

mesihkilinc
Associate
Posted on March 25, 2013 at 15:34

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: 

http://blog.csdn.net/licaihuameng/article/details/7660615

Have a nice day!

khouja_houssem
Associate II
Posted on March 25, 2013 at 19:21

Thanks a lot kilinc.mesih!! I already solved and tested it and it is going allright!!

I appreciate your help.
kkarasti
Associate II
Posted on July 12, 2013 at 16:18

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!

Kraig

zakaria
Associate
Posted on July 24, 2015 at 11:32

Kraig,

I'm also working with a same project. Could you please help by sharing your  source code?

thank you a lot ^^