Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
112 lines (88 sloc) 1.97 KB
#include "wl_def.h"
//*****************************************************************************
//
// The sequence of commands used to initialize the SSD1329 controller. Each
// command is described as follows: there is a byte specifying the number of
// bytes in the command sequence, followed by that many bytes of command data.
// Note: This initialization sequence is derived from RIT App Note for
// the P14201. Values used are from the RIT app note, except where noted.
//
//*****************************************************************************
#define RIT_INIT_REMAP 0x52
#define RIT_INIT_OFFSET 0x00
const int oled_height = 94;
const uint8_t oled_init_strings[] =
{
// Unlock commands
//
3, 0xFD, 0x12, 0xe3,
//
// Display off
//
2, 0xAE, 0xe3,
//
// Icon off
//
3, 0x94, 0, 0xe3,
//
// Multiplex ratio
//
3, 0xA8, 95, 0xe3,
//
// Contrast
//
3, 0x81, 0xb7, 0xe3,
//
// Pre-charge current
//
3, 0x82, 0x3f, 0xe3,
//
// Display Re-map
//
3, 0xA0, RIT_INIT_REMAP, 0xe3,
//
// Display Start Line
//
3, 0xA1, 0, 0xe3,
//
// Display Offset
//
3, 0xA2, RIT_INIT_OFFSET, 0xe3,
//
// Display Mode Normal
//
2, 0xA4, 0xe3,
//
// Phase Length
//
3, 0xB1, 0x11, 0xe3,
//
// Frame frequency
//
3, 0xB2, 0x23, 0xe3,
//
// Front Clock Divider
//
3, 0xB3, 0xe2, 0xe3,
//
// Set gray scale table. App note uses default command:
// 2, 0xB7, 0xe3
// This gray scale attempts some gamma correction to reduce the
// the brightness of the low levels.
//
17, 0xB8, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 19, 22, 26, 30, 0xe3,
//
// Second pre-charge period. App note uses value 0x04.
//
3, 0xBB, 0x01, 0xe3,
//
// Pre-charge voltage
//
3, 0xBC, 0x3f, 0xe3,
//
// Display ON
//
2, 0xAF, 0xe3,
// Done.
0
};
Something went wrong with that request. Please try again.