ili9340 tft display + ATmega16

Hello! I’ve been trying to connect ili9340 tft 2.2" display (this: http://www.ebay.com/itm/200952295233?ss … 1497.l2649) with ATmega16A through SPI. No arduinos.

Datasheet for the display driver could be found here: http://www.hobbytronics.co.uk/datasheets/ILI9340.pdf

Serial interface is described on the page 34 where it says “The 3-line serial mode consists of the chip enable input (CSX), the serial clock input (SCL) and serial data Input/Output (SDA or SDI/SDO).” for AVR’s: CSX means SS, SCL means SCK, SDO means MISO, SDI means MOSI. I am confused about the 4-line serial mode which has Data/Command selection input D/CX (“D/C” pin in the picture on Ebay). My confusion is that shouldn’t commands and data go through MOSI and MISO (SDI and SDO)?

The list of commands is a bit intimidating to me and I have no idea how to do some simple things. I was wondering if anyone could tell me which commands I have to send to the display through SPI in order to 1) initialize it 2) draw a pixel of any specific color 3) change color of the entire screen.

(I do not use arduinos. Please don’t suggest me to use the library made by Adafruit. I mean this: https://github.com/adafruit/Adafruit_ILI9340)

Thanks in advance to anyone who can help!

Since the display doesn’t send data to the micro, you can just connect the ATMega’s MOSI pin to the SDA pin…