Flashing with mySmartUSB MK2 to ATmega328P-PU target

Oh great you tested this faster than I could type :sweat_smile:. Great that it works fully now! :slight_smile:

1 Like

I’m using non framework code like this here:

#include <avr/io.h>
#include <util/delay.h>

int main(void)
{
    // make the LED pin an output for PORTB5
    DDRB = 1 << DDB5;       // DDB5 = 5

    while (1)
    {
        _delay_ms(200);

        // toggle the LED
        PORTB ^= 1 << PB5;  // PB5 = 5
    }

    return 0;
}

1 Like