276
void LCD_goto(unsigned char x_pos,unsigned char y_pos)
{
if(y_pos == 0)
{
LCD_command(0x80 | x_pos);
}
else
{
LCD_command(0x80 | 0x40 | x_pos);
}
}
main.c
#include <msp430.h>
#include "delay.h"
#include "lcd.h"
void BCSplus_graceInit(void);
void GPIO_graceInit(void);
void System_graceInit(void);
/*
* main.c
*/
void main(void)
{
unsigned char s = 0x00;
const char txt1[] = {"MICROARENA"};
const char txt2[] = {"SShahryiar"};
const char txt3[] = {"MSP-EXP430G2"};
const char txt4[] = {"Launchpad!"};
BCSplus_graceInit();
GPIO_graceInit();
System_graceInit();
LCD_init();
LCD_clear_home();
LCD_goto(3, 0);
LCD_putstr(txt1);
LCD_goto(3, 1);
LCD_putstr(txt2);
delay_ms(2600);
LCD_clear_home();
for(s = 0; s < 12; s++)
{
LCD_goto((2 + s), 0);
LCD_putchar(txt3[s]);
delay_ms(60);
}