Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
Author: snowbody

fb-tft OK

[Copy link]

10

Threads

220

Posts

1998

Credits

Gold member

Rank: 6Rank: 6

Credits
1998
Post time 2017-7-22 05:19:35 | Show all posts
Edited by nopnop2002 at 2017-7-22 05:45
bumtras replied at 2017-7-21 21:56
I try both of them but they don't work. fb8 appears but the screen stay white (con2fbmap 1 8 do noth ...

Your TFT may not be ILI9481.
Your TFT may be HX8357B or ILI9486.

If your TFT has LCD_RD(Lcd Read) Pin, you can check it using this.

https://github.com/nopnop2002/lcd_id


But as far as a picture is seen, there is no LCD_RD(Lcd Read) Pin in your TFT.

There are a lot of variations in TFT for arduino.
In most cases , the Seller's information aren't right.
The thing you should do first is to check the ID for the driver IC.
LCD_RD is necessary for it.


0

Threads

11

Posts

58

Credits

Registered member

Rank: 2

Credits
58
Post time 2017-7-22 16:39:58 | Show all posts
There is no LCD_RD pin but can I try different inits until I find one that work.
Also can you tell me how you create those inits I want to learn how to do them by myself.

10

Threads

220

Posts

1998

Credits

Gold member

Rank: 6Rank: 6

Credits
1998
Post time 2017-7-22 21:44:39 | Show all posts
Edited by nopnop2002 at 2017-7-22 21:48
bumtras replied at 2017-7-22 16:39
There is no LCD_RD pin but can I try different inits until I find one that work.
Also can you tell m ...

