void FnLcdS65InitC(void) /* Initialization of the LPH-Type display. Note that this display does not need the RS line. Instead it uses command type indication and command data indication. (c) Christian Kranz, 10/2005 */ { UINT08_T ct1[6]={0x07,0x02,0x04,0x0C,0x0D,0x0E}; UINT08_T cd1[12]={0x00,0x00, 0x04,0x00, 0x00,0x00, 0x00,0x01, 0x06,0x16, 0x10,0x10}; UINT08_T ct2[2]={0x03,0x0E}; UINT08_T cd2[4]={0x00,0x0C, 0x2D,0x1F}; UINT08_T ct3[1]={0x0D}; UINT08_T cd3[2]={0x06,0x16}; UINT08_T ct4[21]={0x01,0x0F,0x0B,0x11,0x06,0x05,0x14,0x15,0x16,0x17,0x20,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x3A,0x3B}; UINT08_T cd4[42]={0x02,0x15, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x30, 0xAF,0x00, 0x00,0x00, 0x83,0x00, 0xAF,0x00, 0x00,0x00, 0x00,0x00, 0x04,0x00, 0x02,0x07, 0x07,0x00, 0x00,0x05, 0x07,0x03, 0x07,0x07, 0x00, 0x07, 0x12,0x00, 0x00,0x09}; UINT08_T i,j; // generate clean display reset //PORTB &= ~_BV(LCD_RESET); // reset display LCD_RESET_CLR(); //PORTB |= _BV(LCD_CS); // CS is high during reset release LCD_CS_SET(); //PORTB |= _BV(LCD_RS); // RS is not used, set it to high LCD_RS_SET(); //_delay_ms(1); //PORTB |= _BV(LCD_RESET); // release reset LCD_RESET_SET(); //_delay_ms(10); //PORTB &= ~_BV(LCD_CS); // select display LCD_CS_CLR(); // starts at 58.8ms FnLcdS65Comtype(0x00); FnLcdS65Comdat(0x00,0x01); // starts at 125ms j=0; for (i=0; i<6; i++) { FnLcdS65Comtype(ct1[i]); FnLcdS65Comdat(cd1[j],cd1[j+1]); j=j+2; } // start at 240ms j=0; for (i=0; i<2; i++) { FnLcdS65Comtype(ct2[i]); FnLcdS65Comdat(cd2[j],cd2[j+1]); } // start at 355ms j=0; for (i=0; i<1; i++) { FnLcdS65Comtype(ct3[i]); FnLcdS65Comdat(cd3[j],cd3[j+1]); } // start at 458ms j=0; for (i=0; i<21; i++) { FnLcdS65Comtype(ct4[i]); FnLcdS65Comdat(cd4[j],cd4[j+1]); j=j+2; } FnLcdS65Comtype(0x07); FnLcdS65Comdat(0x00, 0x05); FnLcdS65Comtype(0x07); FnLcdS65Comdat(0x00, 0x25); FnLcdS65Comtype(0x07); FnLcdS65Comdat(0x00, 0x27); FnLcdS65Comtype(0x07); FnLcdS65Comdat(0x00, 0x37); // ready for first screen //PORTB |= _BV(LCD_CS); // deselect display LCD_CS_SET(); }