increased contrast range for ssd1306

This commit is contained in:
olikraus
2016-12-03 22:17:47 +01:00
parent d9ddf8e08c
commit 005dcb7dd0
6 changed files with 200 additions and 11 deletions
+10 -7
View File
@@ -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
+4 -3
View File
@@ -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 */