General Purpose Variables on M2 Chips

tracecom

Senior Member
If I am reading the documentation correctly (yes, I resort to that occasionally,) the 08M2, 14M2, 18M2, and 20M2 chips all have 14 word variables, 28 byte variables, and 32 bit variables. My (often faulty) memory is that the 14M2, 18M2, and 20M2 had more than the 08M2. What's the truth?

Thanks.
 

Technical

Technical Support
Staff member
A quick trick is to select the appropriate chip and then look at how many variables are shown in the right hand Code Explorer panel in PE6. Same process applies to RAM / Table etc. in the Memory Explorer.
 

tracecom

Senior Member
A quick trick is to select the appropriate chip and then look at how many variables are shown in the right hand Code Explorer panel in PE6. Same process applies to RAM / Table etc. in the Memory Explorer.
In that case, then the 08M2, 14M2, 18M2, and 20M2 chips all have 14 word variables, 28 byte variables, and 32 bit variables. Thanks.
 

AllyCat

Senior Member
the 08M2, 14M2, 18M2, and 20M2 chips all have 14 word variables, 28 byte variables, and 32 bit variables.
Not entirely, they have 14 Word variables which overlay the 28 byte variables and the 32 bits overlay the four low bytes.

However, there are a further 6 - 8 unused "system" Word variables (S_W0 ... S_W7) , plus bptr which can point to another 100 bytes (08M2) or 484 bytes (14/20M2) of RAM.

Cheers, Alan.
 

tracecom

Senior Member
Apologies. Link was to the earlier versions.
This thread has the later memory maps which includes M2 parts:
http://www.picaxeforum.co.uk/showthread.php?11514-PICAXE-Memory-Map-and-SFR-Details-Chart/page3
No apology required. Thanks for the map; I have saved it in my PICAXE reference material.

Currently, I am working with M2 chips. Attached is an updated version of my GP variable usage chart that I posted here some time ago. It is intended to be both a reference document and a place to record which variables have been used and how they were used in a specific project.
 

Attachments

Top