2026-04-13 12:40:12 +02:00
|
|
|
#include <avr/io.h>
|
|
|
|
|
|
|
|
|
|
#define LED_PORT PORTB0
|
|
|
|
|
|
|
|
|
|
int main(void) {
|
2026-04-14 09:56:31 +02:00
|
|
|
// set pin to output
|
|
|
|
|
// DDRB is the register that set the direction of the pins (IN/OUT)
|
|
|
|
|
// we want to say that the LED_PORT pin is an OUT pin, which isnt the default
|
|
|
|
|
DDRB |= (_BV(LED_PORT));
|
2026-04-13 12:40:12 +02:00
|
|
|
|
2026-04-14 09:56:31 +02:00
|
|
|
// say to pull high the pins
|
|
|
|
|
// since the pin is set to output, this works !
|
|
|
|
|
PORTB |= (_BV(LED_PORT));
|
|
|
|
|
while (1)
|
|
|
|
|
;
|
2026-04-13 12:40:12 +02:00
|
|
|
}
|