Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Problem During ISP Programming

2008-03-06 by Rakesh Modi

I am using stk500 kit from atmel and avr studio for wrting a code.
In my code when i am calling subroutine more than 1 time then i can 
not download a program. It gives me an error of clock frequency. I am 
sending my code below. please help me. 

include "m16def.inc"
LDI R16, 0X5F
OUT SPL, R16
LDI R16, 0X08
OUT SPH, R16
HERE:
LDI R17, 0XFF
OUT DDRA, R17
LDI R17, 0XFF
OUT PORTA,R17
nop
CALL DELAY
CALL DELAY
LDI R17, 0XFF
OUT DDRA, R17
LDI R17, 0XFE
OUT PORTA,R17
NOP
CALL DELAY
CALL DELAY
CALL DELAY
NOP
RJMP HERE
DELAY:
LDI R19, 0Xff
w:ldi R18, 0Xff
XY:DEC R18
CPI R18, 0X00
BRNE XY
DEC R19
CPI R19, 0X00
BRNE W
RET

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.