Maker Pro
Maker Pro

memory management in PIC

M

mu23n

Jan 1, 1970
0
plz tell me the meaning of 64k*16k program memory, 3936*8 RAM, and
31*16 Stack.... iam totally confused.
 
H

Homer J Simpson

Jan 1, 1970
0
plz tell me the meaning of 64k*16k program memory, 3936*8 RAM, and
31*16 Stack.... iam totally confused.

Read a book on basic computer concepts. Memory can be any width in bits -
and has been in the past.
 
S

Spehro Pefhany

Jan 1, 1970
0
plz tell me the meaning of 64k*16k program memory, 3936*8 RAM, and
31*16 Stack.... iam totally confused.

1. They are all different memory spaces, not shared like in some
Von Neumann machines you may be familiar with. Code memory is
usually flash, the others are static RAM technology. PICs are
all Harvard architecture, though some of the newer ones map
stuff around a bit to blur things.

2. different PICs have different instruction widths-- 12, 14, 16, or
24 bits, depending on family. If the width of this one is 16 bits,
then 64k x 16 (not 16k) means that 65536 instructions can be stored
(minus any tables and other fixed data).

3. The hardware stack contains return addresses for interrupts and
calls. Obviously this poses a limit for reentrancy unless you
create a software stack.

4. The RAM ("Register Files") is just for data storage. The memory
is usually banked (you have part of the address, say 8 bits, in the
instruction and another part in another register). This memory
space is shared with SFRs (special function registers), of which
there can be quite a few. "Access RAM" is another twist to make
the ugly banking less inefficient- allowing a single bank
containing a bit of RAM and all the SFRs to be accessed directly.

5. There might be EEPROM data space in addition, but it's not
accessed directly.

Have a look at the memory maps in the data sheets and reference
manuals.


Best regards,
Spehro Pefhany
 
D

Don Lancaster

Jan 1, 1970
0
colin said:

I think you mean 64K*16 program memory.
64K*16k would be somewhat excessive for a low end microcontroller.

The first number is how many words of storage.
The second number is the number of bits per word.

--
Many thanks,

Don Lancaster voice phone: (928)428-4073
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml email: [email protected]

Please visit my GURU's LAIR web site at http://www.tinaja.com
 
Top