the 20X2 bank pins can be simply & conveniently addressed 0-16. Is this documented?
No, that's not documented. Primarily because we do not wish to encourage use of numbered pins on the X2 range, the preference being
letter.digit. There are reasons for that -
The
number to
letter.digit mapping may vary between PICAXE variants leading to code which is difficult to port to a different device.
When people see "High 8" and the like, the first instinct is to assume a typo error. If people post problem code, "I use high 16 and my motor does not turn", it's not immediately obvious what "pin 16" is, which PICAXE is being used, which may mean a long back-and-forth Q&A session before starting to even consider the actual problem.
Similarly with "Input 0", "ReadTemp 0,b0" etc, the first instinct may be to assume PICAXE 08M, and pin 0 is output only.
The correlation of pin number to analogue channel number no longer exists on the X2 which can add another layer of confusion when using numbered pin; "High 3:ReadAdc 3,b0" on first sight appear to use the same pin, on pre-X2 that may be so, but not on the X2's.
Seeing numbered pins in code may lead to others simply changing #PICAXE definition and expecting code to work. It's impossible for a reader to subsequently tell if the numbering is as intended or left over from earlier PICAXE work.
The potential for confusion between pin and leg numbering becomes even greater.
Use of
letter.digit shouldn't prove to be any more complicated than using numbered pins. It is still possible to use indexing to access individual pins ...
For b0 = B.0 To B.7
High b0
Pause 1000
Next
Multi-PICAXE setups, say where a sender sends "pinNumber, zeroOrOne" to control an output in a output extender PICAXE may need the abstract pinNumber to be re-mapped, but this is relatively easy ( just an example, hardware may differ ) ...
Tx:
SerOut PIN, BAUD, ( 8, 1 ) ' Set LED 8 On
Rx:
SerIn PIN, BAUD, b0, b1
Select Case b0
Case 0 To 7 : b0 = b0 & 7 + A.0
Case 8 To 15 : b0 = b0 & 7 + B.0
Case 16 To 23 : b0 = b0 & 7 + C.0
Case 24 to 31 : b0 = b0 & 7 + D.0
End Select
If b1 <> 0 Then
High b0
Else
Low b0
End If