Programming Arduino using MKII ISP
2023-07-12
I got MKII ISP from here. To program Arduino Nano via Microchip studio, nothing special, remember have to select the chip. And Nano D8 pin is B0. Nano bootloader can be found in here.
#ifndef F_CPU
#define F_CPU 16000000UL
#endif
#include <avr/io.h>
#include <util/delay.h>
int main()
{
DDRB |= (1<<PB0);
while (1){
PORTB |= (1<<PB0);
_delay_ms(200);
PORTB &= ~(1<<PB0);
_delay_ms(200);
}
return 0;
}