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