Vous êtes sur la page 1sur 3

#include <msp430g2231.

h>
#define KEY1
#define KEY2
#define KEY3
#define KEY4
void main(void)
{
InitLCD();InitUART();

while(1)
{

if(KEY1==1)
{
ClearLCDScreen();

// Clear LCD screen

GotoYXPositionOnLCD(LCD_LINE1,0);
WriteStringToLCD("PRODUCTION START");
GotoYXPositionOnLCD(LCD_LINE2,0);
WriteStringToLCD("

********");

__delay_ms(3000);

SendString("PRODUCTION STARTS ");

else if(KEY2==1)
{
ClearLCDScreen();

// Clear LCD screen

GotoYXPositionOnLCD(LCD_LINE1,0);
WriteStringToLCD("GOODS DEMAGED");
GotoYXPositionOnLCD(LCD_LINE2,0);
WriteStringToLCD("

********");

__delay_ms(3000);

SendString("GOODS DEMAGED");

}
else if(KEY3==1)
{
ClearLCDScreen();

// Clear LCD screen

GotoYXPositionOnLCD(LCD_LINE1,0);
WriteStringToLCD("

PRODUCTION ");

GotoYXPositionOnLCD(LCD_LINE2,0);
WriteStringToLCD("

COMPLETED");

__delay_ms(3000);

SendString("PRODUCTION COMPLETED");

else if(KEY4==1)
{
ClearLCDScreen();

// Clear LCD screen

GotoYXPositionOnLCD(LCD_LINE1,0);
WriteStringToLCD("GOODS DELIVERY ");
GotoYXPositionOnLCD(LCD_LINE2,0);
WriteStringToLCD("

*****");

SendString("GOODS DELIVERY ");

__delay_ms(3000);

}
else
{}

}
}