diff --git a/src/v2/lcd/ssd1306b/lcd_ssd1306b.inl b/src/v2/lcd/ssd1306b/lcd_ssd1306b.inl index 4154fc3..4e36f40 100644 --- a/src/v2/lcd/ssd1306b/lcd_ssd1306b.inl +++ b/src/v2/lcd/ssd1306b/lcd_ssd1306b.inl @@ -158,25 +158,26 @@ template void DisplaySSD1306B::end() static const PROGMEM uint8_t s_SSD1306B_lcd64x32_initData[] = { #ifdef SDL_EMULATION - SDL_LCD_SSD1306, 0x00, + SDL_LCD_SSD1306B, 0x00, 0x00, 0x00, #endif - 0xAE, 0x00, // display off - 0xD5, 0x01, 0x80, // Clock div - 0xA8, 0x01, 31, // Set multiplex - 0xD3, 0x01, 0x00, // --no offset - 0x40, 0x00, // Set display offset - 0x8D, 0x01, 0x14, // Set charge pump - 0xA0| 0x01, 0x00, // Reverse mapping - 0xC8, 0x00, // Decrement - 0xDA, 0x01, 0x02, // Set com pins - 0x81, 0x01, 0x7F, // contast value - 0xD9, 0x01, 0x22, // 0x1F Precharge - 0xDB, 0x01, 0x40, // Precharge - 0x20, 0x01, 0x00, // Set horizontal addressing mode - 0xA4, 0x00, // Display resume - 0xA6, 0x00, // Normal display - 0xAF, 0x00, // Display on + 0xAE, // display off + 0x20, 0x00, // Page horizontal Addressing mode + 0xC8, // Scan from 127 to 0 (Reverse scan) + 0x40| 0x00, // First line to start scanning from + 0x81, 0xFF, // contast value to 0xFF for maximum brightness + 0xA0| 0x01, // Use reverse mapping. 0x00 - is normal mapping + 0xA6, // Normal display + 0xA8, 63, // Reset to default MUX. See datasheet + 0xD3, 0x00, // no offset + 0xD5, 0x80, // set to default ratio/osc frequency + 0xD9, 0xF1, // switch precharge to 0x22 // 0xF1 + 0xDA, 0x12, // set divide ratio + 0xDB, 0x30, // vcom deselect to 0x30 + 0x8D, 0x95, // Enable charge pump 9V + 0xAD, 0x30, // Internal Iref setting 30uA + 0xA4, // Display resume + 0xAF, // Display on }; //////////////////////////////////////////////////////////////////////////////// @@ -202,25 +203,26 @@ template void DisplaySSD1306B_64x32::end() static const PROGMEM uint8_t s_SSD1306B_lcd64x48_initData[] = { #ifdef SDL_EMULATION - SDL_LCD_SSD1306, 0x00, + SDL_LCD_SSD1306B, 0x00, 0x00, 0x00, #endif - 0xAE, 0x00, // display off - 0xD5, 0x01, 0x80, // Clock div - 0xA8, 0x01, 47, // Set multiplex - 0xD3, 0x01, 0x00, // --no offset - 0x40, 0x00, // Set display offset - 0x8D, 0x01, 0x14, // Set charge pump - 0xA0| 0x01, 0x00, // Reverse mapping - 0xC8, 0x00, // Decrement - 0xDA, 0x01, 0x02, // Set com pins - 0x81, 0x01, 0x7F, // contast value - 0xD9, 0x01, 0x22, // 0x1F Precharge - 0xDB, 0x01, 0x40, // Precharge - 0x20, 0x01, 0x00, // Set horizontal addressing mode - 0xA4, 0x00, // Display resume - 0xA6, 0x00, // Normal display - 0xAF, 0x00, // Display on + 0xAE, // display off + 0x20, 0x00, // Page horizontal Addressing mode + 0xC8, // Scan from 127 to 0 (Reverse scan) + 0x40| 0x00, // First line to start scanning from + 0x81, 0xFF, // contast value to 0xFF for maximum brightness + 0xA0| 0x01, // Use reverse mapping. 0x00 - is normal mapping + 0xA6, // Normal display + 0xA8, 63, // Reset to default MUX. See datasheet + 0xD3, 0x00, // no offset + 0xD5, 0x80, // set to default ratio/osc frequency + 0xD9, 0xF1, // switch precharge to 0x22 // 0xF1 + 0xDA, 0x12, // set divide ratio + 0xDB, 0x30, // vcom deselect to 0x30 + 0x8D, 0x95, // Enable charge pump 9V + 0xAD, 0x30, // Internal Iref setting 30uA + 0xA4, // Display resume + 0xAF, // Display on }; //////////////////////////////////////////////////////////////////////////////// @@ -246,25 +248,26 @@ template void DisplaySSD1306B_64x48::end() static const PROGMEM uint8_t s_SSD1306B_lcd128x32_initData[] = { #ifdef SDL_EMULATION - SDL_LCD_SSD1306, 0x00, + SDL_LCD_SSD1306B, 0x00, 0x00, 0x00, #endif - 0xAE, 0x00, // display off - 0xD5, 0x01, 0x80, // Clock div - 0xA8, 0x01, 31, // Set multiplex - 0xD3, 0x01, 0x00, // --no offset - 0x40, 0x00, // Set display offset - 0x8D, 0x01, 0x14, // Set charge pump - 0xA0| 0x01, 0x00, // Reverse mapping - 0xC8, 0x00, // Decrement - 0xDA, 0x01, 0x02, // Set com pins - 0x81, 0x01, 0x7F, // contast value - 0xD9, 0x01, 0x22, // 0x1F Precharge - 0xDB, 0x01, 0x40, // Precharge - 0x20, 0x01, 0x00, // Set horizontal addressing mode - 0xA4, 0x00, // Display resume - 0xA6, 0x00, // Normal display - 0xAF, 0x00, // Display on + 0xAE, // display off + 0x20, 0x00, // Page horizontal Addressing mode + 0xC8, // Scan from 127 to 0 (Reverse scan) + 0x40| 0x00, // First line to start scanning from + 0x81, 0xFF, // contast value to 0xFF for maximum brightness + 0xA0| 0x01, // Use reverse mapping. 0x00 - is normal mapping + 0xA6, // Normal display + 0xA8, 63, // Reset to default MUX. See datasheet + 0xD3, 0x00, // no offset + 0xD5, 0x80, // set to default ratio/osc frequency + 0xD9, 0xF1, // switch precharge to 0x22 // 0xF1 + 0xDA, 0x12, // set divide ratio + 0xDB, 0x30, // vcom deselect to 0x30 + 0x8D, 0x95, // Enable charge pump 9V + 0xAD, 0x30, // Internal Iref setting 30uA + 0xA4, // Display resume + 0xAF, // Display on }; //////////////////////////////////////////////////////////////////////////////// @@ -305,7 +308,7 @@ static const PROGMEM uint8_t s_SSD1306B_lcd128x64_initData[] = { 0xD5, 0x80, // set to default ratio/osc frequency 0xD9, 0xF1, // switch precharge to 0x22 // 0xF1 0xDA, 0x12, // set divide ratio - 0xDB, 0x20, // vcom deselect to 0x20 // 0x40 + 0xDB, 0x30, // vcom deselect to 0x30 0x8D, 0x95, // Enable charge pump 9V 0xAD, 0x30, // Internal Iref setting 30uA 0xA4, // Display resume