RA8875 driver and GUI for large displays

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Post Reply
User avatar
pythoncoder
Posts: 3699
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

RA8875 driver and GUI for large displays

Post by pythoncoder » Thu Aug 15, 2019 11:16 am

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.
Peter Hinch

User avatar
pythoncoder
Posts: 3699
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Images

Post by pythoncoder » Wed Aug 28, 2019 9:01 am

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
Peter Hinch

User avatar
pythoncoder
Posts: 3699
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: RA8875 driver and GUI for large displays

Post by pythoncoder » Tue Oct 22, 2019 11:23 am

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.
Peter Hinch

User avatar
Roberthh
Posts: 1735
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: RA8875 driver and GUI for large displays

Post by Roberthh » Tue Oct 22, 2019 2:00 pm

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.

User avatar
pythoncoder
Posts: 3699
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: RA8875 driver and GUI for large displays

Post by pythoncoder » Wed Oct 23, 2019 5:31 am

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.
Peter Hinch

Post Reply