Yahoo Groups archive

AVR-Chat

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

Message

Re: [AVR-Chat] Problem During ISP Programming

2008-03-06 by Roy E. Burrage

It might be easier for you to trace your program flow if you would 
comment your code, even for a small program like this one.  You'll 
likely also see your problem.


REB


Rakesh Modi wrote:
> 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.