-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLCD.h
More file actions
40 lines (30 loc) · 966 Bytes
/
LCD.h
File metadata and controls
40 lines (30 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* File: LCD.h
*
* Created on April 27, 2018, 11:43 AM
*/
#ifndef LCD_H
#define LCD_H
// LCD module connections
#define LCD_RS LATB2; // RS pin for LCD
#define LCD_E LATB5; // Enable pin for LCD
#define LCD_Data_Bus_D4 LATD4;
#define LCD_Data_Bus_D5 LATD5;
#define LCD_Data_Bus_D6 LATD6;
#define LCD_Data_Bus_D7 LATD7;
#define LCD_RS_Dir TRISB2_bit;
#define LCD_E_Dir TRISB5_bit;
#define LCD_Data_Bus_Dir_D4 TRISD4; // Data bus bit 4
#define LCD_Data_Bus_Dir_D5 TRISD5; // Data bus bit 5
#define LCD_Data_Bus_Dir_D6 TRISD6; // Data bus bit 6
#define LCD_Data_Bus_Dir_D7 TRISD7; // Data bus bit 7
// End LCD module connections
// Constants
#define E_Delay 1000
// Function Declarations
void WriteCommandToLCD(unsigned char);
void WriteDataToLCD(char);
void InitLCD(void);
void WriteStringToLCD(const char*);
void ClearLCDScreen(void);
#endif /* LCD_H */