Some Duets can now support 12864 mono graphics LCD displays with a rotary encoder.
There are two types of controller chip commonly used in these controllers: ST7920 and ST7567. Some Duets support one or both of these types - see below for details. Both types use a menu system stored on the SD card, see Duet 2 Maestro 12864 display menu system.
Certain boards versions have different methods of controlling the backlight on these boards.
|Duet 3 MB6HC/6XD||N||N|
|Duet 3 Mini 5+||N||Y|
|Duet 2 Maestro||Y||Y||ST7567 Requires modified wiring loom|
|Duet 2 WiFi / Ethernet||N||Y||ST7567 Requires modified wiring loom|
Duet 3 Mini provides two 2x5 ribbon cable headers for connecting a compatible ST7567-based controller (see below).
We do not recommend connecting a 12864 display with ST7920 controller directly to the Duet 3 Mini because the 3.3V signals provided by the Duet 3 Mini do not meet the specifications of the ST7920 controller chip when it is powered from 5V. If you do wish to try it, you will most likely have to reduce the clock frequency (M918 F parameter) to get it working at all, and it may not work reliably. Also, note that when configured for 12864 display with ST7920 controller, RepRapFirwmare provides the CS signal on the pin normally uses for A0 because that more closely matched the pinout of typical 12864/ST7920 displays.
User PCR on the Duet forum has created a level-shifting board that plugs into the Mini 5+, and converts the 3.3V signalling to 5V, allowing ST7920-based displays to be supported. See this thread on the forum.
The Duet 2 Maestro provides two 2x5 ribbon cable headers for a 12864 display using ST7920 controller. The connector pinout is compatible with the original RepRapDiscount design. There is also more information in this thread on the forum.
RepRapFirmware 3.2 and later also support displays using the ST7567 controller. For these displays, use the standard cable EXCEPT the following two wires need to be connected to the EXPANSION header pins:
|Duet 2 Maestro output||Display input||Function|
|Expansion pin 4 (EXP_0)||EXP 1 pin 7||LcdA0Pin|
|Expansion pin 5 (EXP_1)||EXP 1 pin 8||LcdCSPin|
NOTE: As of RRF v3.4.5, the Duet 2 Maestro does not currently support the M150 command for controlling addressable LEDs/NeoPixel backlights, because Maestro is very short of spare outputs. Displays with a fixed backlight should work, eg Fysetc Mini12864 Panel V1.2 (NOT V2.0 or V2.1), but have not been tested.
RepRapFirmware 3.2 and later support a 12864 display using ST7567 controller. RepRapFirmware 3.3 added support for a short string of Neopixels on Duet WiFi and Ethernet, so boards that use a Neopixel for the backlight should be able to be controlled. See this thread on the forum for more details.
You will need to make up your own wiring loom, connected as follows:
|Duet 2 WiFi/Ethernet output||Display input||Function|
|CONN_LCD pin 2||EXP 1 pin 2||gnd|
|CONN_LCD pin 3||EXP 2 pin 6||EncoderPinB|
|CONN_LCD pin 4||EXP 2 pin 8||EncoderPinA|
|CONN_LCD pin 5||EXP 1 pin 5||LcdNeopixelPin|
|CONN_LCD pin 6||EXP 1 pin 6||LcdResetPin|
|CONN_LCD pin 7||EXP 1 pin 7||LcdA0Pin|
|CONN_LCD pin 8||EXP 1 pin 8||LcdCSPin|
|CONN_LCD pin 9||EXP 1 pin 9||EncoderPinSw|
|CONN_LCD pin 10||EXP 1 pin 10||LcdBeepPin|
|CONN_SD pin 1||EXP 1 pin 1||+5V|
|CONN_SD pin 2||EXP 2 pin 2||gnd|
|CONN_SD pin 3||EXP 2 pin 7||SD CS|
|CONN_SD pin 4||EXP 2 pin 9||sck|
|CONN_SD pin 5||EXP 2 pin 5||mosi|
|CONN_SD pin 6||EXP 2 pin 10||miso|
We do not recommend connecting a 12864 display with ST7920 controller because the 3.3V signals provided by the Duet 2 WiFi/Ethernet do not meet the specifications of the ST7920 controller chip when it is powered from 5V. If you do wish to try it, you will most likely have to reduce the clock frequency (M918 F parameter) to get it working at all, and it may not work reliably. Alternatively, use a level-shifter to convert the 3.3V signalling to 5V.
These displays are typically clones of the RepRapDiscount Full Graphic Smart Controller and look like this.
The ST7920 controller chip is invariably powered from 5V, which means that the display need 5V input signal levels. The better ones include a contrast adjustment potentiometer.
With the display connected, menu files need to be added to the SD card, or the display will have nothing to show. See 12864 display menu system.
To enable the display, send an M918 command. For displays that have addressable RGB LEDs, an M150 command will need to be sent before they turn on. These will usually be added to the config.g, so the display is enabled at startup.
To configure this type of display in RepRapFirmware, use the M918 command with display type parameter P2. The contrast setting for these displays is done in software, and the M918 command supports a C parameter for this purpose. It is also necessary to set a resistor ratio parameter in software, which can be done using the M918 R parameter.
On displays that support NeoPixel RGB backlights, set these with M150.
Example for Fysetc Mini12864 V2.1
M918 P2 E2 F2000000 ; configure direct-connect display M150 X2 R255 U255 B255 P127 S1 F1 ; display led M150 X2 R0 U0 B0 P0 S1 F1 ; left encoder led off M150 X2 R0 U0 B0 P0 S1 F0 ; right encoder led off
Example for Makerbase MKS Mini12864 V3.0
M918 P2 E-4 C100 R3 M150 X2 R255 U0 B0 P255 S3 F0 ; GRB LED so this shows green
Note that some RGB LEDs define their colours in the order Green, Red, Blue, so R parameter will be green, and U parameter will be blue.
To configure this type of display in RepRapFirmware, use the M918 command with display type parameter P1, eg:
M918 P1 E4 F2000000
(Instructions from https://teamgloomy.github.io/tft.html, thanks!)
The most recent version of the standard bigtreetech TFT firmware has built in support for RepRapFirmware. The pre-built images have this enabled by default.
Use the pins +5V, GND, IO_0_OUT and IO_0_IN on the IO_0 header (Duet 3), or +5V, GND, TX and RX on the PanelDue header (Duet 2). These should be connected to +5V, GND, TX and RX on the TFT, making sure that TX and RX are swapped.
|BTT display||Duet 3 IO_0 header||Duet 2 PanelDue header|
There is now an RRF config.ini (on the SD card root). It needs to be renamed from config_rrf.ini to config.ini (replacing the original one for Marlin) for flashing of the firmware.
Add the following line to your config.g to enable the screen
M575 P1 S1 B57600