Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Pico 2 and Pico 1 Touch Macropad fixes #3

Open
TobiasVanDyk opened this issue Jul 15, 2023 · 0 comments
Open

Pico 2 and Pico 1 Touch Macropad fixes #3

TobiasVanDyk opened this issue Jul 15, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation igu I give up NOk Not Ok

Comments

@TobiasVanDyk
Copy link
Owner

TobiasVanDyk commented Jul 15, 2023

  • Pico 2's have now been acquired from the local Pishop.co.za
    Look here or here, but note this RP2350 Errata E9 - Pull-down lock-up. Currently testing 640x480 (two 480x320 screens mounted side-by-side) as touch macropads.

  • Also note issue #3465 regarding resistive touchscreens here. The Bodmer Keypad_240x320.ino example runs on the Waveshare IPS ST7789 LCD Pico Board 320x240 2.8 inch with touch working - but use one of the four 2.5.43 fixes described below.
    The Pico 2 seems to work with this LCD's resistive touch panel if its calData[5] are about 4388 3451 4492 3465 t. But sometimes parameter 1 and 3 change and are then very large > 10k values (61874 and 61733 have been observed which could be overflow values from the 16-bit variables used in calData), appear, and there is then no touch response.

  • Similarly the Waveshare LCD Type C (125MHz) was constructed on a breadboard and compiled with Pico SDK 2.1.0, Arduino Pico 4.3 and the included Adafruit_TinyUSB_Arduino 3.3.4, and TFTeSPI 2.5.43. The sourcecode removed PicoSDK RTC functions and PicoSDK includes. This yielded a fully working touchpad with correct calibration data calData[5] = { 288, 3625, 270, 3548, 5 }. BUT using the exact same code, the same Pico 2 and the same LCD, but constructing it on stripboard, was non touch-responsive and yielded incorrect calibration data: calData[5] = { 61745, 3595, 61707, 3444, 5 }. The code and build file used are attached below.

VolumeMacroPad201.zip

pico-2

  • ST7789 LCD Macropad and TFT_eSP V2.5.43 fix:
    Recommended fix: Replace line 52 in the file Processors/TFT_eSPI_RP2040.h with the line as below:
  // Processor specific code used by SPI bus transaction begin/end_tft_write functions
  #define SET_BUS_WRITE_MODE spi_set_format(SPI_X,  8, (spi_cpol_t)(TFT_SPI_MODE >> 1), (spi_cpha_t)(TFT_SPI_MODE & 0x1), SPI_MSB_FIRST)
  // Old line
  //#define SET_BUS_READ_MODE  spi_set_format(SPI_X,  8, (spi_cpol_t)0, (spi_cpha_t)0, SPI_MSB_FIRST)
  // New line see https://github.com/Bodmer/TFT_eSPI/discussions/3561
  #define SET_BUS_READ_MODE  spi_set_format(SPI_X,  8, (spi_cpol_t)(TFT_SPI_MODE >> 1), (spi_cpha_t)(TFT_SPI_MODE & 0x1), SPI_MSB_FIRST)

Also try adding: #define TFT_SPI_MODE SPI_MODE0 to TFT_eSPI.h refer to:

https://github.com/Bodmer/TFT_eSPI/issues/3564
It seems that the problem with the black screen depends on this option:
// Some ST7789 boards do not work with Mode 0
#ifndef TFT_SPI_MODE
  #if defined(ST7789_DRIVER) || defined(ST7789_2_DRIVER)
    #define TFT_SPI_MODE SPI_MODE3
  #else
    #define TFT_SPI_MODE SPI_MODE0
  #endif
#endif
The display works only if SPI_MODE0 mode is selected

Newer fixes: Use the 3files or 2files fix when using TFT_eSPI-Bodmer version 2.5.43 and also read this

Working2Files.zip
WorkingFiles3Files.zip

