diff --git a/DISPLAYS.md b/DISPLAYS.md index 7706e49..e6d9cf4 100644 --- a/DISPLAYS.md +++ b/DISPLAYS.md @@ -41,7 +41,14 @@ I2C or SPI interfaces. An example is [Adafruit 938][4m]. Nokia 5110 (PCD8544) displays. [This driver](https://github.com/mcauser/micropython-pcd8544.git) is compatible. -# Untested displays +## Adafruit displays + +See [these notes](./ADAFRUIT.md) for wiring details, pin names and hardware +issues. + +# Unlisted displays + +## Displays whose controller is listed above An untested display that uses a supported controller is not guaranteed to work. This is because a controller can be connected to the display in a variety of @@ -49,6 +56,14 @@ ways. In some cases the existing driver can be persuaded to work, sometimes by using nonstandard constructor arguments. In other cases the driver itself needs to be adapted. +## Other controllers + +For an unlisted controller the first step is to see if there is an existing +driver that can be ported. Adafruit publish CircuitPython drivers for their +hardware: these are easy to port to MicroPython. Only a minimal subset is +needed to support these GUI's, with the result that the drivers can be very +simple. See [this doc](./DRIVERS.md#7-writing-device-drivers) for details. + [1d]: https://github.com/peterhinch/micropython-nano-gui/blob/master/DRIVERS.md#22-drivers-for-ssd1331 [2d]: https://github.com/peterhinch/micropython-nano-gui/blob/master/DRIVERS.md#21-drivers-for-ssd1351 [3d]: https://github.com/micropython/micropython/blob/master/drivers/display/ssd1306.py diff --git a/DRIVERS.md b/DRIVERS.md index 4bd1b50..2362343 100644 --- a/DRIVERS.md +++ b/DRIVERS.md @@ -791,7 +791,7 @@ SPI 2 and an arbitrary choice of GPIO. All may be changed and soft SPI may be used. | Pyb | Breakout | -|:---:|:---------:| +|:----|:----------| | Vin | Vin (1) | | Gnd | Gnd (3) | | Y8 | MOSI (6) | @@ -853,23 +853,23 @@ on the underside of the board with the SD card at the top. Each connector has pairs of pins which are linked together. | Pin | Pyb | Pin | Pyb | Notes | -|:-----:|:----:|:-----:|:----:|:---------------------------------:| -| RST | Y3 | | | Should be open drain (see below). | +|:------|:-----|:----- |:-----|:----------------------------------| +| RST | Y3 | | | Should be open drain (see below). | | 3V | 3.3V | | | | | . | | | | | | Gnd | Gnd | | | | -| . | | . | | | -| . | | . | | | -| . | | . | | | -| . | | . | | | -| . | | . | | | -| . | | . | | | -| SCK | Y6 | DC | Y1 | | -| MOSI | Y8 | ECS | Y2 | | -| . | | . | | | -| . | | . | | | -| . | | . | | | -| BUSY | Y4 | . | | Linked with wire to BUSY pad. | +| . | | . | | | +| . | | . | | | +| . | | . | | | +| . | | . | | | +| . | | . | | | +| . | | . | | | +| SCK | Y6 | DC | Y1 | | +| MOSI | Y8 | ECS | Y2 | | +| . | | . | | | +| . | | . | | | +| . | | . | | | +| BUSY | Y4 | . | | Linked with wire to BUSY pad. | The FeatherWing has a reset button which shorts the RST line to Gnd. To avoid risk of damage to the microcontroller pin if the button is pressed, the pin @@ -965,7 +965,7 @@ Connections may be adapted for other MicroPython targets. The board may be powered from 5V or 3.3V: there is a regulator on board. | Pyb | | L | R | | Pyb | -|:---:|:----:|:--:|:--:|:----:|:---:| +|:----|:-----|:--:|:--:|:-----|:----| | Vin | VIN | 2 | 1 | | | | | | 4 | 3 | | | | | | 6 | 5 | | | @@ -1160,7 +1160,8 @@ render glyphs instead of Python code. The following script is useful for testing color display drivers after configuring `color_setup.py`. It draws squares at the extreme corners of the -display and a corner to corner diagonal. +display and a corner to corner diagonal. The nature of this image makes +faultfinding much simpler than viewing a garbled GUI screen. ```python from color_setup import ssd # Create a display instance from gui.core.colors import RED, BLUE, GREEN @@ -1174,5 +1175,9 @@ ssd.rect(0, 0, 15, 15, RED) # Red square at top left ssd.rect(ssd.width -15, ssd.height -15, 15, 15, BLUE) # Blue square at bottom right ssd.show() ``` +If this produces correct output the GUI's can be expected to work. + +Authors of device drivers are encouraged to raise an issue or PR so that the +library can be extended. ###### [Contents](./DRIVERS.md#contents) diff --git a/README.md b/README.md index 187b15e..7784afa 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ small color and monochrome OLED's, color TFT's, ePaper and Sharp units. The `nano-gui` library is display-only. A library supporting user input is [micro-gui](https://github.com/peterhinch/micropython-micro-gui); this comes at -a cost of a substantially greater RAM requirement. +a cost of a substantially greater RAM requirement. It supports all displays +available to nano-gui. These images, most from OLED displays, fail to reproduce the quality of these displays. OLEDs are visually impressive displays with bright colors, wide @@ -40,9 +41,6 @@ wrap or clipping. ![Image](images/seismo.JPG) A mockup of a seismograph screen on an ePaper display. -Notes on [Adafruit and other OLED displays](./ADAFRUIT.md) including -wiring details, pin names and hardware issues. - # Contents 1. [Introduction](./README.md#1-introduction) @@ -74,15 +72,17 @@ wiring details, pin names and hardware issues. minimising the RAM and flash footprints of the GUI. 5. [Old firmware](./README.md#5-old-firmware) For users of color displays who can't run current firmware. -#### [Graph plotting module.](./FPLOT.md) +#### [Supported displays](./DISPLAYS.md) #### [Device driver document.](./DRIVERS.md) +#### [Graph plotting module.](./FPLOT.md) + # 1. Introduction This library provides a limited set of GUI objects (widgets) for displays whose -display driver is subclassed from the `FrameBuffer` class. Such drivers can be -tiny as the graphics primitives are supplied by the `FrameBuffer` class. +display driver is subclassed from the `FrameBuffer` class. The drivers can have +minimal code as graphics primitives are supplied by the `FrameBuffer` class. Compatible and tested displays are detailed [here](./DISPLAYS.md). The [device driver doc](./DRIVERS.md) provides guidance on selecting the right @@ -107,10 +107,6 @@ displays: * [RA8875 large displays](https://github.com/peterhinch/micropython_ra8875) * [SSD1963 large displays](https://github.com/peterhinch/micropython-tft-gui) -Input via pushbuttons or an encoder is offered by -[micro-gui](https://github.com/peterhinch/micropython-micro-gui). This supports -all displays supported by nano-gui. - For historical reasons and to ensure consistency, code and documentation for my GUI's employ the American spelling of `color`.