333
data_value |= temp;
PCF8574_write(data_value);
data_value |= 0x04;
PCF8574_write(data_value);
delay_ms(dly);
data_value &= 0xF9;
PCF8574_write(data_value);
delay_ms(dly);
}
void LCD_putstr(char *lcd_string)
{
while(*lcd_string != '\0')
{
LCD_send((*lcd_string++), DAT);
};
}
void LCD_putchar(char char_data)
{
LCD_send(char_data, DAT);
}
void LCD_clear_home(void)
{
LCD_send(clear_display, CMD);
LCD_send(goto_home, CMD);
}
void LCD_goto(unsigned char x_pos,unsigned char y_pos)
{
if(y_pos == 0)
{
LCD_send((0x80 | x_pos), CMD);
}
else
{
LCD_send((0x80 | 0x40 | x_pos), CMD);
}
}
main.c
#include <msp430.h>
#include "delay.h"
#include "I2C.h"
#include "PCF8574.h"
#include "lcd.h"
void GPIO_graceInit(void);
void BCSplus_graceInit(void);
void USI_graceInit(void);