New 08M2, 14M2 and 20M2 now available!

dmaxben

Member
I cant thank rev-ed enough for the new M2 series chips...they are incredible, I have been having a lot of fun with them. The parallel-tasking capability is essential to some of my projects, which would have not been possible with out it! Hats off to them.

now I KNOW beggars cant be choosers, and Ill probably catch flack for this...but... :) Is there any possibility that sometime down the road, the M2's might be expanded to have more program space? Ive had some programs come close to the 2k limit, but I cant use an X2 due to the need for parallel-tasking in my programs. If/when I outgrow the M2's program space, in the mean time I will simply incorporate some extra M2 "slaves", but just wondering if Rev-Ed is ever going to entertain the possibility of an M2 (or maybe an X2 with parallel-tasking?) with more program space?

Ben
 

westaust55

Moderator
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en538963

If the 18M2 = 16F1827, I see it has a hardware SPI, is there anyway I can get to use it?

Also I would like to know the 08M2, 14M2 20M2 Microchip equivalents, so that I can refer to the data sheets - Thanks!
08M2 = PIC 12F1840,
14M2 = PIC 16F1825, and
20M2 has also been discussed here if you search (sorry but in a hurry and do not have it committed to memory)

EDIT:back and had a chance to look through this thread. Post 44 has the information form Technical:
20M2 = PIC 16F1829
 
Last edited:

nbw

Senior Member
Tighter, leaner, meaner code? I recall Hippy had a good list of byte-savers on his website; things like using smaller numbers in loops etc e.g for x = 0 to 255 rather than 256 as it flows into an extra byte, that sort of thing. Have a good look at byte-hungry commands (I think selects by the time you've slapped in a few cases, and serout("insert long string here to be written to LCD"). Peek and poke I used to use on the ancient 40X (bless!) for a just-fits aquarium controller (around 2000 bytes at the end).
 

westaust55

Moderator
That link only indicates what is on the top of the chips which in the case of the new M2 parts is just that - PICAXE xxM2
Post 85 above (and 44 further back) gives the ~ equivalent PIC part numbers for those seeking to study datasheets.
There also been explanation previously as to why Rev Ed cannot state outright that 20M2 = PIC 16F1829
 

westaust55

Moderator
Originally Posted by curry87 (post 12 dated July 2011): Sounds good ! now will there be a X3 series next ?

I hope so (though I haven't even come close to using all the capabilities of the X2 series)
We are digging out comments from over 6 months ago now!
The same comment as given by srnet at post 82 above applies.
 

westaust55

Moderator
Tighter, leaner, meaner code? I recall Hippy had a good list of byte-savers on his website; things like using smaller numbers in loops etc e.g for x = 0 to 255 rather than 256 as it flows into an extra byte, that sort of thing. Have a good look at byte-hungry commands (I think selects by the time you've slapped in a few cases, and serout("insert long string here to be written to LCD"). Peek and poke I used to use on the ancient 40X (bless!) for a just-fits aquarium controller (around 2000 bytes at the end).
You can see some details on what relates to the program size, speed and a few optimisations in the attachments within this thread:
http://www.picaxeforum.co.uk/showthread.php?17782-PICAXE-program-Size-Optimisations-and-Speed
That includes work by hippy, beaniebots and myself.
 

dmaxben

Member
20M2 = PIC 16F1829
Interesting, thanks a bunch for all the info. Those PDF's you posted are a good read as well. I especially like the timing table "how long it actually takes to execute X command".

So basically, in laymans terms, the reason the 20M2 only has 2k of program space (vs the 14k that the datasheet spec's) is because the "translation" of PICAXE BASIC into the real "nitty gritty actual code" is not very 'efficient'? Not that I mean that in a derogatory way, I can imagine that it takes a fair bit of extra "real code" to translate a simple 'newbie-friendly' PICAXE BASIC command into something "real" that the PIC micro can interprete/use...

I just want to make sure im understanding that correctly...why the "equivalent" PICAXE chip has less available "program space" than its datasheet-spec'd flash memory might suggest.

*Patiently waiting for Moore's law to do its thing and give us even more advanced PICAXE chips.* :D

Ben
 

nick12ab

Senior Member
So basically, in laymans terms, the reason the 20M2 only has 2k of program space (vs the 14k that the datasheet spec's) is because the "translation" of PICAXE BASIC into the real "nitty gritty actual code" is not very 'efficient'? Not that I mean that in a derogatory way, I can imagine that it takes a fair bit of extra "real code" to translate a simple 'newbie-friendly' PICAXE BASIC command into something "real" that the PIC micro can interprete/use...

I just want to make sure im understanding that correctly...why the "equivalent" PICAXE chip has less available "program space" than its datasheet-spec'd flash memory might suggest.
The bold word is the key word! The PICAXE uses an interpreter like the BASIC Stamp but uses its internal program memory instead of an external EEPROM. As the interpreter takes up a lot of memory, you get less space to store your code.
 

inglewoodpete

Senior Member
The bold word is the key word! The PICAXE uses an interpreter like the BASIC Stamp but uses its internal program memory instead of an external EEPROM. As the interpreter takes up a lot of memory, you get less space to store your code.
...but your code is very efficient in its space requirement. If you know machine code and the space normally required and compare that with the space required for each PICAXE basic command, you can see that there must be some substantial "mirrors and strings" code (the interpreter) doing the actual work inside the chip.
 
Top