Old fix: To obtain a working Touch-Macropad for the the Waveshare IPS ST7789 LCD Pico Board 320x240 2.8 inch using Bodmer TFT_eSPI version 2.5.43 replace the file Processors/TFT_eSPI_RP2040.h with the same file from the previous version V2.5.34.

Also see the comment Bodmer/TFT_eSPI/issues/3476: For file TFT_eSPI_RP2040.h

Replace:
2.5.43 #define SET_BUS_READ_MODE  spi_set_format(SPI_X,  8, (spi_cpol_t)0, (spi_cpha_t)0, SPI_MSB_FIRST)
With:
2.5.34 #define SET_BUS_READ_MODE  // spi_set_format(SPI_X,  8, (spi_cpol_t)0, (spi_cpha_t)0, SPI_MSB_FIRST)
  • Choosing an LCD Touch Display: Of the 5 different LCD displays tested here, with the firmware as attached below, my favourite is the fast Waveshare 3.5 inch Type C 125MHz LCD display (even though it is not an IPS screen). It is available here.

  • Win11 24H2 new icon-bar with labels is good! - but you do not need icons here - they could have used buttons labelled Cut-Copy-Rename-Delete.

Old Win11 22H2:
Win11Icons

New Win11 24H2:
Win11-not-obtuse-icons

Windows Audio and Midi News
A
B

