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] ILI 9335 TFT LCD driver

Status
Not open for further replies.

chipmonk1027

Newbie level 6
Joined
Oct 24, 2012
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,397
Hi guys I recently purchased a 240*320 TFT LCD with an ILI9335 driver I am struggling to understand the datasheet, how to initialize the LCD and display basically just two lines one on top of the other say a blue line and a red line.

If anyone has used these displays successfully please send me a sequence of commands something like
LCD INITIALIZATION
1. Send 0100 to Index Register (0001)
2. Send 0200 to Index Register (0002)

DRAW WHITE LINE
1. Send 0100 to Index Register (0053) // send horizontal start.....
2. Send 0000 to Index Register (xxxx) // set pixel ___ white
3. Repeat set 2 above 320 times // now you have a white line one 1*320 pixels


Please help guys
 

Vbase

Full Member level 6
Joined
Apr 7, 2015
Messages
367
Helped
74
Reputation
148
Reaction score
72
Trophy points
28
Activity points
1,997

    V

    Points: 2
    Helpful Answer Positive Rating

chipmonk1027

Newbie level 6
Joined
Oct 24, 2012
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,397
Hi there Vbase, thank you very much for responding. I checked the site out, the divers are different, yes his using a QVGA TFT but the drivers are different. I'm three weeks in now and I don't understand why they made this sooooo... sooooo complex and there is no tutorial nothing online. Well if I get the hang of this I'll certainly want to make a tutorial because am sure there are other people who will struggle with these ILI drivers. I mean I've worked with the ks0108 for monochrome GLCDs... piece of cake really.. good easy to use.... ILI9335 rubbish
 

Vbase

Full Member level 6
Joined
Apr 7, 2015
Messages
367
Helped
74
Reputation
148
Reaction score
72
Trophy points
28
Activity points
1,997
To my opinion your method of developing your knowledge is correct, you just have the wrong TFT to start with.
I think you will have to get the simple TFT like ST7735 or ILI9341, get them to work and then move up to the more difficult TFT.
What makes ST7735, and some other chips, easy is that most settings are done by the chip manufacturer and you need only a few commands to initiate them. After successful initiation you can teach yourself how to display the pixels.
 

chipmonk1027

Newbie level 6
Joined
Oct 24, 2012
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,397
Hey there Vbase,

Thank you very very much that sounds very sensible, I will do just that immediately. Cheers enjoy your day.

Best Regards

Simbarashe Bryne Chipembe
 

chipmonk1027

Newbie level 6
Joined
Oct 24, 2012
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,397
Hey there Vbase,

Apparently I cant get another type of LCD, I have to work with the ILI9335 I need help... all I need is to display blue on the entire LCD.. here is my code... its not working though..


Code C - [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
//************* Reset LCD Driver ****************//
LCD_nRESET = 1;
DelayNS(1); // Delay 1ms
LCD_nRESET = 0;
DelayNS(10); // Delay 10ms // This delay time is necessary
LCD_nRESET = 1;
DelayNS(50); // Delay 50 ms
//************* Start Initial Sequence **********//
WRITE_LCD_REG(0x01, 0x0100); // driver output control
WRITE_LCD_REG(0x02, 0x0200); // set inverion
WRITE_LCD_REG(0x03, 0x1030); // set entry mode
WRITE_LCD_REG(0x08, 0x0202); // set back & front porch
WRITE_LCD_REG(0x09, 0x0000); // set scan interval
WRITE_LCD_REG(0x0a, 0x0000); // set display control1
WRITE_LCD_REG(0x0c, 0x0000); // set RGB I/F display control
WRITE_LCD_REG(0x0d, 0x0000); // set frame mark position
WRITE_LCD_REG(0x60, 0x2700); // set gate scan control
WRITE_LCD_REG(0x61, 0x0001); // Normally White
WRITE_LCD_REG(0x6a, 0x0000); // set gate scan control
DelayNS(10); //delay 10ms
WRITE_LCD_REG(0x10, 0x1490); // set BT, STB & SLP
WRITE_LCD_REG(0x11, 0x0227); // set VCi1 & step up circuits
DelayNS(20); //delay 80ms
WRITE_LCD_REG(0x12, 0x000c); // set VREGOUT1
DelayNS(10); //delay 50ms
WRITE_LCD_REG(0x13, 0x0300); // set VCOMAC,1000,
WRITE_LCD_REG(0x29, 0x0004); // set VCOMH, 000B,0004,
WRITE_LCD_REG(0x2b, 0x000b); // set frame rate
DelayNS(10); //delay 50ms
WRITE_LCD_REG(0x20, 0x0000); // set Gram horizontal address
WRITE_LCD_REG(0x21, 0x0000); // set Gram vertical address
//============Gamma============
WRITE_LCD_REG(0x30, 0x0000);
WRITE_LCD_REG(0x31, 0x0406);
WRITE_LCD_REG(0x32, 0x0002);
WRITE_LCD_REG(0x35, 0x0402);
WRITE_LCD_REG(0x36, 0x0004);
WRITE_LCD_REG(0x37, 0x0507);
WRITE_LCD_REG(0x38, 0x0103);
WRITE_LCD_REG(0x39, 0x0707);
WRITE_LCD_REG(0x3c, 0x0204);
WRITE_LCD_REG(0x3d, 0x0004);
//=============================
WRITE_LCD_REG(0x50, 0x0000); // set RAM address
WRITE_LCD_REG(0x51, 0x00ef);
WRITE_LCD_REG(0x52, 0x0000);
WRITE_LCD_REG(0x53, 0x013f);
DelayNS(10); //delay 10ms
WRITE_LCD_REG(0x07, 0x0133); // display on
LCD_WriteCommand(0x0022);
DelayNS(10); //delay 10ms
DelayNS(10); //delay 10ms
For i < 76800
sendData(0x1BBF)  //send blue to pixel
Next
 
end

 
Last edited by a moderator:

Vbase

Full Member level 6
Joined
Apr 7, 2015
Messages
367
Helped
74
Reputation
148
Reaction score
72
Trophy points
28
Activity points
1,997
Try moving line 49 to 43.
Try increasing the delay in line 7 to 200ms.

If the init set of commands is successful you get screen full of random coloured pixels.
If the screen is white it means that the init failed.
I'm afraid my experience with ILI9335 is less than yours. Your first attampt looks ok. Try Adafruit and Arduino websites for ideas.
 

chipmonk1027

Newbie level 6
Joined
Oct 24, 2012
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,397
Hi guys that Init code works!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! VBase thank you still.. Anyone having problems with ILI9335.... It ends now!!!!!!!!!! Use that Init code... It was a broken jumper in hardware that was giving me problems
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top