📄 lcd.h
字号:
//LCD.H
// Data: PORTA
// Control: PORTC
// RS = PORTC, bit 0, 0x01
// RW = PORTC, bit 1, 0x02
// E = PORTC, bit 2, 0x04
#include "config.h"
//Select PORT as Control port
#define CtrlPort PORTC
//Control port DDR
#define CtrlDDR DDRC
//Select PORT as Data port
#define DataPort PORTA
//Data port DDR
#define DataDDR DDRA
// Define LCD Register Select as PORTC, 0x01;
#define LCD_RS 0
// Define LCD Read/Write as PORTC, 0x02;
#define LCD_RW 1
// Define LCD Enable as PORTC, 0x04;
#define LCD_E 2
// TURN ON POWER TO THE DISPLAY, NO CURSOR, NO BLINK
#define PWR_CMD 0x0C
// SET TWO LINE, 8 DATA BIT MODE
#define DL_CMD 0x38
// CLEAR DISPLAY COMMAND
#define CLR_DSP 0x01
//Define the address of line
#define LINE1 0x80
#define LINE2 0xC0
//#define NULL 0x00
void LCD_Delay (unsigned long int d);
void LCD_IO_INIT (void);
void LCD_INIT (void);
void LCD_PutCmd (char);
void LCD_PutChar (char);
void LCD_PutString (char *);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -