|
{
//RD=1; //WR=1;
CheckBF(); /* 格式:數(shù)據(jù)通道(參數(shù)1,參數(shù)2) + 命令代碼 */ Wdata(0x0);
CheckBF(); Wdata(0x0); CheckBF(); Wcode(0x40); /* 設(shè)置文本 顯示區(qū)域首地址:0000H */
CheckBF(); Wdata(0x1e); CheckBF(); Wdata(0x0); CheckBF(); Wcode(0x41); /* 設(shè)置文本寬度 30個字符,既一行顯示所占字節(jié)數(shù) */
CheckBF(); Wdata(0x0); CheckBF(); Wdata(0x08); CheckBF(); Wcode(0x42); /* 設(shè)置圖形 顯示區(qū)域首地址:800H */
CheckBF(); Wdata(0x1e); /* 240 Byte */ CheckBF(); Wdata(0x0); CheckBF(); Wcode(0x43); /* 設(shè)置圖形寬度 240 個字節(jié),既一行顯示所占字節(jié)數(shù) *
CheckBF(0); Wcode(0xa0); /* 定義光標(biāo)大小, 1 格顯示 */
CheckBF(); Wcode(0x80); /* 設(shè)置顯示方式 ,選定內(nèi)部 CGROM,“或邏輯” */
CheckBF(); Wcode(0x98); /* 僅打(圖形) 顯示*/
}
/* ----------------- 地址定位 ------------- */
void GPS(uint L_addr)
{
uchar KL;
KL=L_addr%256; /* 測定地位 */ Wdata(KL); KL=L_addr/256; /* 測定高位 */ Wdata(KL); Wcode(0x24); /* 設(shè)置顯示指針 800H */
}
/* ############################## Main Programma ##################################*/
void main() {
uint n; //uchar k;
AUXR=0x03; //EXTRAM=0 --> 選擇內(nèi)部附加的RAM; EXTRAM=1 --> 選擇外部數(shù)據(jù)RAM空間.
RESET=0; /* 低 電 平 復(fù) 位 */ delay(LT); RESET=1;
Init(); /* ---------------------------------------------------------------- 初始化 LCM */
//---------------- clear
/* ---------------------------------------++++++++ 以下是 T6963C 的圖形測試區(qū) ( 顯示一幅圖片) +++++++++++*/
GPS(0x800); /* 顯示 1 */
CheckBF(); Wcode(0xb0); /* 自動寫模式 */
for(n=0;n<3840;n++) Wdata(MAP1[n]);
CheckBF(); Wcode(0xb2);
while(1);
}
|