Quote:
|
Originally Posted by Fat Alex
does it have something to do with addresses?...
|
Alex,
Look at the code that Brian posted in this thread:
http://www.chiefdelphi.com/forums/sh...ad.php?t=33466
See how the address needed to be split into an 8 bit part and a "high" part?
All memory must be accessible via registers. In most processors, these are 8 bit, 16 pit or 32 bit. To access more memory, you have to "page" (the high part).
It really does not matter if the memory/IO space in inside of the chip or outside, the principle is the same. To get the most out of your hardware, you have to understand your hardware.
The
PICmicro® 18C MCU Family Reference Manual is 976 pages long. The
MPLAB® C18 C COMPILER USER’S GUIDE is almost 200 pages long. You have to start reading!
The answer depends on the type of memory you are trying to access. For example, try reading section 3.2.4 on page 41 of the latter reference. This pertains only to stack size (dynamic and non-static variables) and explains how to cross the 256 byte barrier for stack allocation...
<arms flailing> DANGER WILL ROBINSON!!! Increasing stack allocation will decrease other allocations and cause your code to
really slow down as
every reference to (in this case stack) memory must be inspected at run time as to which "page" it is in.
Now the same condescending note I gave in another thread... If you are exceeding memory allocations, you are doing something wrong! I most strongly urge you to look closely at what you are doing.
The 2004 Bobcat user routines spans about 1000 lines of code and required about 500 man-hours to develop. That's 1/2 hour per line. Why? Because you have to understand what each and every line does!
Embedded programming requires thought, planning and hard work. That's why it's called software
engineering.
Hope this helps...