device c code ssd1327, issue #641
This commit is contained in:
parent
b0d450df80
commit
0842dbee1a
|
@ -847,6 +847,7 @@ uint8_t u8x8_d_ra8835_nhd_240x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, vo
|
|||
uint8_t u8x8_d_ra8835_320x240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
uint8_t u8x8_d_ssd1325_nhd_128x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
uint8_t u8x8_d_ssd1327_seeed_96x96(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
uint8_t u8x8_d_ssd1327_ea_w128128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
uint8_t u8x8_d_ssd1327_midas_128x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
uint8_t u8x8_d_ssd1326_er_256x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
uint8_t u8x8_d_ssd1329_128x96_noname(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
|
|
|
@ -308,6 +308,109 @@ uint8_t u8x8_d_ssd1327_seeed_96x96(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, v
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*=============================================*/
|
||||
/* EA W128128 round OLED 128x128 */
|
||||
/* issue #641 */
|
||||
/* https://www.lcd-module.de/fileadmin/eng/pdf/grafik/W128128-XR.pdf */
|
||||
|
||||
static const u8x8_display_info_t u8x8_ssd1327_ea_w128128_display_info =
|
||||
{
|
||||
/* chip_enable_level = */ 0,
|
||||
/* chip_disable_level = */ 1,
|
||||
|
||||
/* post_chip_enable_wait_ns = */ 20,
|
||||
/* pre_chip_disable_wait_ns = */ 10,
|
||||
/* reset_pulse_width_ms = */ 100,
|
||||
/* post_reset_wait_ms = */ 100, /**/
|
||||
/* sda_setup_time_ns = */ 100, /* */
|
||||
/* sck_pulse_width_ns = */ 100, /* */
|
||||
/* sck_clock_hz = */ 4000000UL, /* since Arduino 1.6.0, the SPI bus speed in Hz. Should be 1000000000/sck_pulse_width_ns */
|
||||
/* spi_mode = */ 0, /* active high, rising edge */
|
||||
/* i2c_bus_clock_100kHz = */ 1, /* use 1 instead of 4, because the SSD1327 seems to be very slow */
|
||||
/* data_setup_time_ns = */ 40,
|
||||
/* write_pulse_width_ns = */ 60,
|
||||
/* tile_width = */ 16,
|
||||
/* tile_hight = */ 16,
|
||||
/* default_x_offset = */ 0,
|
||||
/* flipmode_x_offset = */ 0,
|
||||
/* pixel_width = */ 128,
|
||||
/* pixel_height = */ 128
|
||||
};
|
||||
|
||||
/* this is a copy of the init sequence for the seeed 96x96 oled */
|
||||
static const uint8_t u8x8_d_ssd1327_ea_w128128_init_seq[] = {
|
||||
|
||||
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
|
||||
|
||||
U8X8_CA(0x0fd, 0x012), /* unlock display, usually not required because the display is unlocked after reset */
|
||||
U8X8_C(0x0ae), /* display off */
|
||||
//U8X8_CA(0x0a8, 0x03f), /* multiplex ratio: 0x03f * 1/64 duty */
|
||||
U8X8_CA(0x0a8, 0x05f), /* multiplex ratio: 0x05f * 1/64 duty */
|
||||
U8X8_CA(0x0a1, 0x000), /* display start line */
|
||||
//U8X8_CA(0x0a2, 0x04c), /* display offset, shift mapping ram counter */
|
||||
|
||||
U8X8_CA(0x0a2, 0x020), /* display offset, shift mapping ram counter */
|
||||
U8X8_CA(0x0a0, 0x051), /* remap configuration */
|
||||
|
||||
|
||||
U8X8_CA(0x0ab, 0x001), /* Enable internal VDD regulator (RESET) */
|
||||
//U8X8_CA(0x081, 0x070), /* contrast, brightness, 0..128 */
|
||||
U8X8_CA(0x081, 0x053), /* contrast, brightness, 0..128 */
|
||||
//U8X8_CA(0x0b1, 0x055), /* phase length */
|
||||
U8X8_CA(0x0b1, 0x051), /* phase length */
|
||||
//U8X8_CA(0x0b3, 0x091), /* set display clock divide ratio/oscillator frequency (set clock as 135 frames/sec) */
|
||||
U8X8_CA(0x0b3, 0x001), /* set display clock divide ratio/oscillator frequency */
|
||||
|
||||
//? U8X8_CA(0x0ad, 0x002), /* master configuration: disable embedded DC-DC, enable internal VCOMH */
|
||||
//? U8X8_C(0x086), /* full current range (0x084, 0x085, 0x086) */
|
||||
|
||||
U8X8_C(0x0b9), /* use linear lookup table */
|
||||
|
||||
//U8X8_CA(0x0bc, 0x010), /* pre-charge voltage level */
|
||||
U8X8_CA(0x0bc, 0x008), /* pre-charge voltage level */
|
||||
//U8X8_CA(0x0be, 0x01c), /* VCOMH voltage */
|
||||
U8X8_CA(0x0be, 0x007), /* VCOMH voltage */
|
||||
U8X8_CA(0x0b6, 0x001), /* second precharge */
|
||||
U8X8_CA(0x0d5, 0x062), /* enable second precharge, internal vsl (bit0 = 0) */
|
||||
|
||||
U8X8_C(0x0a4), /* normal display mode */
|
||||
|
||||
U8X8_END_TRANSFER(), /* disable chip */
|
||||
U8X8_END() /* end of sequence */
|
||||
};
|
||||
|
||||
|
||||
uint8_t u8x8_d_ssd1327_ea_w128128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
|
||||
{
|
||||
if ( u8x8_d_ssd1327_96x96_generic(u8x8, msg, arg_int, arg_ptr) != 0 )
|
||||
return 1;
|
||||
if ( msg == U8X8_MSG_DISPLAY_SETUP_MEMORY )
|
||||
{
|
||||
u8x8_d_helper_display_setup_memory(u8x8, &u8x8_ssd1327_ea_w128128_display_info);
|
||||
return 1;
|
||||
}
|
||||
else if ( msg == U8X8_MSG_DISPLAY_INIT )
|
||||
{
|
||||
u8x8_d_helper_display_init(u8x8);
|
||||
u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1327_ea_w128128_init_seq);
|
||||
return 1;
|
||||
}
|
||||
else if ( msg == U8X8_MSG_DISPLAY_SET_FLIP_MODE )
|
||||
{
|
||||
if ( arg_int == 0 )
|
||||
{
|
||||
u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1327_seeed_96x96_flip0_seq);
|
||||
u8x8->x_offset = u8x8->display_info->default_x_offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1327_seeed_96x96_flip1_seq);
|
||||
u8x8->x_offset = u8x8->display_info->flipmode_x_offset;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*=============================================*/
|
||||
/* MIDAS MCOT128128C1V-YM 128x128 Module */
|
||||
|
|
Loading…
Reference in New Issue