void initial(void) { comm_out(0xae);//Display OFF comm_out(0x40);//Set Display Start Line comm_out(0xa0);//Set Segment Re-map comm_out(0x81);//Set Contrast Control comm_out(0x3a); comm_out(0xa4);//Set Entire Display OFF/ON comm_out(0xa6);//Set Normal/Reverse Display comm_out(0xa8);//Multiplex Ration Mode Set comm_out(0x3f); comm_out(0xad);//DC-DC Setting comm_out(0x80); comm_out(0xc8);//Set Common Output Scan Direction comm_out(0xd3);//Set Display Offset comm_out(0x00); comm_out(0xd5);//Set Display Clock Divide Ratio/Oscillator Frequency comm_out(0x70); comm_out(0xd9);//Set Discharge/Precharge Period comm_out(0x2f); comm_out(0xdb);//Set VCOM Deselect Level comm_out(0x3f); comm_out(0xdc);//Set VSEGM Levelcomm_out(0x35); comm_out(0x30);//Set Discharge VSL Level CleanDDR (); //Clear the whole DDRAM comm_out(0xaf);//Set Display ON }