Port nomenclature and the thinking behind it?

Paix

Senior Member
This has to be one for Hippy, Dippy or Technical I feel.

With the exception of the 28X1 and the 40X1 port A appears not to be used. Would I be out of order, fine by me, to ask for a quick potted history of why ports were numbered as they were. Excluding the straight numbers and the in.number and out.number variants, why do I get the impression that the sequence fills from C, B and then A?

Any chance of a little bit of the thinking behind the A, B and C or is that C, B and A or is the answer to view the Pic MicroChip documentation?
Alternatively if this has been covered before, a link to the thread would be good to go.

I really should go and paint the garden fence. :)
 

Buzby

Senior Member
Put this in your simulator :

Code:
For b0 = 0 to 31
    High  b0
Next
End
You can then see the sequence of port numbering, but I don't know why it's like this.
 

westaust55

Moderator
With the exception of the 28X1 and the 40X1 port A appears not to be used.
Port A is still used for the 28 and 40 pin X2 series chips as is PortD. (See Manual 1 page 11)

Would I be out of order, fine by me, to ask for a quick potted history of why ports were numbered as they were. Excluding the straight numbers and the in.number and out.number variants, why do I get the impression that the sequence fills from C, B and then A?

Any chance of a little bit of the thinking behind the A, B and C or is that C, B and A or is the answer to view the Pic MicroChip documentation?
Alternatively if this has been covered before, a link to the thread would be good to go.
If you look at a Microchip PIC datasheet, for example for the 28X2/40X2 http://ww1.microchip.com/downloads/en/DeviceDoc/41412D.pdf
you will see the correspondence between PIC and PICAXE. There are a few minor variables such as PortE on 28/40 pin X2 chips becoming an extension of PortA for PICAXE nomencalture and the port identification for the 08M2 and 18M2 when PIC portA is PICAXE PortC.

Originally (pre X2 and M2 parts) PortB was fixed outputs, Port D when existing was fixed inputs and port C was bidirectional.

Guessing that as PortC on the 28 was the bidirectional IO, rather than call the 08M2 IO portA as per the datasheet Rev Ed tried for consistency and used PortC
Then they could keep PortA in alignment with the PIC chip datasheets for the 28 and 40 Pin devices,

and at the point I leave it to the Rev Ed team for further insight
 
Last edited:

hippy

Technical Support
Staff member
I think the best answer is that it follows the PICmicro tradition of port naming but has been adapted to suit the PICAXE itself.

The 28X is a good starting point which, as westaust55 notes, had A, B and C ports and B's were the outputs and C's were the default inputs. This became the common terminology as the PICAXE family evolved, so when we added the 20X2 after the 20M it made sense to map C to the left side inputs and B to the right side outputs
 

Buzby

Senior Member
Hi Paix,

I'm sure we we asked nicely we could get Rev-Ed to rename the ports.

I suggest Liverpool, Manchester, Folkstone, Grimsby.
 

Paix

Senior Member
@Buzby, After all the Internet kerfuffle with Scunthorpe a few years ago, I think that RevEd has it about right already . . . ha ha.

Thanks Hippy et al for the enlightenment as to the progression of the port naming. The key to full understanding seems to be in knowing the chronology.
 

inglewoodpete

Senior Member
Hi Paix,

I'm sure we we asked nicely we could get Rev-Ed to rename the ports.

I suggest Liverpool, Manchester, Folkstone, Grimsby.
Aw c'mon Buzby - how illogical. Why not Aberdeen, Birmingham, Chester (of course), and Derby

( If you live in Western Australia, use some local names like Alinjarra, Burrabadji, Coolgardie and Dandaragan) I'm sure the kiwis could find some matching rippers too!)
 

eclectic

Moderator
Aw c'mon Buzby - how illogical. Why not Aberdeen, Birmingham, Chester (of course), and Derby

( If you live in Western Australia, use some local names like Alinjarra, Burrabadji, Coolgardie and Dandaragan) I'm sure the kiwis could find some matching rippers too!)
Ports?
Peter, I really think that you should look at a map of Britain. :)))

e
 
Top