<p>"Analog pin" is misleading nomenclature. Every pin is a digtal pin, but some digital pins happen to also be connected to the analog-to-digital converter and can thus <em>also</em> handle measuring analog signals.</p>

<p>Every analog pin can also serve as a perfectly good digital pin. The reverse is not true; if something requires an analog pin you cannot use a digital pin. The only things that require analog pins are the thermistors, for the rest (motors, MOSFETS, endstops,...) you can use either a digital pin or an analog pin.</p>

CC BY-SA 4.0
2019-07-21T06:38:36.217Z
2019-07-21T06:38:36.217Z
Tom van der Zanden
<p>In the RAMPS v1.4 board, it seems like the X, Y, and Z motors all use at least one analog pin, while the extruder motors are entirely digital. See just the top left block of this photo:</p>

<p><a href="https://i.sstatic.net/0OSvc.png" rel="nofollow noreferrer" title="RAMPS 1.4 connectors"><img src="https://i.sstatic.net/0OSvc.png" alt="RAMPS 1.4 connectors" title="RAMPS 1.4 connectors"></a></p>

<p>Is there any advantage to using analog vs. digital pins in the motors?</p>

<p>As far as I can tell the traditional thermistors have to be have an Analog pin input because of the way they are read and processed. The MOSFETs for the heated bed and hot ends (and fans) should be digital because of the way transistors work. The end-stops are also digital because they are on-off switches.</p>

<p>But besides that, I can't tell if there is any other requirements or advantages to using some pins in analog / digital, especially for the motors which have seemingly contradictory pin assignments.</p>

<p>There are also three digital pins I don't recognize: MISO, MOSI, and SCK.</p>

<p>Right now I'm looking to add 2 new motors using 8 total pins (6 Digital pins, 2 for ground). It seems to me I could use any combination of the  D pin available in the image: </p>

<p><a href="https://i.sstatic.net/0bG7m.jpg" rel="nofollow noreferrer" title="Pin connection diagram AM350 v.9.5.1"><img src="https://i.sstatic.net/0bG7m.jpg" alt="Pin connection diagram AM350 v.9.5.1" title="Pin connection diagram AM350 v.9.5.1"></a></p>

CC BY-SA 4.0
2019-07-21T03:02:42.353Z
MISO/MOSI/SCK are pins for a SPI bus.
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2019-07-21T03:05:06.677Z
I might pose this as another question, but is it possible to connect two 3D printer boards of the same kind through that SPI and communicate through one to the other using G code? I couldn't find any tutorials online, but when I googled SPI just now it seems like that is exactly what it is for.
K Mmmm
CC BY-SA 4.0
2019-07-21T03:08:13.527Z
I just want to basically have double the pins of every pin on my current board... Right now I am collecting MOSFETs, thermisters, motors, etc, but the simplest possible circuit would help a lot. I don't want there to be a significant delay from one command to the other (like using Repetier-Host's "execute" command would entail)
K Mmmm
CC BY-SA 4.0
2019-07-21T03:19:51.043Z
I don't think that would work for synchronizing them at a reasonable precision, but I may be mistaken. SPI is rather awful.
R.. GitHub STOP HELPING ICE
<ramps-1.4><ramps>
Digital vs. analog pins
K Mmmm
# Digital vs. analog pins

(Asked by: username_0 on 2019-07-21)

In the RAMPS v1.4 board, it seems like the X, Y, and Z motors all use at least one analog pin, while the extruder motors are entirely digital. See just the top left block of this photo:

[![RAMPS 1.4 connectors](https://i.sstatic.net/0OSvc.png "RAMPS 1.4 connectors")](https://i.sstatic.net/0OSvc.png "RAMPS 1.4 connectors")

Is there any advantage to using analog vs. digital pins in the motors?

As far as I can tell the traditional thermistors have to be have an Analog pin input because of the way they are read and processed. The MOSFETs for the heated bed and hot ends (and fans) should be digital because of the way transistors work. The end-stops are also digital because they are on-off switches.

But besides that, I can't tell if there is any other requirements or advantages to using some pins in analog / digital, especially for the motors which have seemingly contradictory pin assignments.

There are also three digital pins I don't recognize: MISO, MOSI, and SCK.

Right now I'm looking to add 2 new motors using 8 total pins (6 Digital pins, 2 for ground). It seems to me I could use any combination of the D pin available in the image:

[![Pin connection diagram AM350 v.9.5.1](https://i.sstatic.net/0bG7m.jpg "Pin connection diagram AM350 v.9.5.1")](https://i.sstatic.net/0bG7m.jpg "Pin connection diagram AM350 v.9.5.1")

**Tags:** ramps-1.4, ramps

> **Comments:**
> **username_1**: MISO/MOSI/SCK are pins for a SPI bus.  
> **username_0**: I might pose this as another question, but is it possible to connect two 3D printer boards of the same kind through that SPI and communicate through one to the other using G code? I couldn't find any tutorials online, but when I googled SPI just now it seems like that is exactly what it is for.  
> **username_0**: I just want to basically have double the pins of every pin on my current board... Right now I am collecting MOSFETs, thermisters, motors, etc, but the simplest possible circuit would help a lot. I don't want there to be a significant delay from one command to the other (like using Repetier-Host's "execute" command would entail)  
> **username_1**: I don't think that would work for synchronizing them at a reasonable precision, but I may be mistaken. SPI is rather awful.  

---

## 1 answers

### Answer by username_2 on 2019-07-21. Score: 10 | Accepted answer

"Analog pin" is misleading nomenclature. Every pin is a digtal pin, but some digital pins happen to also be connected to the analog-to-digital converter and can thus *also* handle measuring analog signals.

Every analog pin can also serve as a perfectly good digital pin. The reverse is not true; if something requires an analog pin you cannot use a digital pin. The only things that require analog pins are the thermistors, for the rest (motors, MOSFETS, endstops,...) you can use either a digital pin or an analog pin.


---

