2023-08-25 07:33:25 +00:00
|
|
|
#define __AVR_ATmega2560__
|
|
|
|
#define F_CPU 16000000UL
|
|
|
|
|
|
|
|
#include <avr/io.h>
|
|
|
|
#include <util/delay.h>
|
|
|
|
|
|
|
|
void main() {
|
2023-08-26 15:31:29 +00:00
|
|
|
// DDRB = 0b10000000;
|
|
|
|
//
|
|
|
|
// while(1) {
|
|
|
|
// PORTB = 0b10000000;
|
|
|
|
// _delay_ms(500);
|
|
|
|
// PORTB = 0b00000000;
|
|
|
|
// _delay_ms(500);
|
|
|
|
// }
|
|
|
|
|
|
|
|
DDRF = 0b11111111;
|
|
|
|
PORTF = 0b11111111;
|
|
|
|
|
|
|
|
uint8_t a = 0;
|
2023-08-25 07:33:25 +00:00
|
|
|
|
|
|
|
while(1) {
|
2023-08-26 15:31:29 +00:00
|
|
|
PORTF = a++;
|
|
|
|
_delay_ms(10);
|
2023-08-25 07:33:25 +00:00
|
|
|
}
|
|
|
|
}
|