Advertisement
RuiViana

Acionando direto

Apr 8th, 2016
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1.  
  2. //-----------------------------
  3. void setup()
  4. {
  5. DDRD = B11111100; // sets Arduino pins 1 to 7 as outputs, pin 1 and 0 as input
  6. }
  7. //-----------------------------
  8. void loop()
  9. {
  10. PORTD = 0x08; // Data
  11. PORTD = 0x04; // Clock HIGH
  12. PORTD = 0x00; // Clock LOW Latch LOW Data LOW
  13.  
  14. PORTD = 0x10; // Latch HIGH
  15. // delayMicroseconds(1);
  16.  
  17. PORTD = 0x00; // Data
  18. PORTD = 0x04; // Clock HIGH
  19. PORTD = 0x00; // Clock LOW Latch LOW Data LOW
  20.  
  21. PORTD = 0x10; // Latch HIGH
  22. // delayMicroseconds(1);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement