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

📄 main.c

📁 包内含有关于ipod mp3透反式1.46 tft液晶屏的avr示例程序和液晶屏转接板的protel原理图和pcb图。
💻 C
字号:
#include <avr/io.h>
#include <avr/delay.h> 
#include <math.h>
#include "H146IT01.h"



void PortInit(void)
{
    DDRA = 0xff;
	DDRC = 0xff;
	DDRD = 0xff;
}


int main(void)
{
    double x,y;
    PortInit();
    LCDInit();
	DisplayScreen(0xff, 0x00, 0x00);

    for(x=0; x<120; x+=0.1)
	{
	    y = sin(x/10)*30;
	    PutPixel(x, (int)(y+80), 0x00, 0xff, 0x0f);
		PutPixel(x+10, (int)(y+80), 0xf0, 0x3f, 0xf3);
	}

PutString(0, 0, "I'm what I am, I'm ldqmoon!", 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x23);
PutString(0,110, "www. acgclub.com", 0x26, 0x0f, 0x82, 0xac, 0x43, 0x65);


while(1);

}



⌨️ 快捷键说明

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