enable_interrupts(INT_TIMER1); // Turn on interrupt timer1
enable_interrupts(GLOBAL); // Enabled all interruptions.
output_high(BK_LIGHT);
lcd_init(); // Initialize lcd
delay_ms(10);
lcd_gotoxy( 1, 1); // go to the start position of the first line
lcd_putc (" Welcome ! "); // display string in the first line
delay_ms(1);
lcd_gotoxy( 1, 2); // go to the start position of the second line
lcd_putc (" Microchip MCU "); // display string in the second line
//display temprature value on the LCD
//////////////////////////////////////////////////////////////////////////////////////
void display()
{
delay_ms(10);
lcd_gotoxy( 1, 1); // go to the start position of the first line
lcd_putc ("\fTemperature: \n"); // \f--clear display,\n--go to start position of second line
delay_ms(1);
lcd_putc (" Cdgree ");
delay_ms(1);
lcd_gotoxy( 1, 2); // go to the start position of the second line
lcd_putf (ad_result,4); // display the temperature value, 4 digital