-
Notifications
You must be signed in to change notification settings - Fork 0
/
LCD_I2C.H
44 lines (37 loc) · 1.05 KB
/
LCD_I2C.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* LCD_I2C.H
*
* Author: Sanjeeve R
*
*
* Description:
* This project is developed specifically to interface MSP430G2553 Controller/Launchpad with 16x2 LCD using I2C protocol.
* This project is tested to work on Texas Instruments Code Composer Studio Version: 10.3.1.00003
* Connection:
* ***********************************
* * LCD | PIN ON CONTROLLER/BOARD *
* ***********************************
* * VCC | 5V *
* * GND | GND *
* * SDA | P1.7 *
* * SCL | P1.6 *
* ***********************************
*
*
* */
#ifndef _LCD_I2C_H
#define _LCD_I2C_H
#include<inttypes.h>
#include<msp430g2553.h>
#define CMD 0
#define DATA 1
#define RS 0x01
#define RW 0x02
#define EN 0x04
#define BL 0x08
void delay(uint16_t t);
void lcd_init(uint8_t);
void lcd_write(uint8_t,uint8_t);
void lcd_print(char*);
void lcd_setcursor(uint8_t,uint8_t);
void set_backlight();
#endif