7 segment go brr

This commit is contained in:
Lea 2023-08-26 17:31:29 +02:00
parent 21d1da0f03
commit 600de71fd8
Signed by: Lea
GPG key ID: 1BAFFE8347019C42

20
main.c
View file

@ -5,12 +5,22 @@
#include <util/delay.h> #include <util/delay.h>
void main() { void main() {
DDRB = 0b10000000; // DDRB = 0b10000000;
//
// while(1) {
// PORTB = 0b10000000;
// _delay_ms(500);
// PORTB = 0b00000000;
// _delay_ms(500);
// }
DDRF = 0b11111111;
PORTF = 0b11111111;
uint8_t a = 0;
while(1) { while(1) {
PORTB = 0b10000000; PORTF = a++;
_delay_ms(500); _delay_ms(10);
PORTB = 0b00000000;
_delay_ms(500);
} }
} }