Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:33 04 May 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Touch not working on WaveShare RP2350-Touch-LCD-3.5-C module

Author Message
Canada_Cold
Regular Member

Joined: 11/01/2020
Location: Canada
Posts: 56
Posted: 03:13pm 25 Apr 2026
Copy link to clipboard 
Print this post

Hi,
I have a WaveShare RP2350-Touch-LCD-3.5-C module.  This is a 2350B with ST7796 LCD and a FT6336 touch controller.  The LCD works great.  However, each time I try to setup the Touch option and calibrate (GUI CALIBRATE) the touch the system locks up.
The info is here - https://docs.waveshare.com/RP2350-Touch-LCD-3.5
The schematic - https://files.waveshare.com/wiki/RP2350-Touch-LCD-3.5/RP2350-Touch-LCD-3.5.pdf

Here is the sequence I’m using, am I doing something wrong?

>
> option reset
> option list
PicoMite MMBasic RP2350B V6.02.00
OPTION FLASH SIZE 16777216
OPTION COLOURCODE ON
OPTION PICO OFF
OPTION CPUSPEED (KHz) 200000
>
> OPTION SYSTEM SPI GP18,GP19,GP16
> OPTION LCDPANEL ST7796S,RL,GP20,GP23,GP21,GP22,INVERT
>
>
> GUI TEST LCDPANEL
(The GUI test runs OK)
>
> OPTION SYSTEM I2C GP34, GP35
> OPTION TOUCH FT6336 GP24, GP25
> GUI CALIBRATE

(At this point I now have the first target on the screen and the message “Touch Target and Hold”.  The system is now locked up and a power cycle is required to get it restarted.)

PicoMite MMBasic RP2350B V6.02.00
Copyright 2011-2025 Geoff Graham
Copyright 2016-2025 Peter Mather

> option list
PicoMite MMBasic RP2350B V6.02.00
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION SYSTEM I2C GP34,GP35
OPTION FLASH SIZE 16777216
OPTION COLOURCODE ON
OPTION PICO OFF
OPTION CPUSPEED (KHz) 200000
OPTION LCDPANEL ST7796S, RLANDSCAPE,GP20,GP23,GP21,GP22,INVERT
OPTION TOUCH FT6336 GP24,GP25,,50
>
> print MM.INFO$(TOUCH)
Ready
>
>

Any help would be appreciated.  Or any suggestions on other testing I should do to debug the issue.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8800
Posted: 03:47pm 25 Apr 2026
Copy link to clipboard 
Print this post

That's a capacitive touch screen. I *think* it's supported now - the only one that is IIRC. Leave the extra arguments off the OPTION TOUCH.
Edited 2026-04-26 01:54 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
mozzie
Senior Member

Joined: 15/06/2020
Location: Australia
Posts: 288
Posted: 04:17pm 25 Apr 2026
Copy link to clipboard 
Print this post

G'day Canada,
These are quite a nice display unit.

Try LIST SYSTEM I2C first and see if you get a response at address &H38, this is the touch controller so needs to respond, if not check wiring.

The TOUCH INTERRUPT pin must be working (GP24 in your system), this is a green wire on the unit I have here. If this isn't working you will not get a response from the touch calibration.

Good Luck.

Regards, Lyle.
 
Canada_Cold
Regular Member

Joined: 11/01/2020
Location: Canada
Posts: 56
Posted: 02:39pm 28 Apr 2026
Copy link to clipboard 
Print this post

Hi Guys,

I just wanted to say thank you to Mick and Lyle for your help.  

Based on your suggestions I did a lot of testing and found I had made a very stupid mistake.   I had the parameters on the touch command reversed.    I did a total reset on the unit, reentered the updated commands and now the touch is working great.

Lyle, I hadn’t seen the “LIST SYSTEM I2C” command before and it was very helpful.    I’m going to try getting the RTC working next.  It’s a PCF85063 rather than a PCF8563 that is listed in the User Manual.  I’ll post something if I get it working.

Again, thanks for your help.

Don
 
NPHighview

Senior Member

Joined: 02/09/2020
Location: United States
Posts: 219
Posted: 02:49pm 28 Apr 2026
Copy link to clipboard 
Print this post

Don, could you please list all your options now for the fully functional display and touch? Thanks!
Live in the Future. It's Just Starting Now!
 
Canada_Cold
Regular Member

Joined: 11/01/2020
Location: Canada
Posts: 56
Posted: 04:02pm 28 Apr 2026
Copy link to clipboard 
Print this post

Hi NPHighview,

