Parts: DS1801 SPI Audio Volume Potentiometer


Dallas/Maxim’s DS1801 is an audio volume potentiometer with a simple SPI interface. This chip has two channels of volume control that might be useful in a DIY audio project. We previously looked at the DS1807, a similar part with an I2C interface. This week we’ll show you how to use the SPI version.

DS1801 SPI digital audio volume potentiometer (Digikey search, Octopart search, $6.50). Datasheet (PDF).

Bus Pirate DS1801 (pin #)
MOSI D (12)
Clock CLK (13)
+3.3volts VCC (14)

We connected the DS1801 to our Bus Pirate universal serial interface tool as shown in the table. We used the Bus Pirate to demonstrate this chip, but the same basic procedures apply to any microcontroller. The DS1801 power requirements are flexible, it works at either 3.3volts or 5volts, we used a 3.3volt supply.

The DS1801 has an SPI interface. The data output pin can be used to cascade multiple DS1801s. We used the Bus Pirate’s SPI mode with default options to interface this chip.


The DS1801 SPI protocol is described in figure (a) on page 4 of the datasheet (shown above). Note that the SPI enable signal, called RST on the DS1801, is actually opposite standard notation. Data input is active when RST is high, and inactive when it’s low.

Each DS1801 has two audio potentiometers with 64 steps of volume control. 0 is full volume, 63 is the lowest volume, position 64 is mute. Setting the volume is really simple; just raise the RST signal, clock in the volume level for each potentiometer, and lower RST to enact the new settings.

SPI>A 64 64 a
AUX HIGH <–RST pin high
WRITE: 0x40 <–mute setting channel 0
WRITE: 0x40 <–mute setting channel 1
AUX LOW <–RST pin low

Here, we set both potentiometers to mute (64). First, raise the RST pin to 3.3volts (capital ‘A’, silly CSS). Next, write the mute setting for each (64 64). Finally, lower the RST pin to enact the new settings (small ‘a’).

SPI>A 0 0 a
WRITE: 0x00
WRITE: 0x00

Now we change both potentiometers to full volume by writing a 0 to each. The sets a resistance level of 0, or 100% of the input volume.

SPI>A 0 64 a
WRITE: 0x00
WRITE: 0x40

Finally, we set a different volume levels on each potentiometer. Pot 0 is at full volume (0), pot 1 is muted (64).

Like this post? Check out the parts posts you may have missed. Want to request a part post? Please leave your suggestions in the comments.

3 thoughts on “Parts: DS1801 SPI Audio Volume Potentiometer

  1. Could this chip be used to vary the inductive load if used to short a motor? I have been wondering about using plain DC motors as both drivers and restistive parts in a variably compliant joint for robots. Under load, the motor would help move the joint, but at certain points the motor would either be driven against the direction of motion or shorted in such a way as to provide resistance to further motion.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.