Page 1 of 1

RA8875 driver and GUI for large displays

Posted: Thu Aug 15, 2019 11:16 am
by pythoncoder
This repo comprises a device driver for the RA8875 and a port of my touch micro-GUI. It enables MicroPython targets to drive 4.3" and 7" touch displays via an SPI interface. It is an alternative to the original version which is based on different hardware with a parallel interface. The original version is faster thanks to the parallel interface and a highly optimised driver written by Robert Hammelrath. However it is STM specific and uses a large number of pins.

The RA8875 repo supports Adafruit hardware, namely
Controller board https://www.adafruit.com/product/1590
4.3 inch display https://www.adafruit.com/product/1591
7 inch display https://www.adafruit.com/product/2354

It is designed to be cross platform and should work (subject to RAM constraints) on any MicroPython target supporting the native and viper decorators.

Images

Posted: Wed Aug 28, 2019 9:01 am
by pythoncoder
My photography does not do justice to the Adafruit display hardware which is excellent.

Vertical slider controls, pushbuttons and dial displays:

Image

Assorted controls - dropdown list, listbox, rotary "potentiometer" controls and dial display:

Image

Dialog box:

Image

New widgets. Vector displays in "clock" or "compass" variants:

Image

The Textbox widget showing word wrap:

Image

Basic tab stop support:

Image

The plot module:

Image

Image

Re: RA8875 driver and GUI for large displays

Posted: Tue Oct 22, 2019 11:23 am
by pythoncoder
I've now tested on an 800*480 display. These are available in two sizes, 5" and 7". The Adafruit ones appear to be electrically interchangeable: their driver and mine run the same code for both. My pictures are of a 5" display. I created two demos to see how more complex user interfaces fared given the relatively slow SPI connection. The conclusion is that they are entirely usable.

Test setup:
Image

A simulation of an audio amplifier. The meters show dynamically changing (simulated) audio, with the colour going from cyan to yellow to red as the level increases. As usual the real displays look much better than in my photography.
Image
If you select flat response the graphic eq controls all go to zero and are greyed out until you clear the textbox. With suitable hardware it would make a usable interface ;)

One Pyboard acting as a terminal to another:
Image
This is emphatically a demo. The handling of newlines and the lack of an insertion cursor are issues. A full solution would have better VT100 emulation with cursor control keys. However it does work, and the text window can be scrolled by touching it. Its speed is adequate. The keyboard keys flash when pressed as confirmation. The keyboard is easiest to use with a stylus rather than my fat fingers: the whole thing might be more finger friendly on a 7" screen.

Code for these demos is in my repo.

Re: RA8875 driver and GUI for large displays

Posted: Tue Oct 22, 2019 2:00 pm
by Roberthh
This is an impressive demonstration.
b.t.w.: 9 inch displays with the RA8875 chip are available from www.buydisplay.com, and also a 10.1" model with an RA8876.

Re: RA8875 driver and GUI for large displays

Posted: Wed Oct 23, 2019 5:31 am
by pythoncoder
I gather that there can be differences in the electrical specifications of these displays which need to be respected in the driver. Consequently in my docs I recommend the Adafruit displays: I have copied the initialisation parameters from the Adafruit drivers.

To support larger displays I'd need to find the relevant information, possibly adapt the driver, and test with an actual display. The 9" display is 800x480 pixels so it may work with my driver but I couldn't guarantee it.

Re: RA8875 driver and GUI for large displays

Posted: Wed Nov 04, 2020 6:35 am
by pythoncoder
I have pushed an update to this driver with two additional widgets. A Pad object which is an invisible touch sensitive rectangular region. This can be used as an overlay to add touch sensitivity to a control which normally lacks it.

The new Scale widget can display floating point values with very high resolution. This is shown and explained in the sample images. Apologies for my poor photography. I seem to specialise in blurred text and trapezium renditions of rectangles. :(