Using a cheap Arduino mini pro, uno or nano this sketch allows you to interface a panel like Viki or a Parallel LCD with encoder via SPI.
Specifically used for running I2C and parallel panels on a Smoothie compatible board.
Prebuild bianries ready for upload to arduino are:-
- viki_panel_adapter.hex for viki/panelolu2
- parallel_panel_adapter.hex for parallel LCD
Default Wiring is as follows:-
SDA -> A4
SCL -> A5
ENCA -> D2
ENCB -> D3
Gnd -> Gnd
+5v -> +5v
4 RS -> D9
5 RW -> A0
6 EN -> A1
11 D4 -> D5
12 D5 -> D6
13 D6 -> D7
14 D7 -> D8
1 gnd
2 +5v
3 contrast
15,16 backlight power (on some)
Encoder is connected to Nano
ENCA -> D2
ENCB -> D3
Click -> A2
MOSI -> D11 : 0.18
MISO -> D12 : 0.17
SCK -> D13 : 0.15
SS -> D10 : 0.16
BUSY -> D4 : 2.11 (or 1.30 on Azteeg X5) (And set panel.busy_pin in config to that pin)
add this to your config file on smoothie
panel.enable true # enable panel
panel.lcd universal_adapter #
panel.spi_channel 0 # spi channel to use (0- MISO 0.17, MOSI 0.18, SCK 0.15, SS 0.16)
panel.spi_cs_pin 0.16 # spi chip select
panel.busy_pin 2.11 # busy pin NOTE 1.30 on Azteeg X5
For compiling the following Arduino libraries are needed
- Encoder library from http://www.pjrc.com/teensy/td_libs_Encoder.html
For Viki and I2C based panels
- LiquidTWI2 from https://github.com/lincomatic/LiquidTWI2
For Parallel panels
- LiquidCrystalFast from https://www.pjrc.com/teensy/td_libs_LiquidCrystal.html