
Saji Jacob George said:
Hi all 
hope this routines will be helpful for the beginners.

/* this routine will print the hex nos in lcd directly*/
void hex2lcd(unsigned char hexdata)
{
  unsigned char MSB,LSB;       
  MSB=((hexdata&0xf0)>>4);
  LSB=(hexdata&0x0f);
  if(MSB=10)
    {
      h=hexnum-10;
      u++;
      hexnum=h;
    }
   v=hexnum;
   lcd_data(t+48);
   lcd_data(46);
   lcd_data(u+48);
   lcd_data(v+48);
 }

/*  Routine for LCD display */

void lcd_data(unsigned char dat)
   { 
     LCD_RS=1;        
     LCD_RW=0;
     LCD_PORT=(dat);
     LCD_EN=1; 
     for(a=0;a<0xf;a++); 
     LCD_EN=0; 
     } 
