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

📄 main.c

📁 ATMEL ATSAM7S64处理器部分控制程序。
💻 C
字号:
/***************************************************************************************
* File:	main.c
* Author:	Embest YY.wang
* Desc:	Char LCD function
* History:	
        	DB0-----PA24	DB4-----PA28 	RW-------PA22
        	DB1-----PA25 	DB5-----PA29 	RS-------PA21
        	DB2-----PA26 	DB6-----PA30 	E--------PA23
        	DB3-----PA27 	DB7-----PA31 	背光灯VCC接J301的Pin36(5V)  
*********************************************************************************************/
/*------------------------------------------------------------------------------------------*/
/*								include files												*/
/*------------------------------------------------------------------------------------------*/
#include "Lcd.h"
#include "Board.h"
#include <stdlib.h>
#include <stdio.h>
Uchar ptr[]={"Welcom to Embest"};
Uchar ptr2[]={"ATEBSAM7S Board"};

/*********************************************************************************************
* name:		Main
* func:		
* para:		
* ret:	
* modify:
* comment:		
*********************************************************************************************/
void Main(void)
{

	int i;
    // First, enable the clock of the PIO
	AT91F_PMC_EnablePeriphClock ( AT91C_BASE_PMC, 1 << AT91C_ID_PIOA );
    AT91F_PIO_CfgPullup( AT91C_BASE_PIOA, LCM_CONTROL| LCM_PORT );
    // then, we configure the PIO Lines corresponding to LED1 to LED3
    // to be outputs. No need to set these pins to be driven by the PIO because it is GPIO pins only.
	AT91F_PIO_CfgOutput( AT91C_BASE_PIOA, LCM_CONTROL );
   
	DelayMs(400);

	LcdReset();
	i = 0;
	while(1)
	{
		ePutstr(0,0,ptr);
		ePutstr(1,1,ptr2);
	}

}

⌨️ 快捷键说明

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