It is a fairly common display controller and not at all difficult to get working. The complete ili9327 datasheet can be found here.
If you are trying to use either the Uno or a Mega to drive this display, did you provide the necessary level translators? If not, you may have let the smoke out (destroyed the device) since the display is a strictly 3.3 volt device on all pins - which means it is not pin to pin compatible with the 5 volt I/O levels of the Uno and Mega boards. Only the Due and the 8mhz pro mini have 3.3 volt I/O.
I dont think its common ILI9327 lcd shields, since its spi 4 wire(MISO,MOSI,SCK,SS), acording to image http://www.mcufriend.com/pic/pi/spi35-2.jpg there is no level translators, itd pin to pin configuration.
on Shield there is MCP23s17 port expander.
if you think its fairly common display, could you please direct me to some example?
Good observation with regard to no level translators.
I say the the ili9327 is common since it is supported by the most commonly used tft lcd library out there, UTFT by Henning Karlsen. Just gogle it, download the most current version and use the AVR serial 240x400 example.
Digidon, sorry the the bad information. I thought UTFT was able to support the 9327 in serial mode, and as you discovered, it cannot.
I have some experience with the ili9327 in parallel mode on a Mcufriend Mega shield. What I found there many months ago was that UTFT did not handle 8 bit mode correctly and several modifications were needed to remove extraneous writes to the device to get the library to function. I had forgotten that I had also purchased one of the serial version 3.5 inch displays at the same time and once I had the parallel shield version working, I put the serial device in the "I'll get to it pile".
Your last post plus some free time last night had me digging the serial version lcd out for some investigation...
My first thought was to use the AVR's native SPI mode to push an initialization string to the device but after reading through the ili9327 datasheet, it was obvious that would not work as the LCD required a 9 bit word since the command/data input was not available. So, it was time to look at hacking UTFT.
The first thing I found was that UTFT uses a clock negative edge data valid scheme and the 9327 expected a positive. Marking that change still did not wake up the display so out came the logic analyzer. Everything looks right but I still have a dead screen.
I'll be able to spend a bit more time on it tonight. If I have any joy, I'll post what I find. Otherwise, no news is bad news...
The Mega shield version is on my Google drive: Ili9327 8 bit UTFT The changes were minimal, UTFT was writing a spurious zero on each low level write call. I just hacked the code with conditional compile code to eliminate the unneeded writes. I also added the display type ILI93278_8. The AVR 400x240 demo file was modified to reflect the shield configuration so it should run as-is if you have the shield and a Mega. I also removed all the non-applicable demo files just to avoid confusion with the modified version.
You may need/want to delete all files in your temp build directory if you had previously installed UTFT and have built a program with it. I don't know the rules that the IDE uses when deciding when to re-build/compile libraries but it does not appear to be the normal source file verses object file time/date compare. I spent many frustrating hours early on with learning about building libraries in Arduino and have found it safer to simply wipe my temp directory clean when editing/changing libraries to force a re-build of all code.
Wow, that has to be the slowest display draw I've ever seen... and while they include the SPI Arduino library, they never use it and the code just bit bang things in a rather incredibly crude manner. Yuck.
I've got a couple of free nights to spend on it, I'll see what I can do. Stay tuned.
Here is a cleaned up version of the demo code. It is still unacceptably slow so I still have some work to do before I would attempt to integrate it into UTFT.
I removed all of the software bit-banging and implemented it with the hardware SPI of the atmega at a 8 mhz clock rate which is as fast as I can run it with a 16mhz processor. Since the the MCP23S17 SPI I/O expander has a max clock rate of 10mhz, I'm not going to do anything further in hardware, I'll look at software for any further improvements. Also removed were unreferenced symbols and routines which just added to the clutter when you're just trying to see the structure and flow of the program.
Overall, I'm thinking it will not be a screamer, throughput wise no matter what - since the I/O expander forces a minimum byte count of three to write one data byte. This is based on the need to write the device address, then a register address, the data and finally a toggle of the LCD WR line to write one byte to the LCD.
I just received five of these ili9327 mcp23s17 3.5" 400x240 displays - without any documentation of course, not even silk screen labling of the four pin J2 and the three pin J1. I should have asked for docs before buying.
Could you do me a favour and post the pin definitions?
I can figure out the pin assignments on the other side of the MCP23S17 from your code, but I need to be able to connect it.
at first - sorry for my poor english,
i got ILI9327 SPI display few days ago from http://www.aliexpress.com/item/Free-shipping-LCD-module-Pi-TFT-3-5-Inch-3-6-inch-TFT-LCD-400x240-Spi/32247107330.html
I start to search for working library, and after testing lot of other libraries without success, i decide to modify linux version,
seler send to my Raspbery (linux) drivers,
after few long nights i modified linux library and got working sketch,
default linux library use software SPI and is wery slow due to 2 things,
one of them - digitalWrite, i changed digitalWrite to direct port access,
the result - about 2-3 times faster speed, but its not enought,
other - software SPI,
now i am trying to change sketch to work with hardware SPI,
its easy, i do this later and post there,
sketch have few errors in line draw and rectangle draw,
now i am working on SPI, later do screen rotate function,
maybe my sketch help someone,
updated sketch with hardware SPI you can find there: