Reply by Javier Chavez January 22, 20112011-01-22
Hi all again...
Yes! It seems it works.. Thank you very much.. my mistake..

BR,

Javier

cli
clr ZH
ldi ZL,EICRA
ld r16,Z
ori r16,0x0f
st Z,r16

On Sat, Jan 22, 2011 at 6:43 AM, Steven Holder
wrote:

> On 21/01/2011 19:44, Javier Chavez wrote:
> >
> > Hi,
> >
> > I made a small piece of assembler code long ago for the at90s2313.. and
> > compiled without any problems in Avrstudio.
> >
> > This time I made some changes for atmega48. I included the file
> > m48def.inc,
> > changed the code and also changed platform and device in avrstudio
> however
> > I get "error: Operand 2 out of range: 0x69"
> >
> > ;
> > cli
> > in r16,EICRA; ;;;$3f no problem EICRA=$69... External interruptions
> > --> operand 2
> > ori r16,0x0f
> > out EICRA,r16 ; -> and operand 1
> >
> > In m48def.inc is clearly written ".equ RAMEND = 0x2ff", Is there any
> other
> > place I have to point out that this it has to compile for atmega48
> device?
> > or Am I missing something?
> >
> > Best regards and thanks in advance,
> >
> > Javier
> >
> >
> >
> >
> Javier
>
> You cannot use the direct IO method of addressing on this register, you
> need to use other instructructions for this IO register space.
>
> I you look at section 7.5 p20 on the data sheet, this will give more
> information.
>
> Regards
>
>
>
>
>


Reply by Steven Holder January 22, 20112011-01-22
On 21/01/2011 19:44, Javier Chavez wrote:
>
> Hi,
>
> I made a small piece of assembler code long ago for the at90s2313.. and
> compiled without any problems in Avrstudio.
>
> This time I made some changes for atmega48. I included the file
> m48def.inc,
> changed the code and also changed platform and device in avrstudio however
> I get "error: Operand 2 out of range: 0x69"
>
> ;
> cli
> in r16,EICRA; ;;;$3f no problem EICRA=$69... External interruptions
> --> operand 2
> ori r16,0x0f
> out EICRA,r16 ; -> and operand 1
>
> In m48def.inc is clearly written ".equ RAMEND = 0x2ff", Is there any other
> place I have to point out that this it has to compile for atmega48 device?
> or Am I missing something?
>
> Best regards and thanks in advance,
>
> Javier
>
>
Javier

You cannot use the direct IO method of addressing on this register, you
need to use other instructructions for this IO register space.

I you look at section 7.5 p20 on the data sheet, this will give more
information.

Regards



Reply by Javier Chavez January 21, 20112011-01-21
Hi,

I made a small piece of assembler code long ago for the at90s2313.. and
compiled without any problems in Avrstudio.

This time I made some changes for atmega48. I included the file m48def.inc,
changed the code and also changed platform and device in avrstudio however
I get "error: Operand 2 out of range: 0x69"

;
cli
in r16,EICRA; ;;;$3f no problem EICRA=$69... External interruptions
--> operand 2
ori r16,0x0f
out EICRA,r16 ; -> and operand 1

In m48def.inc is clearly written ".equ RAMEND = 0x2ff", Is there any other
place I have to point out that this it has to compile for atmega48 device?
or Am I missing something?

Best regards and thanks in advance,

Javier