@TobiasVanDyk TobiasVanDyk added the enhancement New feature or request label Jul 15, 2023
@TobiasVanDyk TobiasVanDyk added the bug Something isn't working label Dec 3, 2023
@TobiasVanDyk TobiasVanDyk changed the title A reset once and SDCard reader has been implemented for the 4" ILI9486 Arduino-Uno LCD. Compile using PicoArduino 3.6.0 only. A reset once and SDCard reader has been implemented for the 2.8" STM7889 and 4" ILI9486 Arduino-Uno LCD. Dec 3, 2023
@TobiasVanDyk TobiasVanDyk changed the title Compile using PicoArduino 3.6.0 only. A reset once and SDCard reader has been implemented for the 2.8" STM7889 and 4" ILI9486 Arduino-Uno LCD. Compile using PicoArduino 3.6.0 only. A reset once and SDCard reader has been implemented for the 2.8" STM7789 and 4" ILI9486 Arduino-Uno LCD. Dec 3, 2023
@TobiasVanDyk TobiasVanDyk changed the title Compile using PicoArduino 3.6.0 only. A reset once and SDCard reader has been implemented for the 2.8" STM7789 and 4" ILI9486 Arduino-Uno LCD. Compile using PicoArduino 3.6.0 or 3.6.2. A reset once and SDCard reader has been implemented for the 2.8" STM7789 and 4" ILI9486 Arduino-Uno LCD. Dec 8, 2023
@TobiasVanDyk TobiasVanDyk removed the bug Something isn't working label Dec 8, 2023
@TobiasVanDyk TobiasVanDyk changed the title Compile using PicoArduino 3.6.0 or 3.6.2. A reset once and SDCard reader has been implemented for the 2.8" STM7789 and 4" ILI9486 Arduino-Uno LCD. New versions for 2.8" STM7789, 3.5" ILI9486 RPi using PicoArduino 3.6.0 or 3.6.2. Dec 31, 2023
@TobiasVanDyk TobiasVanDyk changed the title New versions for 2.8" STM7789, 3.5" ILI9486 RPi using PicoArduino 3.6.0 or 3.6.2. New versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, and 4" ILI9486 Arduino, using PicoArduino 3.6.0 or 3.6.2. Jan 1, 2024
@TobiasVanDyk TobiasVanDyk changed the title New versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, and 4" ILI9486 Arduino, using PicoArduino 3.6.0 or 3.6.2. New versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.6.0 or 3.6.2. Jan 1, 2024
@TobiasVanDyk TobiasVanDyk reopened this Jan 3, 2024
@TobiasVanDyk TobiasVanDyk changed the title New versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.6.0 or 3.6.2. Experimental versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.6.0 or 3.6.2. Jan 3, 2024
@TobiasVanDyk TobiasVanDyk added the bug Something isn't working label Jan 3, 2024
@TobiasVanDyk TobiasVanDyk changed the title Experimental versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.6.0 or 3.6.2. Experimental versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.6.2 or 3.6.3. Jan 4, 2024
@TobiasVanDyk TobiasVanDyk changed the title Experimental versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.6.2 or 3.6.3. Experimental versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.6.3. Jan 18, 2024
@TobiasVanDyk TobiasVanDyk added documentation Improvements or additions to documentation good first issue Good for newcomers question Further information is requested and removed good first issue Good for newcomers documentation Improvements or additions to documentation question Further information is requested bug Something isn't working labels Jan 18, 2024
@TobiasVanDyk TobiasVanDyk changed the title Experimental versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.6.3. Experimental versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.6.3 and 3.6.2. Jan 18, 2024
@TobiasVanDyk TobiasVanDyk changed the title Experimental versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.6.3 and 3.6.2. Experimental versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.7.0 and 3.6.3. Feb 3, 2024
@TobiasVanDyk TobiasVanDyk changed the title Experimental versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.7.0 and 3.6.3. Experimental versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.7.2 and 3.6.3. Feb 17, 2024
@TobiasVanDyk TobiasVanDyk changed the title Experimental versions for 2.8" STM7789 Pico, 3.5" ILI9486 RPi, 3.5" ILI9488 Pico Eval Board, and 4" ILI9486 Arduino, using PicoArduino 3.7.2 and 3.6.3. Corrections and Experimental versions Mar 21, 2024
@TobiasVanDyk TobiasVanDyk reopened this Mar 21, 2024
@TobiasVanDyk TobiasVanDyk added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Mar 21, 2024
@TobiasVanDyk TobiasVanDyk added enhancement New feature or request bug Something isn't working experimental new-hardware and removed bug Something isn't working labels Mar 25, 2024
@TobiasVanDyk TobiasVanDyk changed the title Corrections and Experimental versions Enhancements and New LCD Panels and Corrections and Experimental versions Apr 1, 2024
@TobiasVanDyk TobiasVanDyk changed the title Enhancements and New LCD Panels and Corrections and Experimental versions New LCD Panels, Enhancements, Corrections, and Experimental versions Apr 1, 2024
@TobiasVanDyk TobiasVanDyk changed the title New LCD Panels, Enhancements, Corrections, and Experimental versions Closed Apr 18, 2024
@TobiasVanDyk TobiasVanDyk changed the title Closed Problem with ST7789 and TFT_eSP V2.5.43 Apr 25, 2024
@TobiasVanDyk TobiasVanDyk changed the title Problem with ST7789 and TFT_eSP V2.5.43 ST7789 LCD Macropad and TFT_eSP V2.5.43 fix Apr 25, 2024
@TobiasVanDyk TobiasVanDyk added the NOk Not Ok label Apr 25, 2024
@TobiasVanDyk TobiasVanDyk changed the title ST7789 LCD Macropad and TFT_eSP V2.5.43 fix Pico Touch Macropad fixes Apr 28, 2024
@TobiasVanDyk TobiasVanDyk removed the NOk Not Ok label Jun 20, 2024
@TobiasVanDyk TobiasVanDyk added enhancement New feature or request igu I give up and removed enhancement New feature or request labels Jul 25, 2024
@TobiasVanDyk TobiasVanDyk added life-changing and removed igu I give up labels Aug 21, 2024
@TobiasVanDyk TobiasVanDyk changed the title Pico Touch Macropad fixes Pico 2 and Pico 1 Touch Macropad fixes Aug 25, 2024
@TobiasVanDyk TobiasVanDyk added NOk Not Ok igu I give up labels Nov 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Improvements or additions to documentation igu I give up NOk Not Ok
Projects
None yet
Development

No branches or pull requests

1 participant