• 9849-xxx-xxx
  • noreply@example.com
  • Tyagal, Patan, Lalitpur

PARTS: DS1801 SPI AUDIO volume POTENTIOMETER

Dallas/Maxim’s DS1801 is an audio volume potentiometer with a basic SPI interface. This chip has two channels of volume manage that may be beneficial in a diy audio project. We previously looked at the DS1807, a similar part with an I2C interface. this week we’ll show you exactly how to utilize the SPI version.

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

Bus Pirate
DS1801 (pin #)

GND
GND (1)

AUX
RST (3)

GND
ZCEN (4)

GND
AGND (11)

MOSI
D (12)

Clock
CLK (13)

+3.3volts
VCC (14)

We linked the DS1801 to our Bus Pirate universal serial interface tool as shown in the table. We utilized the Bus Pirate to demonstrate this chip, however the exact same fundamental procedures apply to any type of microcontroller. The DS1801 power demands are flexible, it works at either 3.3volts or 5volts, we utilized a 3.3volt supply.

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

The DS1801 SPI protocol is explained in figure (a) on page 4 of the datasheet (shown above). note that the SPI allow signal, called RST on the DS1801, is really opposite common notation. data input is active when RST is high, as well as 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, setting 64 is mute. setting the volume is truly simple; just raise the RST signal, clock in the volume level for every potentiometer, as well as 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 SPI>

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

SPI>A 0 0 a
AUX HIGH
WRITE: 0x00
WRITE: 0x00
AUX LOW
SPI>

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

SPI>A 0 64 a
AUX HIGH
WRITE: 0x00
WRITE: 0x40
AUX LOW
SPI>

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

Like this post? inspect out the parts articles you may have missed. want to request a part post? Please leave your tips in the comments.

Leave a Reply

Your email address will not be published. Required fields are marked *