Сие работатет на adsp2191
unsigned int LCDBuffer[4800]={0}; void LCDSendCmd(int cmd){ // while(!(external_memory_read(64,0)&BIT6)); while((external_memory_read(64,0)&BIT6)); external_memory_write(64,(void*)1,cmd); sysreg_write(sysreg_IOPG, External_Access_Bridge_Page); while(io_space_read(E_STAT)&BIT8); } void LCDSendCmdData(int data){ // while(!(external_memory_read(64,0)&BIT6)); while((external_memory_read(64,0)&BIT6)); external_memory_write(64,(void*)0,data); sysreg_write(sysreg_IOPG, External_Access_Bridge_Page); while(io_space_read(E_STAT)&BIT8); } void LCDRedraw(void){ LCDSendCmd(0x46); LCDSendCmdData(0); LCDSendCmdData(0); LCDSendCmd(0x42); for(int i=0; i<4800; i++){ LCDSendCmdData(LCDBuffer[i]>>8); LCDSendCmdData(LCDBuffer[i]&0xFF); } } void LCDClear(void){ int i; for(i=0;i<4800;i++) LCDBuffer[i]=0x00; } /** ******************************************************************************* * \brief * * \param * * \return * * \note * ******************************************************************************/ void LCDInit(void){ external_memory_write(64,(void*)2,0); sysreg_write(sysreg_IOPG, External_Access_Bridge_Page); while(io_space_read(E_STAT)&BIT8); DelayUS(1000); external_memory_write(64,(void*)2,1); sysreg_write(sysreg_IOPG, External_Access_Bridge_Page); while(io_space_read(E_STAT)&BIT8); DelayUS(1000); LCDSendCmd (0x40); // System Set Command LCDSendCmdData(0x30); // LCDSendCmdData(0x07); // FX LCDSendCmdData(0x07); // FY LCDSendCmdData(0x28); // C/R LCDSendCmdData(0x38); // TC/R LCDSendCmdData(239); // L/F LCDSendCmdData(0x28); // APL LCDSendCmdData(0); // APH LCDSendCmd (0x44); LCDSendCmdData(0x00); //SAD1 l LCDSendCmdData(0x00); //SAD1 h LCDSendCmdData(0xF0); //SL1 // LCDSendCmdData(0x80); //SAD2 l // LCDSendCmdData(0x25); //SAD2 h LCDSendCmdData(0x00); //SAD2 l LCDSendCmdData(0x00); //SAD2 h LCDSendCmdData(0xF0); //SL2 // LCDSendCmdData(0x00); //SAD3 l // LCDSendCmdData(0x4B); //SAD3 h LCDSendCmdData(0x00); //SAD3 l LCDSendCmdData(0x00); //SAD3 h LCDSendCmdData(0x00); //SAD4 l LCDSendCmdData(0x00); //SAD4 h LCDSendCmd (0x58); LCDSendCmdData(0x57); LCDClear(); LCDRedraw(); LCDSendCmd (0x5A); LCDSendCmdData(0x00); LCDSendCmd (0x5B); LCDSendCmdData(0x1F); LCDSendCmd (0x59); LCDSendCmdData(0x57); LCDSendCmd (0x4C); }
-
- Забыл сказать - ЖКИ другое, но чип тот же - diper(09.03.2005 14:45)