Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define F_CPU 8000000
- #include <avr/io.h>
- #include <util/delay.h>
- int main(void)
- {
- unsigned char i;
- DDRD = 0xFF; // установка всего порта D как выход
- PORTD =0x00; // Установка низкого логического уровня
- /*
- *
- */
- while (1)
- {
- for(int i=0;i<=7;i++)
- {
- PORTD |= (1<<i);
- _delay_ms(50);
- }
- PORTD =0x00;
- _delay_ms(50);
- }
- }
Add Comment
Please, Sign In to add comment