Skip to content

Instantly share code, notes, and snippets.

@imliubo
Created June 15, 2026 02:42
Show Gist options
  • Select an option

  • Save imliubo/f83a67648e78b34703cf680a323e4639 to your computer and use it in GitHub Desktop.

Select an option

Save imliubo/f83a67648e78b34703cf680a323e4639 to your computer and use it in GitHub Desktop.
Initialization code for the new screen of AtomS3 and AtomS3R
// Provided by the supplier, unmodified.
// CC0-1.0
HW_Reset();
Delay(120); //Delay 120ms
Write(Command , 0x11); //Sleep out
Delay(120); //Delay 120ms
Write(Command , 0xB1);
Write(Parameter , 0x05);
Write(Parameter , 0x3C);
Write(Parameter , 0x3C);
Write(Command , 0xB2);
Write(Parameter , 0x05);
Write(Parameter , 0x3C);
Write(Parameter , 0x3C);
Write(Command , 0xB3);
Write(Parameter , 0x05);
Write(Parameter , 0x3C);
Write(Parameter , 0x3C);
Write(Parameter , 0x05);
Write(Parameter , 0x3C);
Write(Parameter , 0x3C);
Write(Command , 0xB4); //Dot inversion
Write(Parameter , 0x03);
Write(Command , 0xC0);
Write(Parameter , 0xA4);
Write(Parameter , 0x04);
Write(Parameter , 0x84);
Write(Command , 0xC1);
Write(Parameter , 0xC8);
Write(Command , 0xC2);
Write(Parameter , 0x0D);
Write(Parameter , 0x00);
Write(Command , 0xC3);
Write(Parameter , 0x8D);
Write(Parameter , 0x2A);
Write(Command , 0xC4);
Write(Parameter , 0x8D);
Write(Parameter , 0xEE);
Write(Command , 0xC5);
Write(Parameter , 0x1D);
Write(Command , 0xE0);
Write(Parameter , 0x0C);
Write(Parameter , 0x0A);
Write(Parameter , 0x06);
Write(Parameter , 0x00);
Write(Parameter , 0x1A);
Write(Parameter , 0x11);
Write(Parameter , 0x0B);
Write(Parameter , 0x0A);
Write(Parameter , 0x0B);
Write(Parameter , 0x0C);
Write(Parameter , 0x19);
Write(Parameter , 0x33);
Write(Parameter , 0x00);
Write(Parameter , 0x06);
Write(Parameter , 0x02);
Write(Parameter , 0x10);
Write(Command , 0xE1);
Write(Parameter , 0x0D);
Write(Parameter , 0x0F);
Write(Parameter , 0x03);
Write(Parameter , 0x00);
Write(Parameter , 0x11);
Write(Parameter , 0x0A);
Write(Parameter , 0x06);
Write(Parameter , 0x08);
Write(Parameter , 0x09);
Write(Parameter , 0x0D);
Write(Parameter , 0x1C);
Write(Parameter , 0x3A);
Write(Parameter , 0x00);
Write(Parameter , 0x09);
Write(Parameter , 0x07);
Write(Parameter , 0x10);
Write(Command , 0x35);
Write(Parameter , 0x00);
Write(Command , 0x3A); //65k mode
Write(Parameter , 0x05);
Write(Command , 0x36);
Write(Parameter , 0xC8);
Write(Command , 0x29); //Display on
Write(Command , 0x2C);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment