void init_cpu(void );
void init_lcd(void);
void disp_Graphic();
void disp_Q(void );
void LCD_Test(void);
void disp_clip(void );
void disp_fangkuang(void );
void snow(uchar fst, uchar snd);
void ShowZF(uchar lin,uchar column,uchar *ptString);
void Pixel(uchar PointX,uchar PointY, bit Mode);
void disp_Graphic1();
void disp_Graphic2();
void disp_Graphic3();
//================================================================
void main()
{
init_cpu();
init_lcd();
while(1)
{
disp_Graphic1();
DELAY_CLS();
Pixel( 10,10,1);
Pixel( 0,0,1);
Pixel( 1,1,1);
DELAY_CLS();
disp_Graphic2();
DELAY_CLS();
disp_Graphic3();
DELAY_CLS();
disp_Q(); //显示字库
DELAY_CLS();
disp_fangkuang1();
DELAY_CLS();
LCD_Test(); //全黑、全白、竖显
disp_Q();
DELAY_CLS(); //显示字库
// ShowZF(0,0,"WLCOME");
// ShowZF(3,2,"WLCOME TO SHENGZHENG");
// DELAY_CLS();
}
}
//----------------------------------------------------------------
void delay_ms(uint ms_value) //delay about 1 ms
{
uint k;
for(k=0;k {
delay_us(200);
}
}
//----------------------------------------------------------------
void wr_cmd(uchar cmd)
{
RWCheck();
lcd_data = 0x00; // Set the port as Output
CS=0;
CD = 1;
RD0 = 1;
WR0 = 0;
lcd_data =cmd;
WR0 = 1;
CS = 1;
}
//----------------------------------------------------------------
void wr_data(uchar wdata)
{
RWCheck();
lcd_data = 0x00; // Set the port as Output
CS=0;
CD = 0;
RD0 = 1;
WR0 = 0;
lcd_data = wdata;
WR0 = 1;
CS = 1;
}
//----------------------------------------------------------------
void wr_cmd_data( uchar cmd,uchar dat1,uchar dat2)
{
wr_data(dat1);
wr_data(dat2);
wr_cmd(cmd);
}
}