You are on page 1of 2

#include <16F73.

h>
//Microcontroller Used
#fuses
HS,NOWDT,PROTECT,brownout,put
#use delay(clock=20M)
// operating Clock freequency
#include "flex_lcd.c"

void main()
{
//int temp;
lcd_init();

output_high(pin_C4);
delay_ms(500);
output_low(pin_C4);
delay_ms(500);
output_high(pin_C4);
delay_ms(500);
output_low(pin_C4);
delay_ms(500);

// Health check

printf(lcd_putc,"\f");
output_high(pin_c7);
while(1)
{
if(!input(pin_a0))
{
lcd_putc('\f');
lcd_gotoxy(1,1);
printf(lcd_putc,"temp is high ");
lcd_gotoxy(1,2);
printf(lcd_putc," please check ");
delay_ms(1000);
}
else if(!input(pin_a1))
{
lcd_putc('\f');
lcd_gotoxy(1,1);
printf(lcd_putc,"voltage is high ");
lcd_gotoxy(1,2);
printf(lcd_putc," please check ");
delay_ms(1000);
}
else if(!input(pin_a2))
{
lcd_putc('\f');
lcd_gotoxy(1,1);

printf(lcd_putc,"current is high ");


lcd_gotoxy(1,2);
printf(lcd_putc," please check ");
delay_ms(1000);
}
else
{
lcd_putc('\f');
lcd_gotoxy(1,1);
printf(lcd_putc,"waiting for data... ");
delay_ms(1000);
}
}
}

You might also like