using Ramps 1.4 + drv8825 :puzzled by pin numbering

Hi,

my present goal is to operate a single axis stepper motor control with acceleration (AccelStepper ), using an arduino Mega and a ramps 1.4 board fitted with a single drv8825 sub-board (sub-board fitted at the location for the "X-motor" on the Ramps board).

I do not want to use a full RepRap software on the Mega, but plan to simply adapt the pin specifications for the DRV8825 controls, to the hardware above. (Ramps1.4 fitted onto the mega board). All I need for a simple debugging is to control the STEP, and DIRECTION on the drv8825 (and not caring for now with any sub-stepping).

Actually I got completely puzzled:
on the wiring diagram of the ramps1.4, (http://reprap.org/mediawiki/images/3/3f/Arduinomegapololushieldschematic.png )
it is indicated for the Mega connections:
X-step >>> A0
X-dir >>>> A1

And indeed on the drv8825, following the "DIR" pin from the drv8825, I can follow by eye on the ramps board (DIR-X connection, and measure with an ohmmeter) that it is hooked to the Analog pin 1 (A1) from the arduino mega, when the ramps board is fitted onto the arduino mega.

So far so good;

Now, to my surprise, when looking into the pin controls from existing software for the ramps 1.4 board,
either info from RAMPS 1.4 - RepRap , or from the "Sprinter" firmware (GitHub - kliment/Sprinter: Firmware for RepRap printers and similar devices) and exploring the pin config corresponding to ramps 1.4 + arduino mega, it specifies :

#define X_DIR_PIN 55

while looking into the Arduino Mega 2560 PIN mapping table:

I get:

Pin Number Pin Name Mapped Pin Name
96 PF1 ( ADC1 ) Analog pin 1

so, where does this "55" come from ??

help needed :confused: !