Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. void lcd_string( const char *data )
  2. {
  3.     int anz =0;
  4.     int row =1;
  5.     while( *data != '\0' )
  6.     {
  7.         if(anz > 16)
  8.         {
  9.             row++;
  10.             anz =0;
  11.         }
  12.  
  13.         if(row > 4)
  14.             row = 0;
  15.  
  16.         if(row == 1)
  17.             lcd_setcursor(anz,1);
  18.         else if(row == 2)
  19.             lcd_setcursor(anz,2);
  20.         else if(row == 3)
  21.             lcd_setcursor(anz,3);
  22.         else if(row == 4)
  23.             lcd_setcursor(anz,4);
  24.            
  25.    
  26.         lcd_data( *data++ );
  27.         anz++;
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement