Advertisement
jh_elec

Untitled

Jun 17th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. void scrollMessage( char *msg )
  2. {
  3.     uint8_t z1 = 0 , z2 = 0;
  4.     uint8_t first = 0, second = 0;
  5.    
  6.     first = GetCharacterIndex( *msg );
  7.     second = GetCharacterIndex( *msg++ );
  8.        
  9.     while(1)
  10.     {
  11.         for( uint8_t j = 0 ; j < 8 ; j++ )
  12.         {
  13.             for( uint8_t i = 0 ; i < 8 ; i++ )
  14.             {
  15.                 z1 = ~pgm_read_byte(&charMap[ 8  ][i]);
  16.                 z2 = ~pgm_read_byte(&charMap[ 9  ][i]);
  17.                 VRAM[i] = (z1 << j) | (z2 >> (8-j));
  18.             }
  19.             _delay_ms(1000);
  20.         }          
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement