-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Waveshare 2" 320x240 compatibility? #248
Comments
I am not aware of anyone having tried that display with the driver. There are several other ST7789-based displays that have been used though with a ST7789 driver backend, so it is possible that it can work. |
Hi, sudo apt-get install cmake -y
cd ~
wget https://www.waveshare.com/w/upload/8/8d/Waveshare_fbcp-main.7z
sudo apt-get install p7zip-full
7z x Waveshare_fbcp-main.7z
cd waveshare_fbcp-main
mkdir build
cd build
cmake cmake -DSPI_BUS_CLOCK_DIVISOR=20 -DWAVESHARE_2INCH_LCD=ON -DBACKLIGHT_CONTROL=ON -DSTATISTICS=0 ..
make -j
sudo ./fbcp It works on my Raspberry 3 with Raspberry Pi Desktop Bullseye. For me it was neccessary to disable the new graphic engine dtoverlay=vc4-kms-v3d in /boot/config.txt (see #100 (comment)) and change the DMA Ports as described here #184 (comment) @juj as one can see on the photo, the content on the display has some offset (starts in the middle and has overflow to the right). Any idea why that happens or how to fix this? I allready tryed arround with offset values, but with no success... Line 434 in 4aa3b97
|
Hi guys, after hours of trial and error I have now managed to get the waveshare 2inch LCD display to run correctly on the Raspberry 3B with Raspberry OS Bullseye. In the end, I used the standard fbcp-ili9341 (this repo) (not the modified version of waveshare). However, some modifications were necessary: install fbcpsudo apt-get install cmake
cd ~
git clone https://github.com/juj/fbcp-ili9341.git
cd fbcp-ili9341 vc4-kms-v3dFor me it was necessary to disable the new graphics engine config.hCustomize #define GPIO_TFT_DATA_CONTROL 25
#define GPIO_TFT_BACKLIGHT 24
#define GPIO_TFT_RESET_PIN 27
#define DISPLAY_NATIVE_WIDTH 240
#define DISPLAY_NATIVE_HEIGHT 320
#define DMA_TX_CHANNEL 7 //Change the DMA ports to some free ports
#define DMA_RX_CHANNEL 5
#define STATISTICS=0 //Disable statistics overlay (optional) st7735r.hIn #if defined(ST7789) || defined(ST7789VW)
//#define DISPLAY_NATIVE_WIDTH 240
//#define DISPLAY_NATIVE_HEIGHT 240 st7735r.cIn #ifdef ST7789
// The ST7789 controller is actually a unit with a graphics memory area of 320x240, but only a part of 240x240
// of it is displayed. So if we wanted to swap the above line address mode, writes in the Y=0...239 range would actually be in the
// memory in the range of line addresses Y = 319-(0...239) = 319...80. To see this range, we have to scroll the view by +80 units in Y
// direction so that the contents of Y=80...319 are displayed instead of Y=0...239.
if ((madctl & MADCTL_ROW_ADDRESS_ORDER_SWAP))
//SPI_TRANSFER(0x37/*VSCSAD: Vertical scroll start address of RAM*/, 0, 320 - DISPLAY_WIDTH);
#endif Compile and execute:mkdir build
cd build
cmake -DSPI_BUS_CLOCK_DIVISOR=20 -DST7789=ON ..
make -j
sudo ./fbcp-ili9341 |
Sorry, this is because I accidentally masked an initialization statement, |
bruh I cannot get this to work. . .I have followed every guide and rewired I dont know how many times configured vanilla fbcp repo and even tried the waveshare and im getting no life out of the display |
hi bro Have a nice day |
I know this thread is old but it seems like you guys got the display to run.
And I tried changing the DMA channels but that didnt change anything... Is anybody still "here" and has an idea what is going on? I would appreciate the help cause I cant find a solution nor a thread/post where somebody had similar problems. Thanks! |
If everything works normally at the beginning, it should be the reason for the backlight control. |
That means? I checked the connection and its connected to GPIO 24 which fbcp says too... |
WhatsApp.Video.2024-04-18.at.18.07.52.mp4Here is a clip of what exactly happens. In the video FBCP is already running and I simple use "sudo FRAMEBUFFER=/dev/fb0 startx" to display the desktop on the display. It seems to be a software/connection issue because with my Arduino it works flawlessly... |
It seems that you use auto-start at power on. It is recommended not to set auto-start on power on during the debugging stage. |
I dont. When the rpi is booted up I connect via ssh and start both fbcp and startx manually. |
Closing KMS will not affect VNC work under normal circumstances. |
Well in my case it does. Removing that line (or using # to comment it) results in a gray/black screen. If I undo this change it works again normaly. |
Hi,
I recently saw this waveshare 2" IPS screen https://www.waveshare.com/2inch-lcd-module.htm
It looks very similar to the adafruit 2" IPS screen https://www.adafruit.com/product/4311
except that the waveshare module doesn't have the sdcard slot.
Both have the same controller too: ST7789
Will the driver be compatible with the waveshare display?
My plan is to use it with a rpi-zero-2 W
Thanks
The text was updated successfully, but these errors were encountered: