Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[General] TFT Display ILI9163 4WIRE SPI Interface trouble

Status
Not open for further replies.

colvstef

Newbie level 4
Joined
Mar 30, 2008
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,353
Hi,
i have trouble to ini display. Please help me. My hardware config. its ok?
I attach hardware schematic and spi signal .

Thanks,
Stef
 

Attachments

  • SPI sample.jpg
    SPI sample.jpg
    67.8 KB · Views: 126
  • SPISCH.jpg
    SPISCH.jpg
    66.1 KB · Views: 123

Can you put up the code also?From the hardware details you have shared,it looks like it is working perfectly.
 
I write in assembler but i use macro command for clear reading my code.



Code dot - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
;=======================================================
    bcf CS_LCD      ; chip select TFT IC
    call    Delay5ms
 ;=======================================================
; Hard Reset
    bsf RST_LCD
    call    Delay10ms
    bcf RST_LCD         ; hard reset
    call    Delay100ms
    bsf RST_LCD
    call    Delay100ms
;=======================================================
; SDT018ATFT RGB Interface Initialization Code
; **broken link removed** Code#.VCktHlPBBCh
 
        write_command(0x01)     ;   soft reset
        call    Delay100        ;    delay(100);//delay 100ms
   
        write_command(0x11)     ;  //Exit Sleep   
        call    Delay100        ; delay(100);
 
        write_command(0x3A)     ;  //Set Interface Pixel
        write_index(0x66)       ;//18bit RGB IF    
        call    Delay100        ;¡@¡@¡@delay(100);
        
    write_command(0x26)     ;    //Set Default Gamma
                write_index(0x04);
  
        write_command(0xf2);     //E0h & E1h Enable/Disable
        write_index(0x01)       ;
  
        write_command(0xE0)     ;    
        write_index(0x3F)       ;
        write_index(0x25)       ;
        write_index(0x1C)       ;
        write_index(0x1E)       ;
        write_index(0x20)       ;
        write_index(0x12)       ;
        write_index(0x2A)       ;
        write_index(0x90)       ;
        write_index(0x24)       ;
        write_index(0x11)       ;
        write_index(0x00)       ;
        write_index(0x00)       ;
        write_index(0x00)       ;
        write_index(0x00)       ;
        write_index(0x00)       ;
        
        write_command(0xE1)         ;    //Negative Gamma Setting
        write_index(0x20)       ;
        write_index(0x20)       ;
        write_index(0x20)       ;
        write_index(0x20)       ;
        write_index(0x05)       ;
        write_index(0x00)       ;
        write_index(0x15)       ;
        write_index(0xA7)       ;
        write_index(0x3D)       ;
        write_index(0x18)       ;
        write_index(0x25)       ;
        write_index(0x2A)       ;
        write_index(0x2B)       ;
        write_index(0x2B)       ;
        write_index(0x3A)       ;
               
 
        write_command(0xB1)         ;   Frame Rate Control
        write_index(0x08)       ;//08
        write_index(0x08)       ;//14
        
        write_command(0xc0)         ;     //Set VRH1[4:0] & VC[2:0] for VCI1 & GVDD
        write_index(0x14)       ; //0A 
        write_index(0x02)       ;
        
        write_command(0xC1)         ;    //Set BT[2:0] for AVDD & VCL & VGH & VGL
        write_index(0x02)       ;
      
        write_command(0xC5)         ;     //Set VMH[6:0] & VML[6:0] for VOMH & VCOML
        write_index(0x1d)       ;   //1a
        write_index(0x4a)       ;  //4a
        
        write_command(0xC7)         ;     //Set VMH[6:0] & VML[6:0] for VOMH & VCOML
        write_index(0xCa)       ;   //d0   modify the fliker
  
        write_command(0x2A)         ;     //Set Column Address
        write_index(0x00)       ;
        write_index(0x00)       ;
        write_index(0x00)       ;
        write_index(0x7F)       ;
        
        write_command(0x2B)         ;     //Set Page Address
        write_index(0x00)       ;
        write_index(0x00)       ;
        write_index(0x00)       ;
        write_index(0x9F)       ;
        
        write_command(0xEC)         ;   ????????????
        write_index(0x0C)       ;
        
        write_command(0x36)         ;  //Set Scanning Direction
        write_index(0xC8)       ;
        
        write_command(0x29)         ;   // Display On   
        write_command(0x2c)         ;  //WRITE ram Data display 
        call    Delay100    ;   delay(100);
 
 
 ;and i try to write ram data display but i don't view any modification on ;display
;i try Display Inversion Off/Off command and i suppose to change color of ;display but i don't view any ;modification on display.
 
 I don't know ?
 
 
;-------------------------------------------------------------
write_index macro   value
    movlw   value
    movwf   BUFFER
    call    Parameter
    endm
;-------------------------------------------------------------
write_command   macro   value
    movlw   value
    movwf   BUFFER ; store register 
    call    Command
    endm
;-------------------------------------------------------------
Command:
    bcf D_CX        
    nop
    nop
    nop
    nop
    nop
    movf    BUFFER,0
    movwf   SSP2BUF
 
 
LOOP_WC 
    BTFSS SSP2STAT, BF ;Has data been received (transmit complete)? 
    BRA LOOP_WC ;No 
    bcf SSP2STAT, BF 
    bsf D_CX
 
    return
 
;---------------------------------------------------
Parameter:
    bsf D_CX        
    nop
    nop
    nop
    nop
    nop
    movf    BUFFER,0
    movwf   SSP2BUF
 
 
LOOP_WI 
    BTFSS SSP2STAT, BF ;Has data been received (transmit complete)? 
    BRA LOOP_WI ;No 
    bcf SSP2STAT, BF 
 
    return
;---------------------------------------------------

 
Last edited by a moderator:

Line 12 says SDT018ATFT RGB interface,but actually SDT018ATFT is a LCD.You want to drive a ILI9163,which is a TFT device,using SPI.Try and find another driver for your device,because the code you just gave,will not give you the required result.
 


On page no. 6 in the datasheet,4 pins that look relevant to controlling the operation of the TFT unit are PCLK(pixel clock),DE(data enable),HS(horizontal sync),and VS(vertical sync).Go through this datasheet again to know the relevant input(s) that need to be given to these pins and give it through the data pins.
 

Thank you for your relpy,

I understand what you are telling me, but as you can see in the picture form my first post, i have selected a Serial SPI and MCU mode and according to the datasheet I don't need the RGB pins.

Can this display be used on 4 wire SPI communication or just on the 3 wire communication because i can't find the way to set the 4 wire communication up.
 

DT018ATFT display not work:
4 wire SPI
6800 parallel interface

The manufacturer's documentation mislead you.
They did lose your time, my time and money. It's not fair.
Thanks to those who tried to help me
Stef
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top