- 17
- 0
- 约1.3万字
- 发布于河南
- 举报
- 文档已下架,其它文档更精彩
/*
KS0108 128*64 LCD C语言驱动
LCD引脚定义
1GND
2VCC
3VLCD
4D/I
5R/W
6E
7到14 D0-D7
15--CS1
16--CS2
17--RESET
18--VEE
19--SW
20--NC
*/
#include iom16v.h
#include macros.h
unsigned char CurOffset,CurRow,CurPage,CurCol;
/* 常量定义 */
#define LCD_STATUS_BUSY 0x80
#define START_LINE0 0xc0
#define DISPLAY_ON 0x3f
#define DISPLAY_OFF 0x3e
#define PARA1 0x40
//PORTA数据口 PORTB控制口
volatile unsigned char *LCD_DIR_PORT = DDRA;
volatile unsigned char *LCD_IP_PORT = PINA;
volatile unsigned char *LCD_OP_PORT = PORTA;
volatile unsigned char *LCD_EN_PORT = PORTB;
volatile unsigned char *LCD_CS2
原创力文档

文档评论(0)