# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder. # # Khadas VIM3 - OLED SSD1306 128x32 configuration #-------------------- #gpio_xxx: # [0] 0 = &gpio, 1 = &gpio_ao. # [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-g12a-gpio.h # [2] Reserved - must be 0. (0xFF in vfd_gpio_stb skips this entry, required for 2-wire protocols) vfd_gpio_clk='0,64,0' vfd_gpio_dat='0,63,0' vfd_gpio_stb='0,0,0xFF' # On display: # VCC - 5V (KVIM2: Pin #2) # GND - GND (KVIM2: Pin #5) # SCL - vfd_gpio_clk = GPIODV_25 (I2C_M3_SCL - KVIM3: Pin #22) # SDA - vfd_gpio_dat = GPIODV_24 (I2C_M3_SDA - KVIM3: Pin #23) #chars: # < DHHMM > Order of display chars (D=dots, represented by a single char) # This field is required but is unused. vfd_chars='0,1,2,3,4' #dot_bits: # Order of dot bits. Typical configurations: # This field is required but is unused. vfd_dot_bits='0,1,2,3,4,5,6' #display_type: # * In [] brackets are the bit index from 0 to 7. You can use the 'Programmer' mode in Calculator to generate the hexadecimal value you need for the following fields. # {0} - Columns = ([0:2] + 1) * 16. Rows = ([3:5] + 1) * 8. Shift display = [6:7] * 2. # Examples: For a 128x32 display, the value should be 0x1F. # For a 128x64 display, the value should be 0x3F. # For a SH1106 128x64 display, the value should be 0x7F. # {1} - I2C address - Usually 0x3C or 0x3D. # {2} - Flags. [0] - Reserved. [1] - invert display. [2] - rotate display by 90 degrees. [3] - rotate display by 180 degrees (adds or [2]). [4] - Ext_Vcc - leave at 0. [5] - Alternative COM configuration, set to 1 if display is scrambled. # Examples: To flip the display upside down, the value should be 0x08. To rotate 90 degrees - 0x04, to rotate 270 degrees - 0x0C. # To invert the pixels of the display, the value should be 0x02. # {3} - Controller. 0xFD for SSD1306, 0xFC for SH1106. vfd_display_type='0x1F,0x3C,0x08,0xFD'