Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define F_CPU 8000000UL
- #include <avr/io.h>
- #include <util/delay.h>
- #define LED1 5
- int main(void)
- {
- DDRD = 0b01100000;
- while(1)
- {
- PORTD |= (1<<PIN5);
- _delay_ms(1000);
- PORTD &= ~(1<<PIN5);
- _delay_ms(1000);
- }
- }
- //&= //binary and
- //|= //binary or -- einfach | wäre oder durch |= aktueller inhalt (wie x = x + 1)
- //^ //exclusive or --> ^= bit toggeln
- //>> //rotate right
- //<< //rotate left
- //~ //invert bits
- //einzelnes bit setzen --> oder (Maske mit 1 << nach links schieben)
- //einzelnes bit löschen --> und (Maske mit 1 << nach links schieben)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement