*/ #include "u8g.h" #define WIDTH 96 #define HEIGHT 65 #define PAGE_HEIGHT 8 static const uint8_t u8g_dev_pcf8812_init_seq[] PROGMEM = { U8G_ESC_CS(0), /* disable chip */ U8G_ESC_ADR(0), /* instruction mode */ U8G_ESC_RST(1), /* do reset low pulse with (1*16)+2 milliseconds */ U8G_ESC_CS(1), /* enable chip */ 0x021, /* activate chip (PD=0), horizontal increment (V=0), enter extended command set (H=1) */ 0x006, /* temp. control: b10 = 2 */ 0x013, /* bias system 1:48 */ 0x080 | 0x040, /* medium Vop */ 0x020, /* activate chip (PD=0), horizontal increment (V=0), enter normal command set (H=0) */ 0x00c, /* display on, normal operation */ U8G_ESC_DLY(100), /* delay 100 ms */ 0x020, /* activate chip (PD=0), horizontal increment (V=0), enter normal command set (H=0) */ 0x00d, /* display on, invert */ U8G_ESC_DLY(100), /* delay 100 ms */ U8G_ESC_DLY(100), /* delay 100 ms */ 0x020, /* activate chip (PD=0), horizontal increment (V=0), enter normal command set (H=0) */ 0x00c, /* display on, normal */ U8G_ESC_DLY(100), /* delay 100 ms */
#include "u8g.h" #define CMD 0 #define DAT 1 #define WIDTH 240 #define HEIGHT 160 #define PAGE_HEIGHT 8 static const uint8_t u8g_dev_st75256_init_seq[] PROGMEM = { U8G_ESC_CS(0), /* disable chip */ U8G_ESC_RST(1), /* hardware reset. Min 1 ms */ U8G_ESC_DLY(1), /* Delay max 1 ms */ U8G_ESC_CS(1), /* enable chip */ U8G_ESC_ADR(CMD), 0x30, // EXT=0 0x94, // Sleep Out 0x31, // EXT=1 // 0xD7, // Autoread disable // U8G_ESC_ADR(DAT), // 0x9F, // U8G_ESC_ADR(CMD), 0x32, // Analog set U8G_ESC_ADR(DAT), 0x00, /* OSC Frequency adjustment */ 0x01, /* Booster Efficiency =Level 1 */
#define HEIGHT 80 #define PAGE_HEIGHT 8 /* code ideas: https://github.com/vsergeev/embedded-drivers/tree/master/avr-lc7981 data sheets: http://www.lcd-module.de/eng/pdf/zubehoer/lc7981.pdf http://www.lcd-module.de/pdf/grafik/w160-6.pdf */ static const uint8_t u8g_dev_lc7981_160x80_init_seq[] PROGMEM = { U8G_ESC_CS(0), /* disable chip */ U8G_ESC_ADR(1), /* instruction mode */ U8G_ESC_RST(15), /* do reset low pulse with (15*16)+2 milliseconds (=maximum delay)*/ U8G_ESC_CS(1), /* enable chip */ U8G_ESC_DLY(50), /* delay 50 ms */ U8G_ESC_ADR(1), /* instruction mode */ 0x000, /* mode register */ U8G_ESC_ADR(0), /* data mode */ 0x032, /* display on (bit 5), master mode on (bit 4), graphics mode on (bit 1)*/ U8G_ESC_ADR(1), /* instruction mode */ 0x001, /* character/bits per pixel pitch */ U8G_ESC_ADR(0), /* data mode */ 0x007, /* 8 bits per pixel */ U8G_ESC_ADR(1), /* instruction mode */
return -1; } /**************************************************************************** * u8g interface driver */ #define WIDTH 128 #define HEIGHT 32 #define PAGE_HEIGHT 8 /* init sequence adafruit 128x32 OLED (NOT TESTED) */ static const uint8_t u8g_dev_init_seq[] = { U8G_ESC_CS(0), U8G_ESC_ADR(0), U8G_ESC_RST(1), U8G_ESC_CS(1), 0xae, /* display off */ 0xd5, 0x80, /* clock divide ratio (0x00=1) and oscillator frequency (0x8) */ 0xa8, 0x1f, /* multiplexing */ 0xd3, 0x00, /* display offset = 0 */ 0x40, /* start line = 0 */ 0x8d, 0x14, /* [2] charge pump setting (p62): 0x014 enable, 0x010 disable */ 0x20, 0x00, /* memory mode */ // 0x20, 0x02, /* 2012-05-27: page addressing mode */ 0xa1, /* segment remap a0/a1*/ 0xc8, /* c0: scan dir normal, c8: reverse */ //0xda, 0x12, /* com pin HW config, sequential com pin config (bit 4), disable left/right remap (bit 5) */ 0xda, 0x2, /* com pin HW config, disable left/right remap (bit 5) */