# analogWrite vs. servo.write

**URL:** <https://forum.arduino.cc/t/analogwrite-vs-servo-write/370486>\
**Category:** General Electronics\
**Created:** [March 6, 2016, 9:24pm UTC](https://forum.arduino.cc/t/analogwrite-vs-servo-write/370486 "2016-03-06T21:24:29Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![cr0sh](https://avatars.discourse-cdn.com/v4/letter/c/67e7ee/32.png) [@cr0sh](https://forum.arduino.cc/u/cr0sh)\
**Post date:** [March 7, 2016, 1:45am UTC](https://forum.arduino.cc/t/analogwrite-vs-servo-write/370486/3 "2016-03-07T01:45:08Z")

</div>

Technically, while they are both PWM, servos use a particular kind of PWM - called PPM, or "Pulse Position Modulation".

It's a form of PWM in which the length of the pulses determine the angle of the servo itself. Center being a 1.5 ms (millisecond) pulse, with each end-point extreme being represented by a 1 or 2 ms pulse - with all of the channels repeated within a 20 millisecond "window" of time (IIRC). For example, one servo:

![](https://europe1.discourse-cdn.com/arduino/original/4X/4/d/c/4dc8ae958c2c7a8dd46880dd29f7d1339bff9c99.jpeg)

...and multiple servos (or channels):

 ![](https://europe1.discourse-cdn.com/arduino/original/4X/3/b/2/3b2cda0ed5446572945fcb76ed7ff628b01a473a.gif)

---

_[View the full topic](https://forum.arduino.cc/t/analogwrite-vs-servo-write/370486)._
