/*******************************************************
* 功能:LCD1602液晶显示驱动
* File: Text4.c
********************************************************/
#include "config.h"
#define RS (1<<8)
#define RW (1<<9)
#define E (1<<10)
#define BUSY (1<<7)
#define FIRSTLINE 0x80
#define SECONDLINE 0xc0
unsigned char str1[]="Hello Lpc1602";
unsigned char str2[]="2016 I'm coming";
void DelayMs(unsigned char ms);
void WriteCommand(unsigned char command);
void WriteData(unsigned char data);
void Set_XY(unsigned char x,unsigned char y);
void DisplayChar(unsigned char x,unsigned char y,unsigned char data);
void DisplayString(unsigned char x,unsigned char y,unsigned char *str);
void InitLcd(void);
//主函数入口
int main()
{
PINSEL0 &= 0xfffff800;//低11位为IO功能
IO0DIR = 0x7ff;//为输出功能
IO0CLR = 0x7ff;//清零
-
别说用MDK编译的哈!呵呵!
一周热门 更多>