#include "msp430g2553.h"
#include "lcd.c"
#include "i2c.c"
unsigned char *datarev;
long int i;
void main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
//P1REN = BIT6 + BIT7;
P1DIR = 0xFC;
P2DIR |= 0xff;
lcd_init();
i2c_init(0x68); //Them cai ham nay thi khong hien gi len LCD dc nua???
unsigned char datawr[]={0x00,0x08,0x03,0x05,0x15,0x11,0x12};
i2c_write(0x00,7, datawr);
while(1)
{
lcd_puts ("Hello Word !!");
i2c_read(0x00,8,datarev);
__delay_cycles(1000000);
lcd_clear();
i=datarev[0];
lcd_put_num (i, 0, 0);
__delay_cycles(1000000);
lcd_clear();
}
}