Of course.  Here is the option list I have now:

> option list
PicoMite MMBasic RP2350B V6.02.01
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION SYSTEM I2C GP34,GP35
OPTION FLASH SIZE 16777216
OPTION COLOURCODE ON
OPTION PICO OFF
OPTION CPUSPEED (KHz) 200000
OPTION LCDPANEL ST7796S, RLANDSCAPE,GP20,GP23,GP21,GP22,INVERT
OPTION TOUCH FT6336 GP25,GP24,,50
GUI CALIBRATE 1, 478, 10, -9767, 9386
>

I used the following to enable the LCD:

OPTION SYSTEM SPI GP18,GP19,GP16
OPTION LCDPANEL ST7796S,RL,GP20,GP23,GP21,GP22,INVERT

And I used the following to enable the Touch:

OPTION SYSTEM I2C GP34,GP35
OPTION TOUCH FT6336 GP25,GP24
GUI CALIBRATE

I used the following to test the LCD and the Touch:

GUI TEST LCDPANEL
GUI TEST TOUCH

The LIST SYSTEM I2C command that Lyle suggested was very helpful as well.

> LIST SYSTEM I2C
HEX  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- 34 -- -- -- 38 -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- 6B -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 7E --
>

Don
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3180
Posted: 10:27pm 28 Apr 2026
Copy link to clipboard 
Print this post

  Quote   I’m going to try getting the RTC working next.  It’s a PCF85063 rather than a PCF8563 that is listed in the User Manual.

You may be able to adapt this Sub for a PCF85063A. It reads the values of Date$ and Time$ and loads them into the RTC.
Your LIST SYSTEM I2C shows the RTC is at address &H51 which this sub is also uses so it might work without modification, however it was written from the datasheet but not tested on an actual PCF85063A.
If you need to modify it RTCs use binary coded decimal, 2 digits per byte, for the date and time values.

Sub PCF85063A.Set 'Set Date$ and Time$ first then call PCF85063A.Set to set the RTC
  Local T$=Time$+" "+Date$ ' "hh:mm:ss dd-mm-20yy"
  Local integer dt(7), n
  dt(0)=4 : dt(1)=Val(Mid$(T$,7,2)) : dt(2)=Val(Mid$(T$,4,2)) : dt(3)=Val(Left$(T$,2))
  dt(4)=Val(Mid$(T$,10,2)) : dt(5)=0 : dt(6)=Val(Mid$(T$,13,2)) : dt(7)=Val(Right$(T$,2))
  'Start at register address 4, seconds, minutes, hours, day, DoW=0, month, year (2 digit)
  For n = 1 To 7 : dt(n) = (dt(n)\10 << 4)+(dt(n) Mod 10) : Next 'convert integer bytes to BCD
  I2C WRITE &H51,0,8,dt() 'send data to RTC
  Print "PCF85063A RTC time and date have been set to "+T$ ' : Math v_print dt()
End Sub

It's from this thread
At the end of the thread @Arne has provided his Set and Get programs for the PCF85063A.

In the manual Apendix B, I2C Communication, Examples, there is a program to read the time from a PCF8563.
It could be adapted by changing:-
I2C2 WRITE &H51, 0, 1, 3
to
I2C2 WRITE &H51, 0, 1, 5

Adding seconds and date.
DIM AS INTEGER RData(6) ' this will hold received data
'SETPIN GP6, GP7, I2C2 ' assign the I/O pins for I2C2 - skip for SYSTEM I2C
'I2C2 OPEN 100, 1000 ' open the I2C channel - skip for SYSTEM I2C
I2C2 WRITE &H51, 0, 1, 4 ' set the first register to 4
I2C2 READ &H51, 0, 7, RData() ' read 7 registers
'I2C2 CLOSE ' close the I2C channel - skip for SYSTEM I2C
PRINT "Time is " hex$(RData(2),2) ":" hex$(RData(1),2) ":" hex$(RData(0),2) 'display the BCD coded data
PRINT "Date is " hex$(RData(3),2) "-" hex$(RData(5),2) "-20" hex$(RData(6),2) 'display the BCD coded data

Edited 2026-04-30 11:05 by phil99
 
Canada_Cold
Regular Member

Joined: 11/01/2020
Location: Canada
Posts: 56
Posted: 06:17pm 30 Apr 2026
Copy link to clipboard 
Print this post

Hi phil99,

Thanks for the tip.  With a little modification to match my board the Set and Get programs for the PCF85063A worked great.

Don
 
Print this page


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

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