Guest User

Untitled

a guest
Dec 11th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. void uloha15()
  2. {
  3. char login[] = {0, 0, 7, 1};
  4. int posun;
  5. while(1)
  6. {
  7. for (posun = 0; posun < 5; posun++)
  8. {
  9. for (int i = 0; i < 5; i++)
  10. {
  11. PORTC = BCD(login[0]);
  12. PORTB ^= (1 << 0 + posun);
  13. delay_ms(1);
  14. PORTB ^= (1 << 0 + posun);
  15. delay_ms(1);
  16.  
  17. PORTC = BCD(login[1]);
  18. PORTB ^= (1 << 1 + posun);
  19. delay_01ms(1);
  20. PORTB ^= (1 << 1 + posun);
  21. delay_ms(1);
  22.  
  23. PORTC = BCD(login[2]);
  24. PORTB ^= (1 << 2 + posun);
  25. delay_ms(1);
  26. PORTB ^= (1 << 2);
  27. delay_ms(1);
  28.  
  29. PORTC = BCD(login[3]);
  30. PORTB ^= (1 << 3 + posun);
  31. delay_ms(1);
  32. PORTB ^= (1 << 3 + posun);
  33. delay_ms(1);
  34. }
  35. posun++;
  36. }
  37. }
  38.  
  39. }
Add Comment
Please, Sign In to add comment