Hi all,
the problem is solved!
There was no bug in my asm-code, but the fuse-bits were
not set correctly, arghhh!
Atmel provides some nice little traps with these numerous
fuse bits ...
BR,
Patrick
P.S. Watch your Fuse-Bits carefully, when using the new
ATMega devices ;-o
--- In avrclub@avrc..., "Patrick Urban" <moba@m...> wrote:
> Hi all,
>
> my question is related to the use of an external RAM (32kx8)
> controlled by an ATMega162.
>
> Current situation:
> My old application with an at90s8515 works fine with an external
> RAM. Now I switched to the new 162er. I shifted all cseg commands
> as well as the SRAM locations and the stack-pointer in my existing
> code. Everything works fine so far, but if I like to address
> the external RAM I only get back strange data.
>
> Background-info: I adjusted the address-space for my data
> in that way, that some of the data are in the internal
> RAM (0x0300 to 0x04FF) and the rest is in the external RAM (0x0500
> to ...)
>
> The data I get back from the RAM when addressing e.g. 0x0511 is
> 0x11, 0x0512 is 0x12. So it looks like that I read the
> applied address instead of the RAM contents.
>
> The external RAM is selected (MCUCR, upper bit set). No splitting
> is selected (000), the RAM is a fast (15ns) cache RAM. 161er
> compatibility mode is off.
>
> What I am confused about is the description in the ATMEL datasheet:
>
> On the one hand is says that the ext-RAM space starts at 0x500,
> but the splitting describes a lower and upper address starting
> at 0x1100.
>
> Any help would be really appreciated,
> thanks in advance,
>
> Patrick
> --
> mailto moba@m...
> http://www.macurb.de