Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : RP2350-Touch-LCD-2.8

Posted: 03:28am
01 Oct 2025
Copy link to clipboard
ehewlett
Newbie

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
 
Posted: 04:41am
01 Oct 2025
Copy link to clipboard
phil99
Guru


Can only find one supported:-
  Quote  Includes support for FT6336 CAPACITIVE touch chip
OPTION TOUCH FT6336 IRQpin, RESETpin [,BEEPpin] [,sensitivity]
Enables touch support for FT6336 capacitive touch chip. Sensitivity is a number between 0 and 255 - defaults to 50, lower is more sensitive.
SDA and SCK should be connected to valid I2C pins and set up with OPTION SYSTEM I2C.

Edited 2025-10-01 14:44 by phil99
 
Posted: 05:20am
01 Oct 2025
Copy link to clipboard
ehewlett
Newbie

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?
 
Posted: 05:30am
01 Oct 2025
Copy link to clipboard
phil99
Guru


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.
 
Posted: 05:38am
01 Oct 2025
Copy link to clipboard
ehewlett
Newbie

Sigh. No such luck.

The command OPTION TOUCH FT6336 GP17,GP18 returns the following error message:

  Quote  Touch panel ID not found
20 Touch panel not found


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...
 
Posted: 08:12am
01 Oct 2025
Copy link to clipboard
phil99
Guru


LIST SYSTEM I2C should at least tell you what it's address is (in HEX).
 
Posted: 11:03am
01 Oct 2025
Copy link to clipboard
IanT
Senior Member


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
 
Posted: 11:39am
01 Oct 2025
Copy link to clipboard
matherp
Guru

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.
 
Posted: 02:35pm
01 Oct 2025
Copy link to clipboard
PhenixRising
Guru

  matherp said  
The only thing I can suggest with a controller like the CST328 is to write the handler in Basic if you can find how.


Another job for Claude?  
 
Posted: 02:41pm
01 Oct 2025
Copy link to clipboard
PhenixRising
Guru

The manual is too big to upload but Claude requests:

  Quote  When you extract the I2C information, it would be really helpful if you could include:

I2C initialization/setup commands
I2C read/write functions (especially how to read multiple bytes)
How interrupts or GPIO inputs are handled (for the touch IRQ pin)
Any timing or delay functions available

I'll also need to implement the CST328's I2C protocol, which typically involves:

I2C address (usually 0x5A for CST328)
Reading touch point data registers
Parsing X/Y coordinates and touch status

Just come back when you have the relevant sections ready, and I'll create a working driver for you!
 
Posted: 03:35pm
01 Oct 2025
Copy link to clipboard
ehewlett
Newbie

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
 
Posted: 04:11pm
01 Oct 2025
Copy link to clipboard
Arne
Newbie

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
 
Posted: 04:45pm
01 Oct 2025
Copy link to clipboard
JohnS
Guru

  ehewlett said  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

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
 


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025