/* load black-and-white BMP picture from ROM the RAM for future use show bmp file to the LCD display. the picture has limited format:128by64 dots ,BW*/ #include #include int main(void) { int key,show_1=0; long value; InitLib(); TimerOpen(); if(InitLCD()>0)//initializing LCD Print("\nSomething wrong"); if(BmpShowAt(1,1,"A.bmp",1)!=0) Print("\nBmpShowAt wrong"); if(BmpShowAt(1,30,"B.bmp",1)!=0) Print("\nBmpShowAt wrong"); value = GetTimeTicks(); while(1) { if((value+300) > GetTimeTicks()) { if(show_1 != 2)show_1 = 1; } else if((value+600) > GetTimeTicks()) { if(show_1 != 3) show_1 = 0; } else value = GetTimeTicks(); if(show_1==1) { if(BmpShowAt(40,20,"C.bmp",1)!=0) Print("\nBmpShowAt wrong"); else show_1=2; } if(show_1==0) { if(BmpShowAt(40,20,"D.bmp",1)!=0) Print("\nBmpShowAt wrong"); else show_1=3; } if(Kbhit()) { key=Getch(); if(key=='Q' || key=='q') { break; } } } CloseLCD(); return 0; }