文件名称:LCD1602
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2013-07-19
- 文件大小:
- 356kb
- 下载次数:
- 0次
- 提 供 者:
- feinia*******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
LCD1602相关资料
//M16_8MHZ_20090304
/************************宏定义******************************/
#ifndef __LCD1602_H
#define __LCD1602_H
#include <iom16v.h>
#include <macros.h>
#define uint unsigned int
#define uchar unsigned char
#define LCD1602_EN_PORT PORTA
#define LCD1602_RW_PORT PORTA
#define LCD1602_RS_PORT PORTA
#define LCD1602_DATA_PORT PORTA
#define LCD1602_EN (1 << PA0)
#define LCD1602_RW (1 << PA1)
#define LCD1602_RS (1 << PA2)
#define LCD1602_DATA 0xf0
//DATA必须为连续的端口高四位
#define LCD1602_EN_DDR DDRA
#define LCD1602_RW_DDR DDRA
#define LCD1602_RS_DDR DDRA
#define LCD1602_DATA_DDR a DDRA
#define LCD1602_DATA_PIN PINA
// uchar c1[8] = {0x08,0x0f,0x12,0x0f,0x0a,0x1f,0x02,0x02}, //年
// c2[8] = {0x0f,0x09,0x0f,0x09,0x0f,0x09,0x0b,0x11}, //月
// c3[8] = {0x0f,0x09,0x09,0x09,0x0f,0x09,0x09,0x0f} //日
-LCD1602 relevant information// M16_8MHZ_20090304 /************************ macro definition****************************** /# ifndef __ LCD1602_H# define __ LCD1602_H# include <iom16v.h># Include <macros.h># Define uint unsigned int# define uchar unsigned char# define LCD1602_EN_PORT PORTA# define LCD1602_RW_PORT PORTA# define LCD1602_RS_PORT PORTA# define LCD1602_DATA_PORT PORTA# define LCD1602_EN (1 < < PA0)# define LCD1602_RW (1 < < PA1)# define LCD1602_RS (1 < < PA2)# define LCD1602_DATA 0xf0// DATA must be contiguous ports high four# define LCD1602_EN_DDR DDRA# define LCD1602_RW_DDR DDRA# define LCD1602_RS_DDR DDRA# define LCD1602_DATA_DDR a DDRA# define LCD1602_DATA_PIN PINA// uchar c1 [8] = {0x08, 0x0f, 0x12, 0x0f, 0x0a, 0x1f, 0x02, 0x02},// Year// c2 [8] = {0x0f, 0x09, 0x0f, 0x09, 0x0f, 0x09, 0x0b, 0x11},// month// c3 [ 8] = {0x0f, 0x09, 0x09, 0x09, 0x0f, 0x09, 0x09, 0x0f} // Day
//M16_8MHZ_20090304
/************************宏定义******************************/
#ifndef __LCD1602_H
#define __LCD1602_H
#include <iom16v.h>
#include <macros.h>
#define uint unsigned int
#define uchar unsigned char
#define LCD1602_EN_PORT PORTA
#define LCD1602_RW_PORT PORTA
#define LCD1602_RS_PORT PORTA
#define LCD1602_DATA_PORT PORTA
#define LCD1602_EN (1 << PA0)
#define LCD1602_RW (1 << PA1)
#define LCD1602_RS (1 << PA2)
#define LCD1602_DATA 0xf0
//DATA必须为连续的端口高四位
#define LCD1602_EN_DDR DDRA
#define LCD1602_RW_DDR DDRA
#define LCD1602_RS_DDR DDRA
#define LCD1602_DATA_DDR a DDRA
#define LCD1602_DATA_PIN PINA
// uchar c1[8] = {0x08,0x0f,0x12,0x0f,0x0a,0x1f,0x02,0x02}, //年
// c2[8] = {0x0f,0x09,0x0f,0x09,0x0f,0x09,0x0b,0x11}, //月
// c3[8] = {0x0f,0x09,0x09,0x09,0x0f,0x09,0x09,0x0f} //日
-LCD1602 relevant information// M16_8MHZ_20090304 /************************ macro definition****************************** /# ifndef __ LCD1602_H# define __ LCD1602_H# include <iom16v.h># Include <macros.h># Define uint unsigned int# define uchar unsigned char# define LCD1602_EN_PORT PORTA# define LCD1602_RW_PORT PORTA# define LCD1602_RS_PORT PORTA# define LCD1602_DATA_PORT PORTA# define LCD1602_EN (1 < < PA0)# define LCD1602_RW (1 < < PA1)# define LCD1602_RS (1 < < PA2)# define LCD1602_DATA 0xf0// DATA must be contiguous ports high four# define LCD1602_EN_DDR DDRA# define LCD1602_RW_DDR DDRA# define LCD1602_RS_DDR DDRA# define LCD1602_DATA_DDR a DDRA# define LCD1602_DATA_PIN PINA// uchar c1 [8] = {0x08, 0x0f, 0x12, 0x0f, 0x0a, 0x1f, 0x02, 0x02},// Year// c2 [8] = {0x0f, 0x09, 0x0f, 0x09, 0x0f, 0x09, 0x0b, 0x11},// month// c3 [ 8] = {0x0f, 0x09, 0x09, 0x09, 0x0f, 0x09, 0x09, 0x0f} // Day
(系统自动生成,下载前可以参看下载内容)
下载文件列表
【OK】LCD1602\1602.h
.............\1602LCD的基本参数及引脚功能.doc
.............\1602字码表.gif
.............\M16_1602BLCD.c
.............\M16_1602BLCD接线图.pdf
.............\字符型液晶使用手册.doc
.............\注意.txt
【OK】LCD1602