Picaxe memory map

westaust55

Moderator
Hi all,

I have been refining my memory map covering variables and all types of memory including Special Funciton Registers. As like many I have a DS1307 RTC chip which has 56 bytes of battery backed RAM, I have included that as well.

This latest Revision is still predominantly based around the 40X1 which I have but where possible I have colour coded and notated to try and cover other PICAXE variants as well.

Obviously now takes up an entire A3 page so not much room left for further edits. However if people have some comemnts I will see what I can do to incorporate more that might be usefull to many.

EDIT: ThePICAXE memory map has removed from this post to avoid confusion. See the latest version of the memory map at post No 14 on page 2
 
Last edited:

Technical

Technical Support
Staff member
Unfortunately this is not very accurate and is misleading - the register assignments vary considerably across the range of PICAXE chips as the internal PIC SFR registers vary considerably between different Microchip PIC chips - there is no 'Microchip standard' (would make our life much easier if there was!). The X2 also have completely different SFR registers. Also the mapping of items such as b0-b13 etc vary between X1 and other PICAXE chips - and are actually incorrect here if this mapping is for the 40X1!

To be of any use you would really need to produce a separate sheet for each PICAXE chip.
 

westaust55

Moderator
Picaxe Memory Map

Hi Technical,

Agree that the SFR varies somewhat between the various PICAXE models.
In fact my Rev 3 memory map (also started today) already incorporates notations in the SFR area for the 18X/40X1and 40X2. The map is something of a work in progress. . . . . . .

Thanks to your comments, further research confirms that where the variables B0, B1, etc (as applicable) start at SFR location 32 only for other than the X1 and X2 parts.

I am still relatively new to the PICAXE (just on 2 months) and I am looking to build up a better image of at least the 40X1 (which I have) as the info in the manuals is spread around and not immediately obvious that there are 4 separate "types" of memory.

With that in mind, would you please advise the correct location for the X1 variables (b0 to B27) so that I may update the memory map. Or, are these located in SFR banks that cannot be accessed through the PICAXE BASIC commands?
 

westaust55

Moderator
PICAXE MEMORY MAP Rev 3 for 14M 18X 20M 28X1 & 40X1

I have taken the opportunity to further work on the memory map that I have started.

While still not complete, it should now be fairly close for the 14M, 18X, 20M, 28X1 and 40X1.

per post #4, I am awaiting Technical (or others in the know) to advise the correct SFR RAM locations for the PICAXE 40X1 variables (b0 to b27).

Any constructive comments/corrections still appreciated.

EDIT: Old version of memory map deleted. See the new version of the map covering the current PICAXE devices (08, 08M, 14M, 18X, 20M, 28X1 and 40X1 is provided at post No 14 on page 2.
 
Last edited:

Mycroft2152

Senior Member
That's very handy and an excellent summary.

I would suggest 2 changes:

Split it into printable pages

Add the special register poke values and their results (Hippy started that once)

Myc
 

Technical

Technical Support
Staff member
Your b0 etc are wrong for all.
On non_X1 parts b0 starts at 0x32 (not decimal 32)
On X1 parts it counts b0,b1,b4,b5,b8,b9 etc. up from 0x22. b2,b3,b6,b7 etc cannot be accessed. This is due to the strange parallel RAM page system used by 16F series PICs.
On X2 parts there is a separate 256 RAM area for variables - b0-b39 are the addresses 0-39, so the same as peek/poke 0-39, with the remaining 216 bytes only accessed by peek/poke (40-255).
 
Last edited:

westaust55

Moderator
Thanks Technical,

Noted my error between Dec 32 and Hex 32 for non X1/X2 variable locations.

With respect to the X2 parts, you indicate:
On X2 parts there is a separate 256 RAM area for variables - b0-b39 are the addresses 0-39, so the same as peek/poke 0-39, with the remaining 216 bytes only accessed by peek/poke (40-255).
Can you verify that b39 is the uppermost variable number for X2 parts. The PICAXE manual 2 page 9 states there are variables up to b47. :confused:


Mycroft,
I have formatted for and been printing onto a single A3 sheet which is still readable. I will look at a 2-page version as requested (maybe another version when more is sorted).

I presume (on searching) that you are referring to Hippys postings about SFR's at http://www.picaxeforum.co.uk/showthread.php?t=8954&highlight=SFR*

It is not my intent to just copy in Hippys work. My sheet was meant as much to show the different types of memory and to a limited extent where the accessible SFR's were by name only. Hippy thread would seemingly be better reference by people in its own right.
 
Last edited:

westaust55

Moderator
View attachment 896I have taken the opportunity to further work on the PICAXE memory map that I have started.

While still not 100% complete, it should now be much closer with SFR allocations for the 08, 08M, 14M, 18X, 20M, 28X1 and 40X1 included.

Awaiting clarification at the moment for the number of variables the X2 parts will have. Due to significant variances it may never hold all the SFR's for the PICAXE X2 parts.

Mycroft,
your suggestions are not forgotten, just sorting out more data before I look at splitting over 2 x A4 sheets (started to look last night but while easy to move things around, not so easy to shuffle to maximise use of area on two smaller sheets.

Any further constructive comments/corrections still appreciated

EDIT: a new version of the map covering the current PICAXE devices (08, 08M, 14M, 18X, 20M, 28X1 and 40X1 is provided at post No 14 on page 2.
 
Last edited:

westaust55

Moderator
Picaxe Memory Map

While no further response provided from Technical, I have in further searching confirmed that on the x2 parts, the manuals are correct and that there are 48 byte variables b0 to b47.
As such, I done some further minor adjustments to the PICAXE memory map to reflect this.
 

Attachments

westaust55

Moderator
Further to the request form Mycroft, I have prepared a variant of the PICAXE memory map at Rev 5 to print on 2 A4 pages.

Unfortunately the file size limitations for this forum have dictated that I upload each page as a separate file. Strange as the two files only occupy about 400kB but the combined file was almost 1MB !

For those who can print on A3 sized paper, the Rev 5 version in A3 size is still available in the next posting above this.
 

Attachments

Last edited:

davidwf

Senior Member
westaust55....

nice one !

but when I try to use b15 or w7 on my 18X it fails sytntax error...seems like I "only" have b0 to b13 or w0 to w6.

Is there a way of extending these ?

thanks
 

westaust55

Moderator
If you look at the top of my chart, there is a legend for the colours.

The light blue shaded parts are only for X1 and (future X2) PICAXE parts.

Additionally, light orange areas relate only to the future X2 parts
There is also text down the left side indicating that b14 and above (w7 and above) are only for the X1 and X2 parts
 

binary1248

Senior Member
Thanks westaust55, I was just starting to wonder where I could find a good memory map of the picaxe40x2. This covers all piaxe's and is great. You obviously put a lot of time and effort to create this.. Even tho this is an old thread, as a newbe I like it.
Any chance you have a map for 40x2 parts only, or should I try to edit my own map using yours as the master guide ?:confused:
 
Last edited:

westaust55

Moderator
The map attached to this thread is the only overall memory map I have produced - non specific to one chip.
The only other PICAXE map covers the SFR (special function registers) for the M2 parts based on the PICAXE addressing scheme.
 

binary1248

Senior Member
Thanks for the reply. The map you have provided is fantastic. After further studying the memory map there is very little to remove when considering on 40X2, so I'll just leave it the way you have created. Many thanks for a superb map.
 

bg912

New member
About every five years I do another little Picaxe project. In the interim I forget all about this sort of stuff, so I am extremely grateful for this good work. Current little project is a cylinder head temperature monitor/logger for a 58 year old, 4 cylinder air cooled Porsche.
 
Top