mirror of
https://github.com/olikraus/U8g2_Arduino.git
synced 2026-09-15 03:03:08 +00:00
increased contrast range for ssd1306
This commit is contained in:
+10
-7
@@ -281,14 +281,17 @@ struct u8x8_display_info_struct
|
||||
#define U8X8_PIN_I2C_CLOCK 12 /* 1 = Input/high impedance, 0 = drive low */
|
||||
#define U8X8_PIN_I2C_DATA 13 /* 1 = Input/high impedance, 0 = drive low */
|
||||
|
||||
#define U8X8_PIN_OUTPUT_CNT 14
|
||||
#define U8X8_PIN_CS1 14 /* KS0108 extra chip select */
|
||||
#define U8X8_PIN_CS2 15 /* KS0108 extra chip select */
|
||||
|
||||
#define U8X8_PIN_MENU_SELECT 14
|
||||
#define U8X8_PIN_MENU_NEXT 15
|
||||
#define U8X8_PIN_MENU_PREV 16
|
||||
#define U8X8_PIN_MENU_HOME 17
|
||||
#define U8X8_PIN_MENU_UP 18
|
||||
#define U8X8_PIN_MENU_DOWN 19
|
||||
#define U8X8_PIN_OUTPUT_CNT 16
|
||||
|
||||
#define U8X8_PIN_MENU_SELECT 16
|
||||
#define U8X8_PIN_MENU_NEXT 17
|
||||
#define U8X8_PIN_MENU_PREV 18
|
||||
#define U8X8_PIN_MENU_HOME 19
|
||||
#define U8X8_PIN_MENU_UP 20
|
||||
#define U8X8_PIN_MENU_DOWN 21
|
||||
|
||||
#define U8X8_PIN_INPUT_CNT 6
|
||||
|
||||
|
||||
@@ -59,9 +59,10 @@ static const uint8_t u8x8_d_ssd1306_128x64_noname_init_seq[] = {
|
||||
// U8X8_C(0x0c0), /* c0: scan dir normal, c8: reverse */
|
||||
|
||||
U8X8_CA(0x0da, 0x012), /* com pin HW config, sequential com pin config (bit 4), disable left/right remap (bit 5) */
|
||||
U8X8_CA(0x081, 0x0cf), /* [2] set contrast control */
|
||||
U8X8_CA(0x0d9, 0x0f1), /* [2] pre-charge period 0x022/f1*/
|
||||
U8X8_CA(0x0db, 0x040), /* vcomh deselect level */
|
||||
U8X8_CA(0x081, 0x0ef), /* [2] set contrast control, */
|
||||
U8X8_CA(0x0d9, 0x0a1), /* [2] pre-charge period 0x022/f1*/
|
||||
U8X8_CA(0x0db, 0x000), /* vcomh deselect level 0x000 .. 0x070, low nibble always 0 */
|
||||
// if vcomh is 0, then this will give the biggest range for contrast control issue #98
|
||||
|
||||
U8X8_C(0x02e), /* Deactivate scroll */
|
||||
U8X8_C(0x0a4), /* output ram to display */
|
||||
|
||||
Reference in New Issue
Block a user