|
|
View previous topic :: View next topic |
Author |
Message |
Kada
Joined: 22 Nov 2004 Posts: 4
|
Blank area in RAM (PIC18F6720) |
Posted: Mon Mar 07, 2005 2:49 am |
|
|
hi,
Could anybody tell me why there are some blank areas (in different sizes!!!) in the RAM.
I use development kit from CCS. _________________ Best Regards Kada |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Mon Mar 07, 2005 3:03 am |
|
|
Why do you want to know where in memory these blank areas are?
Just declare a global variable of the size you require and the compiler will figure out a free location in memory. This is much better because you say 'what' you want and have the compiler work out the 'how'. |
|
|
Ttelmah Guest
|
|
Posted: Mon Mar 07, 2005 5:22 am |
|
|
As Ckielstra says, 'why worry'. However the actual RAM, is only implemented in banks 0..7, with bank 15, containing the special function registers, and the bottom half unused. Bank 0, also has the upper section available via the Access Bank, and so this area may need to be reserved.
Looking at device editor for this chip, the bottom few addresses of bank0 are shown as reserved, but otherwise all the memory that is present, is shown.
Remember the compiler will not 'pack' registers tightly into the memory starting at the bottom. If (for instance), you declare a 100 character array, and a 200 character array, these will be put in seperate banks, and the spaces will only be used if you then declare smaller variables that can fit into these locations.
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|