It's hard work that you find a correct answer.
1.Search [Driver's name + Arduino].

For exsample i can find this page.
https://github.com/iot-playgroun ... s/ili9486/initlcd.h

2,It's translated into INIT parameter.

[Before]
case ILI9486:
        LCD_Write_COM(0x11);                // Sleep OUT
        delay(50);

        LCD_Write_COM(0xF2);                // ?????
        LCD_Write_DATA(0x1C);
        LCD_Write_DATA(0xA3);
        LCD_Write_DATA(0x32);
        LCD_Write_DATA(0x02);
        LCD_Write_DATA(0xb2);
        LCD_Write_DATA(0x12);
        LCD_Write_DATA(0xFF);
        LCD_Write_DATA(0x12);
        LCD_Write_DATA(0x00);

        LCD_Write_COM(0xF1);                // ?????
        LCD_Write_DATA(0x36);
        LCD_Write_DATA(0xA4);

        LCD_Write_COM(0xF8);                // ?????
        LCD_Write_DATA(0x21);
        LCD_Write_DATA(0x04);

        LCD_Write_COM(0xF9);                // ?????
        LCD_Write_DATA(0x00);
        LCD_Write_DATA(0x08);

        LCD_Write_COM(0xC0);                // Power Control 1
        LCD_Write_DATA(0x0d);
        LCD_Write_DATA(0x0d);

        LCD_Write_COM(0xC1);                // Power Control 2
        LCD_Write_DATA(0x43);
        LCD_Write_DATA(0x00);

        LCD_Write_COM(0xC2);                // Power Control 3
        LCD_Write_DATA(0x00);

        LCD_Write_COM(0xC5);                // VCOM Control
        LCD_Write_DATA(0x00);
        LCD_Write_DATA(0x48);

        LCD_Write_COM(0xB6);                // Display Function Control
        LCD_Write_DATA(0x00);
        LCD_Write_DATA(0x22);                // 0x42 = Rotate display 180 deg.
        LCD_Write_DATA(0x3B);

        LCD_Write_COM(0xE0);                // PGAMCTRL (Positive Gamma Control)
        LCD_Write_DATA(0x0f);
        LCD_Write_DATA(0x24);
        LCD_Write_DATA(0x1c);
        LCD_Write_DATA(0x0a);
        LCD_Write_DATA(0x0f);
        LCD_Write_DATA(0x08);
        LCD_Write_DATA(0x43);
        LCD_Write_DATA(0x88);
        LCD_Write_DATA(0x32);
        LCD_Write_DATA(0x0f);
        LCD_Write_DATA(0x10);
        LCD_Write_DATA(0x06);
        LCD_Write_DATA(0x0f);
        LCD_Write_DATA(0x07);
        LCD_Write_DATA(0x00);

        LCD_Write_COM(0xE1);                // NGAMCTRL (Negative Gamma Control)
        LCD_Write_DATA(0x0F);
        LCD_Write_DATA(0x38);
        LCD_Write_DATA(0x30);
        LCD_Write_DATA(0x09);
        LCD_Write_DATA(0x0f);
        LCD_Write_DATA(0x0f);
        LCD_Write_DATA(0x4e);
        LCD_Write_DATA(0x77);
        LCD_Write_DATA(0x3c);
        LCD_Write_DATA(0x07);
        LCD_Write_DATA(0x10);
        LCD_Write_DATA(0x05);
        LCD_Write_DATA(0x23);
        LCD_Write_DATA(0x1b);
        LCD_Write_DATA(0x00);

        LCD_Write_COM(0x20);                // Display Inversion OFF
        LCD_Write_DATA(0x00);//C8         

        LCD_Write_COM(0x36);                // Memory Access Control
        LCD_Write_DATA(0x0A);

        LCD_Write_COM(0x3A);                // Interface Pixel Format
        LCD_Write_DATA(0x55);

        LCD_Write_COM(0x2A);                // Column Addess Set
        LCD_Write_DATA(0x00);
        LCD_Write_DATA(0x00);
        LCD_Write_DATA(0x01);
        LCD_Write_DATA(0xDF);

        LCD_Write_COM(0x002B);                // Page Address Set
        LCD_Write_DATA(0x00);
        LCD_Write_DATA(0x00);
        LCD_Write_DATA(0x01);
        LCD_Write_DATA(0x3f);         
        delay(50);
        LCD_Write_COM(0x0029);                // Display ON
        LCD_Write_COM(0x002C);                // Memory Write
        break;

[after]
INIT=\
-1,0x11,\
-2,50,\
-1,0xF2,\
0x1C,\
0xA3,\
0x32,\
0x02,\
0xb2,\
0x12,\
0xFF,\
0x12,\
0x00,\
-1,0xF1,\
0x36,\
0xA4,\
-1,0xF8,\
0x21,\
0x04,\
-1,0xF9,\
0x00,\
0x08,\
-1,0xC0,\
0x0d,\
0x0d,\
-1,0xC1,\
0x43,\
0x00,\
-1,0xC2,\
0x00,\
-1,0xC5,\
0x00,\
0x48,\
-1,0xB6,\
0x00,\
0x22,\
0x3B,\
-1,0xE0,\
0x0f,\
0x24,\
0x1c,\
0x0a,\
0x0f,\
0x08,\
0x43,\
0x88,\
0x32,\
0x0f,\
0x10,\
0x06,\
0x0f,\
0x07,\
0x00,\
-1,0xE1,\
0x0F,\
0x38,\
0x30,\
0x09,\
0x0f,\
0x0f,\
0x4e,\
0x77,\
0x3c,\
0x07,\
0x10,\
0x05,\
0x23,\
0x1b,\
0x00,\
-1,0x20,\
0x00,\
-1,0x36,\
0x0A,\
-1,0x3A,\
0x55,\
-1,0x2A,\
0x00,\
0x00,\
0x01,\
0xDF,\
-1,0x002B,\
0x00,\
0x00,\
0x01,\
0x3f,\         
-2,50,\
-1,0x0029,\
-1,0x002C,\
-3



0

Threads

11

Posts

58

Credits

Registered member

Rank: 2

Credits
58
Post time 2017-7-23 01:01:27 | Show all posts
nopnop2002 replied at 2017-7-22 21:44
It's hard work that you find a correct answer.
1.Search [Driver's name + Arduino].

Thank you! I get it.
I'll try by my self to see what hapend. I will write again if I make a break through or if I have any other question.
Thanks a lot!

0

Threads

11

Posts

58

Credits

Registered member

Rank: 2

Credits
58
Post time 2017-7-26 22:58:39 | Show all posts
I found that the IC is HX8357C (or B) but I think it's set to 16bit mod and I can't use it at 8bit. If that is the case can I use a serial to parallel converter or open the display and manually set the IC to 8bit mod?

10

Threads

220

Posts

1998

Credits

Gold member

Rank: 6Rank: 6

Credits
1998
Post time 2017-7-27 10:55:14 | Show all posts
Edited by nopnop2002 at 2017-7-27 12:12
bumtras replied at 2017-7-26 22:58
I found that the IC is HX8357C (or B) but I think it's set to 16bit mod and I can't use it at 8bit.  ...

If this TFT is 16Bit mode, you can't change.
fbtft_device isn't supporting serial to parallel converter.
When you use OrangePi-PC(or other 40 pin model), there is much GPIO, so you may be able to use fbtft_device.

By the environment of Orangepi - ZERO + 74x595(ShiftRegister),
It's possible to make like this App, But It's hard work.
https://github.com/nopnop2002/ili9325_rpi




0

Threads

11

Posts

58

Credits

Registered member

Rank: 2

Credits
58
Post time 2017-7-27 15:52:25 | Show all posts
nopnop2002 replied at 2017-7-27 10:55
If this TFT is 16Bit mode, you can't change.
fbtft_device isn't supporting serial to parallel conve ...

OK! Thank you!
I guess I am stuck with my TV-OUT display for now.

10

Threads

220

Posts

1998

Credits

Gold member

Rank: 6Rank: 6

Credits
1998
Post time 2017-7-27 21:45:24 | Show all posts
Edited by nopnop2002 at 2017-7-27 21:51
bumtras replied at 2017-7-27 15:52
OK! Thank you!
I guess I am stuck with my TV-OUT display for now.

Why do you stick to this TFT?
if you choose ILI9325/9341/9342/9481, you can get FrameBuffer easily.


0

Threads

11

Posts

58

Credits

Registered member

Rank: 2

Credits
58
Post time 2018-2-9 01:43:24 | Show all posts
Edited by bumtras at 2018-2-9 01:45

Hello!
It's me again
I am resurrecting the project, this time I am using ILI9341 display with my OPi zero. I found this github project which claims to be able to mirror the display faster than the regular fb-tft. So I first downloaded the spi_lcd liblary but I am not able to compile it right. In spi_lcd.c I changed the board to orangepizero and left the GPIO/SPI talk method to generic. In main.c I changed line 81 to:

Then I run:
  1. make
  2. make -f make_sample
  3. ./lcd
Copy the Code

And I get this error:

My programming skills are verry basic so I am missing something or doing something wrong.

Maybe this not the right place to write but I have a positive expirience from hire.
So I will be very happy if someone can help me.
Thanks!

This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x

0

Threads

11

Posts

58

Credits

Registered member

Rank: 2

Credits
58
Post time 2018-2-10 03:05:29 | Show all posts
Edited by bumtras at 2018-2-11 19:41

NVM I fexed it. In main.c line 81 there are not the gpio port numbers but insted phisical pin numbers
Now I am getting other errors
  1. Error setting SPI mode
  2. Error setting SPI speed
  3. Failed to open the SPI bus
Copy the Code

I think I will be able to pass that but everyone who wants to help is wellcome

edit: Now everything works. I just run it as root
So... thanks!
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-11-13 05:19 GMT+8 , Processed in 0.034335 second(s), 20 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list