diff lunalcd/startek.c @ 65:cdf2c99e5025

lunalcd project started
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 19 Mar 2020 01:31:05 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lunalcd/startek.c	Thu Mar 19 01:31:05 2020 +0000
@@ -0,0 +1,49 @@
+/*
+ * ST7775R register init for Startek LCDs KD020C-1 V2 and KD020C-2A,
+ * the former of which is also sold by Crystalfontz as CFAF176220U-020T.
+ */
+
+lcd_init_seq()
+{
+	/* basic settings */
+	write_ir(0x01);
+	write_dr(0x011C);
+	write_ir(0x02);
+	write_dr(0x0100);
+	write_ir(0x03);
+	write_dr(0x1030);
+	write_ir(0x0F);
+	write_dr(0x0001);
+	write_ir(0x10);
+	write_dr(0x0000);
+	write_ir(0x11);
+	write_dr(0x1000);
+	/* gamma control registers */
+	write_ir(0x50);
+	write_dr(0x0203);
+	write_ir(0x51);
+	write_dr(0x0A09);
+	write_ir(0x52);
+	write_dr(0x0005);
+	write_ir(0x53);
+	write_dr(0x1021);
+	write_ir(0x54);
+	write_dr(0x0602);
+	write_ir(0x55);
+	write_dr(0x0003);
+	write_ir(0x56);
+	write_dr(0x0703);
+	write_ir(0x57);
+	write_dr(0x0507);
+	write_ir(0x58);
+	write_dr(0x1021);
+	write_ir(0x59);
+	write_dr(0x0703);
+	/* VCOM */
+	write_ir(0xB0);
+	write_dr(0x2501);
+	/* turn it on! */
+	write_ir(0x07);
+	write_dr(0x1017);
+	return(0);
+}