Questions? Call us: +1 760-918-6722

SPI 3W not working

I’m trying to get the DT018ATFT running in 3-wire SPI mode.
I have connected the display the following way:
Pin 1                      LEDA      =             3.3V
Pin 2                      LED K1  =             130 Ohm to GND
Pin 3                      LED K2  =             130 Ohm to GND
Pin 4                      IM0        =             GND
Pin 5                      IM1        =             GND
Pin 6                      IM2        =             GND
Pin 7                      RCM0    =             GND
Pin 8                      RCM1    =             GND
Pin 9                      SDA        =             serial input signal is sampled on the rising edge of SCL
Pin 10                   VCC        =             3.3V
Pin 11                   GND      =             GND
Pin 12                   RD          =             GND
Pin 13                   RS           =             SCL - Clock
Pin 14-31             DB17:DB0 =        GND
Pin 32                   TE           =             GND
Pin 33                   RES         =             In my code, on Startup, the signal is low, then is set to High for 500ms, then low for 200ms , then always High
Pin 34                   CS           =             CSX, Chip select: Falling Edge enables the serial interface and start data transmission
Pin 35-40                             =             GND
Pin 41                   VDDIO  =             VDD
In my code, I implement the initialization commands of the Display from this thread:
Also I have implemented the SCL – clock as Bit-Banging.

To start a transmission, I did the following:
- First of all, the CSX is set too low to start the data transmission.
- Then It transfers 9bit, the first bit is the indicator for Data/Command, then 8bit Data with MSB first.
- The value of each bits is present at SDA when the edge is rising to high on SCL – Clock.
- After the 9bits are transferred, the CSX is set to high.
To show a few black pixels on the display, I tried the following:
- send Command „Column Adress Set (0x2a)“ with the y coordinate of the pixel
- send Command „Page Adress Set (0x2b)“ with the x coordinate of the pixel
- send Command „Memory Write (0x2c) with the value 0x0000 (16bit) for the color black

The display is not showing anything, so hopefully anybody have an idea, what I’m doing wrong.
The only thing what is working is the backlight.


engineering_seacomp's picture
October 22, 2019


Here are a few tips.

1) Please see timing diagram in 6.2.1 called "3-line Serial Interface Protocol" of the ILI9163C provided on our website.

3-Wire SPI:

Also known as "3-line Serial Interface Protocol", 9-bit data

The following shows the example connections to a micro-controller for 3 wire SPI.

Example code is also provided to display some test patterns to the screen, and a movie of the demo.

2) The following is for ILI9341 based displays, but the 1.8" ILI9163C is very close.  The following is an example of how you verify reads & writes are working.


We hope this helps.


toms77's picture
October 22, 2019

Thanks for your reply.

Now it works!
My code works without any change, just change the connecton of the pins.

This is what I have changed:

Pin 9 SDA -> GND
Pin 31 DB0 -> serial input signal is sampled on the rising edge of SCL
Pin 32 TE -> open
Pin 35 WR -> open

Thanks for your help!

engineering_seacomp's picture
October 22, 2019


Thank you for the wonderful feedback.  Glad to hear it is working.