ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Суббота
28 сентября
10985 Топик полностью
sda (28.06.2004 13:20, просмотров: 1) ответил =mse= на Это пустой звук... ;О)
Да,контроллер SED1335. Кварц 8мгц.А что за мёртвое время?Видимо не очень внимательно читал DS...Может взгляните одним глазком на инициализацию?
#define X					320
#define Y					240
#define XTAL					8000000

void InitLCD(void)
{

RES_DISP = 1;
Delay_ms(2);
RES_DISP = 0;
Delay_ms(2);
RES_DISP = 1;
Delay_ms(200);

// SYSTEM SET COMMAND
LCDWriteCmdInit(0x40);          // SYSTEM SET COMMAND
 LCDWriteDataInit(0x30);        // P1   -> PRT=0, IV=1, W/S=0, M0-M2=0
 LCDWriteDataInit(0x87);        // FX   -> WF=1, FX=7
 LCDWriteDataInit(0x0f);        // FY   -> FY=7
 LCDWriteDataInit((X/8)-1);     // C/R  -> Char per line - 1
 LCDWriteDataInit((XTAL / 70 / Y) / 9);     // TC/R -> ( f_osc / f_frame / [L/F] - 1 ) / 9
 LCDWriteDataInit(Y - 1);       // L/F  -> Line per graphic screen - 1 (127)
 LCDWriteDataInit(X/8);         // APL  -> Virtual screen low byte ( char per line)
 LCDWriteDataInit(00);          // APH  -> Virtual screen low byte 

// SCROLL COMMAND
LCDWriteCmdInit(0x44);          // SCROLL COMMAND
 LCDWriteDataInit(0x00);        // First Layer Low Byte  (0x0000)
 LCDWriteDataInit(0x00);        // First Layer Hign Byte
 LCDWriteDataInit(Y);           // 240 Line of scroll

 LCDWriteDataInit(0x00);        // Second Layer Low Byte (0x1000)
 LCDWriteDataInit(0x40);        // Second Layer Hign Byte
 LCDWriteDataInit(Y);           // 240 Line of scroll

// LCDWriteData(0x00);        // Second Layer Low Byte (0x1000)////////////////////////
// LCDWriteData(0x50);        // First Layer Hign Byte

// HORIZONTAL SCROLL POSITION
LCDWriteCmdInit(0x5a);          // HORIZONTAL SCROLL POSITION
 LCDWriteDataInit(0x00);        // no scrool offset

// OVERLAY COMMAND
LCDWriteCmdInit(0x5b);          // OVERLAY COMMAND
 LCDWriteDataInit(0x03);        // 2 layer (1-Text 2-Graphic)

// DISPLAY ON/OFF COMMAND 
LCDWriteCmdInit(0x58);          // DISPLAY OFF COMMAND
 LCDWriteDataInit(0x10);        // Layer 1 & 2 ON  

// CURSOR DIRECTION COMMAND
LCDWriteCmdInit(0x4c);          // CURSOR DIRECTION COMMAND (SHIFT RIGHT)

ClearDispInit();
ClrSCRInit();

// CURSOR FORMAT COMMAND
LCDWriteCmdInit(0x5d);          // CURSOR FORMAT COMMAND
 LCDWriteDataInit(0x07);        // Cursor width (7)
 LCDWriteDataInit(0x87);        // Cursor Height(7) & Block type

// DISPLAY ON/OFF COMMAND 
LCDWriteCmdInit(0x59);          // DISPLAY ON COMMAND
 LCDWriteDataInit(0x14);        // Layer 1 & 2 ON ////////////////1 

// CURSOR WRITE COMMAND
LCDWriteCmdInit(0x46);          // CURSOR WRITE COMMAND
 LCDWriteDataInit(0x00);        // Cursor position low byte
 LCDWriteDataInit(0x00);        // Cursor position high byte
}