VEndymionV

Pong bez przerwań i opóźnień, na pętlach

May 5th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. // Pong bez przerwań i opóźnień, na pętlach
  2. #include <8051.h>
  3.  
  4. #define LEDS P1 // port do diod
  5.  
  6. int main(void){
  7.     LEDS = 1;
  8.     int i;
  9.  
  10.     while(1){
  11.         for(i = 0; i < 7; i++)
  12.                 LEDS = LEDS << 1;
  13.         for(i = 0; i < 7; i++)
  14.                 LEDS = LEDS >> 1;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment