Example #1
0
//CPU初始化//
int main(void) 
{
	
	EXCLK_DDR|=1<<EXCLK_BIT ;//en_exclk 引脚输出
	HC245_OE_DDR|=1<<HC245_OE_BIT;//en_245引脚输出
	CMOS_CLK_DDR|=1<<CMOS_CLK_BIT;//7660时钟允许引脚输出	
	DISEN_EXCLK;//禁止外部CLK,使单片机WR与TFT WR相连	
	DISEN_245;//禁止外部数据线,使单片机数据与TFT数据线相连
	CLK_init();//输出时钟到7660
	DATA_OUPUT(); //数据线输出,准备连数据线到TFT
    LCD_Init();
	//DATA_LCD_PORT=0xff;
	LCD_write_english_string(20,60,"Guanfu_Wang  2009-08-26",BLACK,RED);
	LCD_write_english_string(20,76,"Atmega32 & ILI9325 FOR OV7660 REV2.0",BLACK,RED);
	delay_ms(10000);
	LCD_write_english_string(20,96,"OV7660 Init......",BLACK,RED);
	while(1!=OV7660_init());//初始化ov7660
	LCD_write_english_string(20,96,"OV7660 Init  0K  ",BLACK,RED);
	delay_ms(10000);
	LCD_Clear(RED);
    DATA_INPUT(); 
	Init_INT0();
	/**/
    while(1)
    {
	}

}
Example #2
0
int main(void)
{
LCD_init();
LCD_clear();
while(1)
{
uchar i;
LCD_write_english_string(3,0,"WXJ_PCR");
LCD_write_english_string(0,2,"TIME=");
LCD_write_num(5,2,31,2);
LCD_write_english_string(7,2,":");
LCD_write_num(8,2,43,2);
LCD_write_english_string(0,4,"NOW TEMP=");
LCD_write_english_string(0,3,"AIM TEMP=");
LCD_write_num(9,3,97,2);
LCD_write_english_string(11,4,".");
LCD_write_english_string(0,5,"COUNT=");
LCD_write_num(6,5,13,2);
LCD_write_english_string(8,5,":");
LCD_write_num(9,5,35,2);
temp = get_tmp();
sendchangecmd();
for(i=0;i<40;i++)
{
display(temp);
}

}
}
Example #3
0
void main(void) 
{
	LCD_init(); //初始化液晶    
	LCD_clear();
	
	while(1)  
	{
		LCD_write_english_string(0,0," Welcome to  ");
		LCD_write_english_string(0,1," MaWei  studio ");
		LCD_write_english_string(0,2,"amy-studio.com");
		LCD_write_english_string(0,3," Nokia5110 LCD");
		LCD_write_chinese_string(12,4,12,4,0,5);  

	}	  


}