-
Notifications
You must be signed in to change notification settings - Fork 0
/
LCD.h
27 lines (21 loc) · 803 Bytes
/
LCD.h
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
#ifndef _LCD_H
#define _LCD_H
#include <xc.h>
#include <stdio.h>
#define _XTAL_FREQ 64000000 //note intrinsic _delay function is 62.5ns at 64,000,000Hz
//Define Pins Used with the LCD Screen
#define LCD_RS LATCbits.LATC6
#define LCD_E LATCbits.LATC2
#define LCD_DB4 LATBbits.LATB3
#define LCD_DB5 LATBbits.LATB2
#define LCD_DB6 LATEbits.LATE3
#define LCD_DB7 LATEbits.LATE1
void LCD_E_TOG(void);
void LCD_sendnibble(unsigned char number);
void LCD_sendbyte(unsigned char Byte, char type);
void LCD_Init(void);
void LCD_setline (char line);
void LCD_sendstring(char *string);
void LCD_clear(void);
void LCD_Disp(char buf[16], volatile int year, volatile int month, volatile int day, volatile int hour, volatile int min, volatile int sec, volatile int weekday);
#endif