Hi
It’s been a few years since I’ve worked with AVR chips (pre tiny era and mega era) so I’m catching up. I have a Pololu Orangutan USB isp that I’m using for the first time. It’s an old project and I’m having a problem getting the new programmer working.
I’m aware that you recommend you purchase your new programmer. If this is an easy fix, it would get me stated so I can get this project back up and running. Any help would be greatly appreciated.
The target is a 90s2313. Using AVR Studio 4.18.
-
AVR Studio has no problem recognizing the isp
-
no problem erasing the device (verified using a programmed chip)
-
no problem reading the signature
-
but I get an error message when programming and chip is not programed
Here’s the whole log:
Getting isp parameter… SD=0x02 … OKOK
Reading FLASH input file… OK
Entering programming mode… OK!
Erasing device… OK!
Programming FLASH … OK!
Reading FLASH … OK!
WARNING: FLASH byte address 0x0000 is 0xFF (should be 0x0C)… FAILED!
Leaving programming mode… OK!
Here’s the program:
;====================================================================
.include “2313def.inc”
.CSEG
.ORG 0x00
rjmp RESET ; Power-on Reset
rjmp reset ; IRQ0
rjmp reset ; IRQ1
rjmp RESET ; Timer1 Capture
rjmp RESET ; Timer1 Compare A
rjmp reset ; Timer1 Overflow
rjmp reset ; Timer0 Overflow
rjmp RESET ; SPI Transfer Complete
rjmp RESET ; UART RX Complete
rjmp RESET ; UDR Empty
rjmp RESET ; UART TX Complete
rjmp RESET ; Analog Comparator
;
;========================================
.ORG 0x0d
;
RESET:
;========================================
; Initialize the Stack Pointer
; these constants are defined in 2313def
;
ldi Temp1, RAMEND ; last on-chip ram location
out SPL, Temp1 ; init Stack Pointer
ldi Temp1, 0b11111111 ; set PortD to Output
out DDRD, Temp1 ;
ldi Temp1, 0b11111111 ; turn on all outputs
out PortD, Temp1
test:
rjmp test