; ; efe.blink.asm ; (c) Neil Gershenfeld CBA MIT 10/16/04 ; blink the LED ; .include "tn15def.inc" .equ ledpin = PB4; LED pin .def temp = R17; temporary storage .def temp1 = R18; temporary storage .cseg .org 0 rjmp reset ; ; delay ; .equ count = 255 delay: ldi temp1, count delay_loop1: ldi temp, count delay_loop: dec temp brne delay_loop dec temp1 brne delay_loop1 ret ; ; main program ; reset: ldi temp, 0xff ; maximum RC clock out OSCCAL, temp sbi PORTB, ledpin; init LED pin sbi DDRB, ledpin loop: sbi PORTB, ledpin rcall delay cbi PORTB, ledpin rcall delay rjmp loop