I don't believe the numeric pin values were ever officially documented as it is recommended to only use the pin names -
port.
pin.
The only time it really makes sense to use numeric pin values is for the 8-pin PICAXE chips which only have one port. Otherwise it will just confuse people as to which pins are being referred to by a number. And that's also likely to include the author of the code when they come back to it sometime later.
The compilers will accept named pins for all PICAXE, including the older chips, and larger chips.
If one needs to programmatically set a pin in a port, such as when a program receives a number of a pin to set high, one can add the
port.0 value, for example to set a pin in the B port -
Code:
SerRxd N4800, #pin
pin = pin & 7 + B.0
High pin
The only time there may be an issue is when a
port.
pin name is used to reference an ADC channel in a SYMBOL statement. The following will work because the compiler will auto-magically work out what A.0 means in terms of ADC channel, asuming it exists -
But the following may not work because that conversion doesn't happen for SYMBOL -
Code:
Symbol POT_ADC = A.0
ReadAdc10 POT_ADC, potValue
POT_ADC would likely end up having value 16, when the ADC channel should be some other number.
In that case you need to define POT_ADC in terms of the ADC channel number. I believe that only applies to non-M2 chips because M2 chip
port.
pin always match ADC channel.