How does the PE determine when an older 18M2 or newer 18M2+ is intended

westaust55

Moderator
Noting the release of the new 18M2+ chip and having read the briefing/update note and the V7.8 manual part2 I am curious how the Programming Editor (PE) will distinguish between the earlier 18M2 and the newer 18M2+.

The PE V5.5.0 has seemingly only a single selector for the “18M2” in the Options dropdown list.

How will the PE determine when undertaking a Syntax check:
(a) How many multi-task starts are permitted, and
(b) How much program memory is available if EEPROM memory is also in use?
 

nick12ab

Senior Member
It doesn't when you're writing the program and using the syntax check. The syntax check checks the code as if it was being written for the 18M2+ since code with more than four starts gets passed. However, when you try to program a PICAXE-18M2 with code that has more than four starts like this:
Code:
start0:
goto start0
start1:
goto start1
start2:
goto start2
start3:
goto start3
start4:
goto start4
start5:
goto start5
start6:
goto start6
start7:
goto start7
...you get an error message much like when you try to use setfreq em64 on a PICAXE-28X2-5V or a PICAXE-40X2-5V instead of the 3V versions or the universal voltage versions.



The firmware check dialog indicates that the PICAXE tells it the firmware version:



Therefore by comparing this firmware version with the required firmware version (D.A) and the firmware revisions list, Programming Editor can then determine whether you've connected an 18M2 or an 18M2+.
 

Technical

Technical Support
Staff member
Simulations and syntax check occur as if the part is an 18M2+
However if you attempt to use a new feature (e.g. task 5) and do a download, the download will report an error.
 

westaust55

Moderator
Thanks for the clarification Technical.

As I do not have an 18M2+ (yet) it was a more theoretical question since the pull down selection did not show 18M2+ and the PE was allowing 18M2+ capabilities as nick12ab has used for his demo
 

BillyGreen1973

Senior Member
I think the fact that PE does a syntax check as if it were intended for 18M2+ could cause further problems for educational users.
For example, the use of the internal temp reading would be allowed in a syntax check, but refused at download if using an 18M2. Does the error dialog box highlight the incorrect line of code in the same way as the syntax check does?

I think it would be a whole lot easier to have the option to differentiate between 18M2 and 18M2+ in the 'options' menu, as there are quite a few significant differences between them. This would also make 'off-line' code writing and editing easier. I often edit and write code at work where I have no hardware (Picaxe's etc) so rely on the syntax check and simulation.
 
Top