/*4 bit hien thi chuoi ki tu*/
#include <16f887.h>
#device *=16 ADC=8
#use delay(clock=20000000)
#FUSES HS,nowdt,NOPUT,NOPROTECT,NODEBUG,NOBROWNOUT,NOLVP,NOCPD,NOWRT
#BYTE PORTD=0X08
#include <lcd.c> 
const unsigned char data[]="NGUYEN HUU THUONG, HUYNH THANH THUONG";
int16 i=0;
void main() 
{
  set_tris_a(0x00);
    set_tris_b(0x00);
      set_tris_c(0x00);
      LCD_init();
   while(1)
   {  
      if(i<15)
      LCD_PutCmd (0x80+i);
      else if (i>14)
      LCD_PutCmd(0xc0+(i-14));
      LCD_putc(data[i]);
      delay_ms(50);
      i++;
      if(i==28)
      {
      delay_ms(1000);
      LCD_PutCmd((0x01);
      i=0;
      delay_ms(1000);
   }

 }
}
