Keyboard Shortcuts
Likes
Search
DSI i2c touchscreen connection
I have the bare board for the sbitx v2 and I am planning on making a custom enclosure that suits my preferences. One of my preferences was to use a slightly larger panel. Waveshare supplies a 10.1" panel with a DSI connector. However, it needs separate pins for the touch input over i2c instead of using the RPI's i2c bus that's apparently connected through the official display's DSI connector. I saw some things about something over i2c being finicky on the sbitx and I just want to find out what the best approach might be here to get the panel hooked up and avoid any big issues. This is the panel I have:?https://www.waveshare.com/10.1inch-DSI-LCD-C.htm I'm not too familiar with the Raspberry Pi and for some reason I can't find much info about its DSI connector. Anyone know if the RPI provides access to that same i2c bus that's connected through the DSI connector elsewhere on the board, or would I need to break out the relevant pins from the DSI connector itself? Any other recommendations on connecting the touchscreen input would be hugely appreciated. |
Ecca,
From the information that you provided on the display, it should connect through the DSI port.? It looks like a controller similar to the DSI panel supplied with the full kit.? It may take a different device tree overlay compatible with that display.? Here is a description of how that works: There should be information on how to connect the screen to the Rasberry Pi with the information from the manufacturer.? It is usually a change in the config.txt file in the boot folder.? I found this: Method 2: Program Pre-installed Image1. Select your corresponding Raspberry Pi version image, download, and decompress it as a ".img" file. dtoverlay=WS_xinchDSI_Screen,SCREEN_type=8,I2C_bus=10
dtoverlay=WS_xinchDSI_Touch,invertedx,swappedxy,I2C_bus=10
5. Connect the TF card to the Raspberry Pi, and start the Raspberry Pi, wait for about 30 seconds to display and touch no 73 Evan AC9TU |
For extra clarification, the panel actually has four pogo pin cups that align with the back side of pins 3-6 on the RPI, corresponding to SDA, 5V, SCL, and GND. So while the images on the site seem to show the device connected exclusively through the DSI ribbon, it actually uses those i2c pins on the RPI for the touchscreen input and power.
From what I've heard, the official panel doesn't need to use extra pins at all. Anyway, if I mount the RPI to the display panel, then my concern was that the panel ends up being connected to pins 3-6 and I'm not sure if that i2c bus is the finicky one. If I mount the RPI to the sbitx, I'd need a 40-pin extension and then sort out some extra wires for the touch input and power. |
Ecca,
I think I understand.? I do not have the v2 sbitx.? My sbitx is a DE version, so I can not comment on the V2 board layout. The schematics for the V2 boards are in the GitHub repository: In the file : The codec U4 does use the i2c bus on pins 3 and 5, so that would not be available.? The other i2c is a bit banged user-level code on pins 31 and 33.? That would not work for a system-level function.? There are other i2c buses available on the Pi4s.? You must verify which pins are not used and enable the bus in the configuration. Above are suggestions, as I have not done any of this. 73 Evan AC9TU |
Or just choose any pins you want and use kernel bit-banged i2c driver. I do this way to use kernel-side i2c with GPIO pins that are not really connected to any i2c controller.
toggle quoted message
Show quoted text
- Rafael On 9/27/23 06:19, Evan Hand wrote:
Ecca, |
To use the kernel bb i2c the easy way is to use an overlay specified in /boot/config.txt
toggle quoted message
Show quoted text
eg (just change the bus number, if you want, and the pins): dtoverlay=i2c-gpio,bus=2,i2c_gpio_sda=13,i2c_gpio_scl=6 On 9/28/23 20:19, Rafael Diniz wrote:
Or just choose any pins you want and use kernel bit-banged i2c driver. I do this way to use kernel-side i2c with GPIO pins that are not really connected to any i2c controller. |
Thanks for the tips and suggestions Evan and Rafael. Oddly enough, I thought that this particular panel didn't use the DSI connector for the touchscreen because it only functioned properly when connected through the pogo pins. However, it turned out I had a bad wire. Looks like the 10.1" panel is similarly wired to the official one and works in the same way, with the FPC cable for both video and touch, and a set of wires for power. Any chance there's a way to configure this differently without much issue or is this assumption made in too many places to change easily and I should just reinstall and be stuck with the default username of pi instead? |
Ultimately I ended up using the pi username (which the installer strongly recommended not to do so, but I suppose it is a nonissue considering the use case). I also had to make the appropriate changes to the build file for 64 bit ft8 and compile wiringpi separately, along with a few other minor differences in dependencies that I unfortunately did not document properly, as well as transfer some configs from the original SD card. Anyway, I have Bookworm 64 bit up and running, touchscreen working fine purely through the DSI ribbon and 5v power. Sbitx appears to have compiled successfully, but I haven't managed to get anything working yet. I guess I also need to install and configure a few other things. I'll mess around with the original SD card on a regular monitor and try to compare what is different. The install.txt in the github seems to end abruptly, is there some information that I am missing in order to fully set everything up? |