#include<reg52.h> //包含头文件,一般情况不需要改动,头文件包含特殊功能寄存器的定义
#include<stdio.h>
#include<intrins.h>
#include "8X16.h"
#include "GB1616.h" //16*16汉字字模
#include "红外.h"
#include"ILI9163.h"
//=========================================主程序========================================//
void main()
{
EX0init(); //初始化外部中断
TIM0init();//初始化定时器
UARTinit();
Ini_ILI9163();
display_dot(0xff,0xff); //white FULL
while(1)//主循环
{
if(irok) //如果接收好了进行红外处理
{
Ircordpro();
irok=0;
}
if(irpro_ok) //如果处理好后进行工作处理,如按对应的按键后显示对应的数字等
{
Ir_work();
{
switch(color)
{
case 9:LCD_PutString(left,top,num,0x0000,0xffff);break;
case 1:display_dot(0xf8,0x00);break; //RED FULL
case 2:display_dot(0x07,0xe0);break; //green FULL
case 3:display_dot(0x00,0x1f);break; //blue FULL
case 4:display_dot(0x00,0x00);break; //black FULL
case 5: pouse();break; //white FULL
case 6:grayscale();break;
case 7:displayshow();break;
case 8:LCD_PutString(5,3,"my name is cxj",0x07e0,0xffff);
LCD_PutString(10,23,"I LOVE MY JOB ",0x07e0,0xffff);
LCD_PutString(0,43,"上海浩豚电子科技",0x001f,0xffff);
LCD_PutString(0,63,"专业技术支持论坛",0x07e0,0xffff);
LCD_PutString(0,83,"专业开发板工控板",0x001f,0xffff);
LCD_PutString(0,103,"01234567",0x001f,0xf800);
LCD_PutString(64,103,"89abcdef",0x07e0,0xffff);
LCD_PutString(0,123,"ghijklmnopqrstuv",0xffff,0x0000);
LCD_PutString(0,143,"`,./<>';:[]{}\|?)",0x0000,0xffff);break;
default: break;
}
}
}
}
} |