Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: Add support for Waveshare RP2040-LCD-1.28 #7153

Merged
merged 4 commits into from Jan 4, 2023

Conversation

fonix232
Copy link

Initial support for Waveshare RP2040-LCD-1.28

Testing underway.

Features:

  • GC9A01A LCD controller, with a 240x240 circular LCD display, over SPI
  • QMI8658C IMU, accelerometer and gyroscope, over I2C
  • 2MB flash (W25Q32JVSSIQ according to schematics, but that's a 4MB flash)
  • PH1.25-2P battery connector, with an ETA6096 battery charge/discharge controller
  • VBAT is hooked up to GPIO 29 with a 0.50 bias via resistors

TODO:

  • CircuitPython driver for GC9A01A
  • CircuitPython driver for QMI8658C
  • Investigate flash size inconsistencies (board doesn't seem to have any flash chips)
  • Investigate schematic's three S_KEY_ definitions (UP, DOWN and CENTER)

Schematics: https://www.waveshare.com/w/upload/6/60/RP2040-LCD-1.28-sch.pdf

@LazaroFilm
Copy link

When can this be added? I just bought this board for a project and going with CircuitPython would be great.

@tannewt
Copy link
Member

tannewt commented Nov 15, 2022

@fonix232 Please let us know when this is ready for review.

@LazaroFilm You can help test using "artifacts" from the CI run. See the bottom artifact here: https://github.com/adafruit/circuitpython/actions/runs/3352586595

@LazaroFilm
Copy link

I have compiled this and loaded it into my device. The LCD and pins are working, have not tested the IMU yet. The one issue I found is not quite related to this pull request is that the VID an PID of the device are not recognized by VSCode's extension for CircuitPython, thus making it impossible to access the console, though, the console works in Mu Editor.

Digging further I cannot find the PID for this board on this page: https://github.com/raspberrypi/usb-pid
Also, according to this issue ticket, it actually needs this commit to be pushed to master in order for the board to be recognized by the VSCode plugin: joedevivo/vscode-circuitpython#15

@tannewt
Copy link
Member

tannewt commented Nov 17, 2022

Digging further I cannot find the PID for this board on this page: https://github.com/raspberrypi/usb-pid

Good eye! Looks like it'll need to be requested like other Waveshare boards have.

@LazaroFilm
Copy link

I have issued a ticket on Waveshare's website requesting for the PID#. We'll see.

@microdev1 microdev1 added the board New board or update to a single board label Nov 18, 2022
@fonix232
Copy link
Author

@tannewt I've opened this as a draft due to not having an opportunity to test it thoroughly.

The PID/VID used in this PR is taken from the device as-is, running the factory firmware OOTB. If that's not appropriate (I was hoping it would be), then I'm open to suggestions on how to proceed, as well as to changes to the current code.

@tannewt
Copy link
Member

tannewt commented Nov 21, 2022

The PID/VID used in this PR is taken from the device as-is, running the factory firmware OOTB. If that's not appropriate (I was hoping it would be), then I'm open to suggestions on how to proceed, as well as to changes to the current code.

That PID is marked for the Pico rather than a waveshare board. It looks like they've requested PIDs for other boards so hopefully they will for this one too.

@LazaroFilm
Copy link

Yes they used the default Pico PID. The problem is that it conflicts in VSCODE plug-in as it's detected to have a different name than the pico with à pico PID which crashes the vscode plugin (in my opinion, that plug-in could benefit from a refactor to avoid crashing in this instance, it's a bit too strict of a PID check)

@LazaroFilm
Copy link

LazaroFilm commented Nov 30, 2022

UPDATE: Waveshare had replied to me but my mail considered it as spam. Here is the email:


Waveshare Support (Waveshare)
Nov 21, 2022, 14:18 GMT+8

Hi,

Sorry for replying late.
We have approved your USB PID application for "RP2040-LCD-1.28"
Vendor ID = 0x2E8A
Product ID = 0x1039
See: https://github.com/raspberrypi/usb-pid
The table will be updated soon

So the board now has an official VID/PID.

@tannewt
Copy link
Member

tannewt commented Nov 30, 2022

Glad they got one! I'd like to wait until the listing is public because I've had other folks get it wrong.

@fonix232
Copy link
Author

fonix232 commented Jan 3, 2023

@tannewt the listing should be public now (the LCD-1.28 is listed but without URL). I've updated the PR with it, should be merge-able (even with the missing drivers for QMI8658 and GC9A01).

@tannewt tannewt marked this pull request as ready for review January 4, 2023 18:05
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your patience!

@tannewt tannewt merged commit bb3a1c0 into adafruit:main Jan 4, 2023
@fonix232 fonix232 deleted the feature/waveshare_rp2040_lcd_1_28 branch August 22, 2023 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board New board or update to a single board
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants