Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5799

Interfacing (DSI, CSI, I2C, etc.) • Re: How to use round GC9A01 display with ILI9340 from M5Stack M5Dial

$
0
0
Thank You for the quick replies! :-)
Do make sure there is a common GND between the Pi and the display, otherwise communication could be erratic.
Thanks for the tip, that makes sense! But (and forgive me if that question is stupid): Isn't it enough if the power supplies of both devices are plugged into the same outlet / power strip?
I'm using the official USB-C power supply for the Raspberry Pi and since the M5Dial needs >6V, I couldn't just wire it to a Raspi 5V Pin. So therefore I'm using another power supply for it.
I guess If I wanted to have a direct Gnd-Gnd connection between the two devices, I would have to supply the Raspberry Pi with Power via the Pins? If possible, I would like to avoid that...

And @aBUGSworstnightmare:

Thanks for the tip, I tried but was not successful. Here's how it went:

I found this project: https://github.com/carlfriess/GC9A01_de ... n/GC9A01.c
Which is using the GC9A01 on an Arduino board and seems to be working. So I used the init code from there. However, I'm unsure about the beginning. The Arduino init code starts like this:

Code:

void GC9A01_init(void) {        GC9A01_set_chip_select(1);    GC9A01_delay(5);    GC9A01_set_reset(0);    GC9A01_delay(10);    GC9A01_set_reset(1);    GC9A01_delay(120);        /* Initial Sequence */         GC9A01_write_command(0xEF);        GC9A01_write_command(0xEB);    GC9A01_write_byte(0x14);
The lines after "/* Initial Sequence */" are easy to convert into commands:

Code:

command 0xEFcommand 0xED 0x14
and so on.
But what do I do for the "set_chip_select" and other lines above the comment? For now, I just left them out, but that doesn't seem right...

Also, in Your post here (viewtopic.php?t=358240&hilit=Ili9341#p2165638) you also posted a dtoverlay example. I'm curious, how did you get the line

Code:

dtparam=write-only,cpha,cpol
The "write-only" I can find in Notro's Project wiki. But what are "cpha" and "cpol", and how do I find out if I need that?

Unfortunately, after I converted the Arduino init code to MIPI commands and that to binary (using Notro's Python Script, and following the steps in its Wiki and Your post I linked above), I couldn't get the display to work. I can see a new, second screen named "SPI" in Raspberry Pi OS, and I also have a /dev/fb1 device file (but maybe that is still there from when I was using the GC9A01 dtoverlay?), but there is nothing displayed on the M5Dial.

I also found this thread on an Arduino forum: https://forum.arduino.cc/t/240x240-roun ... d/661217/7
Where it is mentioned that many commands are not documented in the Data Sheet. Seems to be a problem with GalaxyCore products in general. :?

Do You maybe have any more guidance on how to proceed?
German is not a problem if that makes things easier. (I'm wildly assuming, since one of your attached images was called "Bildschirmfoto..." :D )

Statistics: Posted by st_jwinter — Wed Feb 07, 2024 10:55 am



Viewing all articles
Browse latest Browse all 5799

Trending Articles