20X2 vs M2 memory and slots

matchbox

Senior Member
The 20X2 only has one program slot. With 4096b in that slot. While the M2's also have a total of 4096b, in 2 slots. With 2048 bytes in each.
I have had a few times when 2048bytes of memory on M2's, isn't enough. And using the second slot is somewhat inconvenient, because of the extra memory(code) required to make both slots work as one

My question : Is this by design, that the M2's have their 4096b divided into 2 slots, while the 20X2 just has it in one?
 

lbenson

Senior Member
I don't know what the specific internal memory organization is, but the M2s were released with a single 2K program area available in PE5 years before PE6 made a second slot available.
 

matchbox

Senior Member
Thanks for the reply guys.
I had a quick look through the parts link Pete. From this I can assume the program memory size is product of the chip specs and whats left over after the bootstrap is loaded?

What do you guys think about slots? I have personally only found a few applications when multiply slots are of use to me.
I prefer double the memory in one slot, like the 20x2.
 

Aries

New Member
I have used all four 4096 byte slots on a 28X2 for controlling an 8-channel underfloor heating system and three slots on a 28X2 for a power meter for measuring import, export and photovoltaic generation. The 20M2 and 14M2 have the big advantage over the 20X2 of larger RAM (512 versus 128+128 scratchpad) and larger table size. I therefore tend towards using the two slots on the M2 rather than the (easier) one slot on the 20X2 (and the M2s are cheaper).
 

lbenson

Senior Member
The 20M2 and 14M2 have the big advantage over the 20X2 of larger RAM (512 versus 128+128 scratchpad) and larger table size.
Right. Certainly I would prefer the best of both--4K contiguous program memory, scratchpad (bigger than 128), 512 bytes ram, 1K bytes table (512+512).

20M2 table space all used here:
And additional program memory here--PE6 came out with 2nd slots for M2s just as I ran out of space:
 

matchbox

Senior Member
I have used all four 4096 byte slots on a 28X2 for controlling an 8-channel underfloor heating system and three slots on a 28X2 for a power meter for measuring import, export and photovoltaic generation. The 20M2 and 14M2 have the big advantage over the 20X2 of larger RAM (512 versus 128+128 scratchpad) and larger table size.
Right. Certainly I would prefer the best of both--4K contiguous program memory, scratchpad (bigger than 128), 512 bytes ram, 1K bytes table (512+512).
Both good points.
I also like that the 20X2 has 56byte variables. Especially when many word variables are used in the program. I find it makes writing larger programs, simpler.
And a 64Mhz internal resonator.
 
Last edited:

inglewoodpete

Senior Member
I also like that the 20X2 has 56byte variables. Especially when many word variables are used in the program. I find it makes writing larger programs, simpler.
And a 64Mhz internal resonator.
The 20X2 is a superior chip, with a lot of extra features, if you need them.
hSerial - Background async serial data reception to 128-byte scratchpad
i2c - Master OR slave configurable
Background Timer - much more flexible with optional timer interrupts
Hardware (latching) interrupts

I even put a 20X2 SMD on a 14-pin base when the old 14M wouldn't do what I wanted!😲 Not so necessary now that we have the 14M2 but it still beats the 14M2 over a standing start 1/4 mile!
 
Last edited:
Top