Forum Index
1281e RAM allocation

 
Author Message
pjc30943



Joined: 02 Dec 2005

Posted: 20 August 2007, 22:41 PM    Post subject: 1281e RAM allocation

When ExtRamConfig is On, why isn't the external RAM automatically allocated?

When I set RamSize using Register.RamStart, the correct amounts show up in the .map file; when the RAM is enabled only--but the size is not set--extra bytes are not added.

Just curious what physically happens inside the device when the RAM is enabled, but no size is defined.

By the way, the 1281e is a very cool device. Its power is quite amazing given the ease of use. [Of course, it can't compete with something like a dsPIC in performance, and it's not trying to, but dang, its peripherals are so much faster to use for almost anything not extremely demanding.]
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Location: Portland, OR

Posted: 21 August 2007, 2:14 AM    Post subject: Re: 1281e RAM allocation

pjc30943 wrote:
When ExtRamConfig is On, why isn't the external RAM automatically allocated?
When the ZX-1281e begins running after reset, it scans the RAM space to try to determine how much RAM is available. Once the RAM size is determined, the value of Register.RAMSize is set. You should be able to see this using the following simple program. Try running it with the RAM daughter card installed and not installed.
Code:
Sub Main()
  Debug.Print "RAM Size = "; CStr(Register.RAMSize)
End Sub

pjc30943 wrote:
When I set RamSize using Register.RamStart, the correct amounts show up in the .map file; when the RAM is enabled only--but the size is not set--extra bytes are not added.

Note that 'Option RAMSize' simply tells the compiler how much RAM is available so that it can warn you if you define too many variables. The compiler has no way of knowing if you have the RAM daughter card installed or not - that's why you have to help it out.

pjc30943 wrote:
Just curious what physically happens inside the device when the RAM is enabled, but no size is defined.
Unless you specifically limit the amount of external RAM, the maximum amount is made available. It is not particularly useful on the ZX-1281e to restrict the amount of external RAM. In contrast, on the ZX-1281 you might want to do that in order to use the upper address lines for digital I/O.
Back to top
pjc30943



Joined: 02 Dec 2005

Posted: 21 August 2007, 23:28 PM    Post subject:

Ah, this is clear now...

Thanks Don.
Back to top
Display posts from previous:   
Page 1 of 1

 



ZBasic Microcontrollers Home
All content Copyright © 2005, 2006, 2007, 2008 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group