C 25
Shifting very cool By Hightechrobo on 13th February 2025 11:51:59 AM
  1. #include <mega32.h>
  2. #include <delay.h>
  3.  
  4.  char a,b,c,d;
  5.  
  6.     void main(void)
  7.     {
  8.         int t1 = 0;
  9.        
  10.         DDRA = 0xFF ;
  11.        
  12.     while (1)
  13.           {
  14.  
  15.                    
  16.          PORTA = a;
  17.          a= a  | (( a >>= 1) + ( a <<= 1) );
  18.          if(a==0b11111111)
  19.             a = 0b10000001;
  20.          delay_ms(200);
  21.                    
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.     }   }

Hightechrobo bin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.