Avr Assembler Download Hot! -

RESET: ; Set PB5 as output sbi DDRB, 5

avrasm2 -fI blink.asm If you get no errors and see a blink.hex file – Uploading Your First Assembled Program You need a programmer. The cheapest is an Arduino Uno running "Arduino as ISP" sketch. Then use avrdude : avr assembler download

DELAY: ; Delay loop (approximate) ldi r17, 0xFF L1: ldi r18, 0xFF L2: dec r18 brne L2 dec r17 brne L1 dec r16 brne DELAY ret RESET: ; Set PB5 as output sbi DDRB, 5 avrasm2 -fI blink

LOOP: ; Turn LED on sbi PORTB, 5 ldi r16, 0xFF call DELAY ; Turn LED off cbi PORTB, 5 ldi r16, 0xFF call DELAY rjmp LOOP Set PB5 as output sbi DDRB

avr-gcc -mmcu=atmega328p -c blink.asm -o blink.o avr-gcc -mmcu=atmega328p blink.o -o blink.elf avr-objcopy -O ihex blink.elf blink.hex Or using original AVRASM32: