computer eng.
Junior Member level 2
Hello everyone ..
I'm try to test my IC with a simple program ..
But when I build this program in AVR studio 4 it gives me an error in the instruction : OUT sph,r16
Can anyone tell me what's the problem, or giva another simple program
/// The program
.include "tn2313def.inc"
.org 0x0000
rjmp main
main:
ldi r16, low(RAMEND)
out SPL, r16
ldi r16, high(RAMEND)
/// Error here :
out SPH, r16
ldi r16, 0xFF
out DDRB, r16
loop:
sbi PortB, 3
rcall delay_05
cbi PortB, 3
rcall delay_05
rjmp loop
delay_05:
ldi r16, 8
outer_loop:
ldi r24, low(3037)
ldi r25, high(3037)
delay_loop:
adiw r24, 1
brne delay_loop
dec r16
brne outer_loop
ret
..
I need your helping guys ..
..
I'm try to test my IC with a simple program ..
But when I build this program in AVR studio 4 it gives me an error in the instruction : OUT sph,r16
Can anyone tell me what's the problem, or giva another simple program
/// The program
.include "tn2313def.inc"
.org 0x0000
rjmp main
main:
ldi r16, low(RAMEND)
out SPL, r16
ldi r16, high(RAMEND)
/// Error here :
out SPH, r16
ldi r16, 0xFF
out DDRB, r16
loop:
sbi PortB, 3
rcall delay_05
cbi PortB, 3
rcall delay_05
rjmp loop
delay_05:
ldi r16, 8
outer_loop:
ldi r24, low(3037)
ldi r25, high(3037)
delay_loop:
adiw r24, 1
brne delay_loop
dec r16
brne outer_loop
ret
..
I need your helping guys ..
..