Menu | JAQForum Ver 19.10.27 |
Forum Index : Microcontroller and PC projects : RP2350-Touch-LCD-2.8
I've just acquired two RP2350-Touch-LCD-2.8 boards from Waveshare, and have put PicoMite BASIC on them, and am loving them. Unfortunately, however, the touchscreen on them is capacitative, rather than resistive - well, fortunately, really, but UNfortunately because I'm unable to get the touchscreens working on them on PicoMite BASIC... probably because they are capacitative. Here's my OPTION LIST: PicoMite MMBasic RP2350A Edition V6.00.03 OPTION SYSTEM SPI GP10,GP11,GP12 OPTION SYSTEM I2C GP6,GP7 OPTION FLASH SIZE 16777216 OPTION COLOURCODE ON OPTION PICO OFF OPTION CPUSPEED (KHz) 150000 OPTION LCDPANEL CONSOLE OPTION DISPLAY 20, 40 OPTION LCDPANEL ST7789_320, LANDSCAPE,GP14,GP15,GP13,GP16 OPTION TOUCH GP17,GP18 OPTION SDCARD GP24, GP19, GP20, GP21 And here's the link to the Waveshare wiki page on the device: https://www.waveshare.com/wiki/RP2350-Touch-LCD-2.8 OPTION PICO is OFF because the RP2350 chip is built in, and setting PICO OFF makes GP24 available to the SDCARD. My biggest hope is to somehow get the touchscreens working under PicoMite BASIC. Any help in this regard that anyone might be able to offer would be much appreciated! I seem to sort of have gotten touch working with "OPTION SYSTEM I2C GP6,GP7" and then "OPTION TOUCH GP17,GP18", but when I use the "GUI CALIBRATE" command, it gets the first touch fine but errors out on the second touch with the error message, "Touch hardware failure 4095,4095,4095,4095". ChatGPT's diagnosis of the problem is that my board 'uses a CST328 capacitive controller over I²C, not SPI. It never drives MISO, and it doesn’t understand the SPI commands PicoMite is sending. So when GUI CALIBRATE runs, PicoMite asks the SPI touch chip for coordinates, gets all 1s (0xFFF = 4095), and reports a “hardware failure.”' Has anyone else tried to get PicoMite BASIC working on one of these boards? If so, any luck with the touchscreen? Or is support for capacitative touch on the drawing board for an upcoming version of PicoMite BASIC? Edited 2025-10-01 14:17 by ehewlett |
||||||
Can only find one supported:- Edited 2025-10-01 14:44 by phil99 |
||||||
Hmm... I see. Thanks! I missed that option. The touch chip, however, is clearly CST328 over I2C. I'll see if by some chance the option is compatible with my unit's chip... maybe there's a consistent method of communication with capacitative touch chips. What do you think the odds are that the FT6336 and the CST328 are compatible? |
||||||
You would need to download the data sheets to compare them. Or, as you indicated just give it a go. First remove the resistive touch with OPTION TOUCH DISABLE. |
||||||
Sigh. No such luck. The command OPTION TOUCH FT6336 GP17,GP18 returns the following error message: Guess my next option is to dive into the data sheets. I've also glanced at the C code for PicoMite BASIC on the GitHub repo, but that's intimidating... especially since I don't know C! But knowing there's something in there for the FT6336 capacitative touch chip at least gives me something to look for... |
||||||
LIST SYSTEM I2C should at least tell you what it's address is (in HEX). |
||||||
My memory is not what it was but I seem to recall setting up my Waveshare 2.8" for touch when it first arrived (just to test it) but I was using a Pico 1 (directly plugged in) at that time. It is currently set-up with a new Pico 2 (on a Quad Extender) but I haven't enabled 'Touch' because I don't need it for current uses. I'm away at the moment but can try it on return if you've not resolved your issue by then... Regards, IanT |
||||||
The Waveshare displays I've got all have resistive touch screens using the XPT2046 which has been around forever, seems to be ubiquitous for resistive touch and is of course fully supported by MMBasic. There seem to be an unending variety of capacitive touch controllers - all different - and some extremely difficult to drive (GT911) which makes it impossible to support all of them in MMbasic. I added the FT6336 because it is fairly common and very simple to drive but the driver won't work with any of the other controllers (including another FT variant). The only thing I can suggest with a controller like the CST328 is to write the handler in Basic if you can find how. It's simply not possible to add all these different controllers to MMbasic. I already have more TFT displays sitting in a box that I bought to add support than I know what to do with. ![]() |
||||||
Another job for Claude? ![]() |
||||||
The manual is too big to upload but Claude requests: |
||||||
Wow! A reply from the great Peter Mather himself! (Thanks, Peter. Big fan here!) That’s about as definitive as it gets, I guess. Unfortunately for me, it’s a definitive no. I totally understand, of course. I remember back in the days of the TRS-80 Color Computer, someone lamenting, in an edition of the Rainbow Magazine dedicated to printers, how frustrating it was to support every new printer that came on the market. I’d offer to send you a RP2350-Touch-LCD-2.8, ‘cause it’s such a nice piece of kit, but I don’t want to add to your frustration - or your box of discarded touchscreens! I’m not a hardware guy - and, despite that, I actually have a working PS2/VGA PicoMite, for which I learned to solder and soldered myself, as well as two HDMI/USB PicoMites (since JCLPCB had a minimum order of two boards at the time), because I love BASIC and I love what you guys are doing. My hope, as not-a-hardware-guy, was that the RP2350-Touch-LCD-2.8 could be the platform for my project of porting my favourite BASIC game to a PicoMite, as it not only has capacitative touch, but also has a battery charging circuit built in - and it’s only about $30CAD. I’ve been at this project for a while now, chronicling the ups and downs of it on my blog. https://blog.ehewlett.net/2025/02/stellar-distractions-building-boot-to.html https://blog.ehewlett.net/search/label/Stellar%20Empires I’ve finally got my basic port up and running (haven’t done a post on that yet), and was hoping to move to adapting the interface for touchscreen, which seemed the most promising route to go - and still does, given the challenges of keyboard input on the Pico. (Plus, my vision is for a self-contained portable BASIC gaming device.) Maybe I’ll just have to go back to my old resistive touch Waveshare screens, which inspired the project. Or maybe I’ll have to get Claude to help me. ChatGPT volunteered to write me a handler for the touchscreen in BASIC, but what it gave me was an unusable mess. I have enough experience programming in other languages, that I also figure I might be able to do C, if I could figure out how and where the various drivers are in Peter and Geoff’s codebase on GitHub (especially now that I know that one does exists for one capacitative screen!), but if a BASIC subroutine will do, I suppose that would be the easier way to go. Anyhow, thanks for the help and feedback everyone. Reminds me of the “good old days” of BBSs and discussion boards! Any further help and suggestions would also be greatly appreciated! Edited 2025-10-02 01:37 by ehewlett |
||||||
Hello, I played in the past with this touchscreen. Here you can find my test program based on the datasheet. Due it is multitouch I implemented „2 fingers“ only. TouchTST.zip Have Fun, Arne |
||||||
If you still have hardware issues (USB / reset / ...) you might like to put them on here (new thread?) as people here may be able to figure what's wrong. John |
||||||
![]() |
The Back Shed's forum code is written, and hosted, in Australia. |