avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Using external RAM


From: David Breeze
Subject: Re: [avr-gcc-list] Using external RAM
Date: Tue, 22 Mar 2005 14:12:59 +0000

Hi,

The external RAM on the ATmega128 starts immediately above the internal RAM 
address space.  To understand how to use any external RAM you really need to 
read and understand the datasheet, particularly if you wish to access all of 
the external RAM.  Data sheets for the Atmel devices can be downloaded from 
www.atmel.com

I take it your image is small as the amount of RAM which can be attached is 
relatively small for image capture (64K) unless of course you are going to page 
your RAM and that becomes rather more complicated both in hardware and software.

In your case I recommend using the target system to test your software i.e. RAM 
attached as there are a number of subtleties you may miss even if you were able 
to simulate the external RAM

David

>>> "Shubham Jain" <address@hidden> 22 March 2005 11:52:34 >>>
Hello,
I came to know from the FAQ that bit SRE (SRAM enable) in the MCUCR
register needs to be set for using external RAM. To do this, I took the
following code from "How to modify MCUCR or WDTCR early?":
;; begin xram.S
#include <avr/io.h>
.section .init1,"ax",@progbits
ldi r16,_BV(SRE) | _BV(SRW)
out _SFR_IO_ADDR(MCUCR),r16
;; end xram.S

I linked xram.S with other files in my program.

For defining the dynamic memory, I used the following:
avr-gcc ... -Wl,--defsym=__heap_start=0x802000,--defsym=__heap_end=0x803fff

But, I could not understand where is the external RAM specified? Actually,
my requirement is to use external RAM for storing an image which I want to
take as pointer arrays in my program. How should I do this?

Is it necessary to physically connect the external RAM and then do the
testing OR can it be done in software using avr-gcc options?

Yours sincerely,
Shubham Jain



_______________________________________________
AVR-GCC-list mailing list
address@hidden 
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed.  If 
an addressing or transmission error has misdirected
this e-mail, please notify the author by replying to this e-mail.  If you are 
not the intended recipient you must not use, disclose, copy, print or rely on 
this e-mail.

Joy Mining Machinery Limited/P&H Minepro Services aims to prevent the 
propagation of viruses, but cannot guarantee that this email is virus free.  
You are advised to scan all attachments and open them at your own risk.

Joy Mining Machinery Limited/P&H Minepro Services may monitor outgoing and 
incoming e-mails and other telecommunications on its e-mail and 
telecommunication systems.
<<Privacy - UK>>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]