⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 全新三星lcd 开发源码, 采用芯片LTS180S3 HD66773
💻 C
字号:
#include "S3TFT.h"
#include "tu.h"
 

 
void LCD_Draw_Screen1(const unsigned char *map)
{
   unsigned int i,a,k;
   for(i = 0; i <11032 ; i ++) 
   {
  
     k=pgm_read_byte(map++);
	 a=pgm_read_byte(map++);
	 Send(0x0022,0);
     PORTG|=(1<<LCD_CS); 
     PORTB|= (1<<LCD_RS); //RS=1;
     PORTG&=~(1<<LCD_CS);
	 PORTG&=~(1<<LCD_WR);
	 PORTC=k;//高8位
     PORTD=a;//低8位
     PORTG|= (1<<LCD_WR);
   }
	
}

void LCD_Draw_Screen2(const unsigned char *map)
{
   unsigned int i,a,k;
   for(i = 0; i <9448 ; i ++) 
   {
  
     k=pgm_read_byte(map++);
	 a=pgm_read_byte(map++);
	 Send(0x0022,0);
     PORTG|=(1<<LCD_CS); 
     PORTB|= (1<<LCD_RS); //RS=1;
     PORTG&=~(1<<LCD_CS);
	 PORTG&=~(1<<LCD_WR);
	 PORTC=k;//高8位
     PORTD=a;//低8位
     PORTG|= (1<<LCD_WR);
   }
	
}
int  main(void)
{ 
  unsigned int i;
  unsigned char R,x,y,n=0;     
  LCD_Initialize();
  
  LCD_Draw_Screen1(b);
  LCD_Draw_Screen2(c);
  
  for(i=0;i<13;i++)
     delay(10000);
	 
  for(i=0;i<22500;i++)
  LCD_Send(0x0022,0x07EF);
  
  for(y=0;y<80;y+=16)
   {
    for(x=0;x<128;x+=16)
     {
	 put(x,y,0x07EF,0xf800,n);//  
	 n++;
	 }
	} 
	 
  LCD_DrawRectangle(48,65,128,81,0x07EF,1);
  
  for(i=0;i<25;i++)
	  { 
	   circle(65-i,160-1.8*i,R,0xf800,1);
	   circle(65+i,160-1.8*i,R,0xf800,1);
	   R++;
	  }
	for(i=0;i<14;i++)  
     delay(10000);
    
      LCD_STOP();  

} 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -