MUSES 72320 electronic volume

Member
Joined 2009
Paid Member
Muses 72320 arduino control code

Controlling the Muses chip with arduino is pretty straightforward, here is the relevant parts of my code (I totally mangled the excellent hifiduino code to control my preamp - the full code is unfortunately a mess..) :

// setup for MUSES 72320 control
#include <SPI.h>

#define SPIMAXATTNU 54784 // Take the binary from the datasheet and convert to ordinary number, SPI transfer do not care. -99db.
#define SPIMINATTNU 4096 // 0 db
#define SPIDEFAULTATTNU 29696 //50 db
#define SPIMUTE 65280
#define SPIINIT 32832 // Inital setup. Set L/R Cont1 = 1 for controlling both channels at the same time.

// Set SPI SS PIN 10 Arduino UNO R3. Other SPI pins are connected according to Arduino specification.
const int csPin = 10; //SS PIN

void setMusesVolume(word regVal)
{
digitalWrite(csPin, LOW); // MUSES72320 datasheet seems to like to go low before transmission
SPI.transfer(highByte (regVal)); // split the SPI transfer in high and lowbyte
SPI.transfer(lowByte (regVal));
digitalWrite(csPin, HIGH);
}
void startMuses(){
SPI.begin();
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE2);
// initialize SPI:
SPI.setClockDivider(SPI_CLOCK_DIV64); // Set correct speed for SPI muses chip

digitalWrite(csPin, LOW); // SPI SS PIN low - MUSES72320 datasheet seems like this go low before transmission
// SPI setup MUSES72320 l/r control
SPI.transfer(highByte (SPIINIT)); //
SPI.transfer(lowByte (SPIINIT));
digitalWrite(csPin, HIGH); // MUSES72320 datasheet seems like it go high after transmission
setMusesVolume (SPIDEFAULTATTNU);
}


Can somebody give me a tip how to program the chip? I'm a newbie in Programming ... currently trying it with an ardunio micro .....

Hopefully somebody can help :confused:
 
Controlling the Muses chip with arduino is pretty straightforward, here is the relevant parts of my code (I totally mangled the excellent hifiduino code to control my preamp - the full code is unfortunately a mess..) :

// setup for MUSES 72320 control
#include <SPI.h>

#define SPIMAXATTNU 54784 // Take the binary from the datasheet and convert to ordinary number, SPI transfer do not care. -99db.
#define SPIMINATTNU 4096 // 0 db
#define SPIDEFAULTATTNU 29696 //50 db
#define SPIMUTE 65280
#define SPIINIT 32832 // Inital setup. Set L/R Cont1 = 1 for controlling both channels at the same time.

// Set SPI SS PIN 10 Arduino UNO R3. Other SPI pins are connected according to Arduino specification.
const int csPin = 10; //SS PIN

void setMusesVolume(word regVal)
{
digitalWrite(csPin, LOW); // MUSES72320 datasheet seems to like to go low before transmission
SPI.transfer(highByte (regVal)); // split the SPI transfer in high and lowbyte
SPI.transfer(lowByte (regVal));
digitalWrite(csPin, HIGH);
}
void startMuses(){
SPI.begin();
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE2);
// initialize SPI:
SPI.setClockDivider(SPI_CLOCK_DIV64); // Set correct speed for SPI muses chip

digitalWrite(csPin, LOW); // SPI SS PIN low - MUSES72320 datasheet seems like this go low before transmission
// SPI setup MUSES72320 l/r control
SPI.transfer(highByte (SPIINIT)); //
SPI.transfer(lowByte (SPIINIT));
digitalWrite(csPin, HIGH); // MUSES72320 datasheet seems like it go high after transmission
setMusesVolume (SPIDEFAULTATTNU);
}

With this code I can only control the left channel. Has anybody an idea what's wrong?
 
Member
Joined 2009
Paid Member
I am not sure why it does not work for you and do not have the code in front of me now. The SPIINIT variable should set the chip to control attenuation on both channels at the same time and this works for me. Please note that it does not link left and right gain volume control. See page 21 in the muses datasheet (MUSES72320,MUSES72320V (18V Operation 2-Channel Electronic Volume) | MUSES Official Website) for how I constructed the variable.

I only need the attenuator. So far .... everything ok.

This is what I made out of your code ....

word Muses_Ini = B10000000; // L/R Cont 1: Controlling both Channels; Z/R Zero Crossing OM
word Muses_1_Adr = B00000000; // Adress of Chip 1
word Muses_2_Adr = B00000001; // Adress of Chip 2
word Muses_ConfigSelect = B01000000; // Bit set to initialise the Chip
word Muses_VolumeSelect = B00000000; // Bit set for Volume Control
word Muses_VolumeSelectL = B00000000; // Bit set for Volume Control
word Muses_VolumeSelectR = B00100000; // Bit set for Volume Control
word MusesVolume = B00000000; // Bit Mask for Volume
word MusesMute = B11111111; // Bit Mask for Mute
word MusesBitSet; //16 Bit Mask ......

void StartMuses()
{
pinMode(SlaveSelectPin, OUTPUT);
SPI.begin();
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE2); // Initialise SPI
SPI.setClockDivider(SPI_CLOCK_DIV64); // Set Correct speed for SPI Muses Chip
MusesBitSet = Muses_Ini << 8 | Muses_ConfigSelect | Muses_1_Adr;
Serial.println(MusesBitSet, BIN);
Set_MUSES(MusesBitSet);
SetVolume(StartVolume);
}

void SetVolume(int Volume)
{
int MusesSet = -1*map(Volume, -223, 0, -239, -16);
MusesBitSet = MusesSet << 8 | Muses_1_Adr | Muses_VolumeSelect;
Serial.print(Volume*0.5); Serial.print("Left Channel db : BIN:");Serial.println(MusesBitSet, BIN);
Set_MUSES(MusesBitSet);
LastVolume = ActualVolume;
ActualVolume=Volume;
}

void Set_MUSES(word Volume)
{
digitalWrite(SlaveSelectPin, LOW); //MUSES LOW according datasheet
SPI.transfer(highByte(Volume));
SPI.transfer(lowByte(Volume));
digitalWrite(SlaveSelectPin, HIGH); // HIGH after Transmission ....
}


Maybe something is wrong here .....
 
I only need the attenuator. So far .... everything ok.

This is what I made out of your code ....

word Muses_Ini = B10000000; // L/R Cont 1: Controlling both Channels; Z/R Zero Crossing OM
word Muses_1_Adr = B00000000; // Adress of Chip 1
word Muses_2_Adr = B00000001; // Adress of Chip 2
word Muses_ConfigSelect = B01000000; // Bit set to initialise the Chip
word Muses_VolumeSelect = B00000000; // Bit set for Volume Control
word Muses_VolumeSelectL = B00000000; // Bit set for Volume Control
word Muses_VolumeSelectR = B00100000; // Bit set for Volume Control
word MusesVolume = B00000000; // Bit Mask for Volume
word MusesMute = B11111111; // Bit Mask for Mute
word MusesBitSet; //16 Bit Mask ......

void StartMuses()
{
pinMode(SlaveSelectPin, OUTPUT);
SPI.begin();
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE2); // Initialise SPI
SPI.setClockDivider(SPI_CLOCK_DIV64); // Set Correct speed for SPI Muses Chip
MusesBitSet = Muses_Ini << 8 | Muses_ConfigSelect | Muses_1_Adr;
Serial.println(MusesBitSet, BIN);
Set_MUSES(MusesBitSet);
SetVolume(StartVolume);
}

void SetVolume(int Volume)
{
int MusesSet = -1*map(Volume, -223, 0, -239, -16);
MusesBitSet = MusesSet << 8 | Muses_1_Adr | Muses_VolumeSelect;
Serial.print(Volume*0.5); Serial.print("Left Channel db : BIN:");Serial.println(MusesBitSet, BIN);
Set_MUSES(MusesBitSet);
LastVolume = ActualVolume;
ActualVolume=Volume;
}

void Set_MUSES(word Volume)
{
digitalWrite(SlaveSelectPin, LOW); //MUSES LOW according datasheet
SPI.transfer(highByte(Volume));
SPI.transfer(lowByte(Volume));
digitalWrite(SlaveSelectPin, HIGH); // HIGH after Transmission ....
}


Maybe something is wrong here .....

Solved .... the SlaveSelectPin was wrong declared. Everything fine now ....

Sound of the chip so far disappointing ....
 
This is my prototype with the MUSES-Chip .....

P9f9FUH.jpg


The prototype is a revived old Nytech-PreAmp based on new Technology.

In my test setup with a modified LINN Accurate DS/1 there is a difference in playing direct from my streamer into my active crossover compared to the way through the PreAmp. There is definitely an influence of the chip in the sound ..... but we will see .... or better listen to the difference :) And I tested every single stage in the PreAmp by it's one how it influences the sound ......

But so far, I'm ok with the result .....
 
Last edited:
Yes it is impressive, but it is very susceptible to noise, esp with all those long wires, no shielding what so ever. Worst case scenerio, but it serves its purpose to prototype, get your code going before committing to a pcb. I am sure a proper layout will improve your results. Cheers
 
Yes it is impressive, but it is very susceptible to noise, esp with all those long wires, no shielding what so ever. Worst case scenerio, but it serves its purpose to prototype, get your code going before committing to a pcb. I am sure a proper layout will improve your results. Cheers

Code is running .....

I can show a draft layout for the PreAmp if you are interested .....

The idea is to setup a Motherboards with slots for ...

- Volume Control with Muses Chip
- Double Mono - Gain Boards based on old Nytech Schematics ...
- A DAC Board with SABRE ES9018 ...
- and a Pi to control everything .....

User Interface will be a black PlexiGlas Panel with Touch buttons and a touch controlled volume control slider.....
 
Last edited:
Code is running .....

I can show a draft layout for the PreAmp if you are interested .....

The idea is to setup a Motherboards with slots for ...

- Volume Control with Muses Chip
- Double Mono - Gain Boards based on old Nytech Schematics ...
- A DAC Board with SABRE ES9018 ...
- and a Pi to control everything .....

User Interface will be a black PlexiGlas Panel with Touch buttons and a touch controlled volume control slider.....
I am very interested in this project.
How can you adjust attenuation of the MUSES with Arduino? With a rotator, or...? I can't develop from your code.
Firstly I'd like to try MUSES with Arduino.
Thanks.
 
Sound of the chip so far disappointing ....

All the chip attenuators seem to be disappointing to a degree. It all depends on your reference. If it is a mechanical attenuator with silver switching surfaces using high quality resistors in a shunt or ladder configuration no chip stands a chance.

Yet, the attraction of simple packaging and easy control is strong. Even high end products use very dubious chips as attenuators. What would be interesting is a comparison to something known and established like a DS1666.
 
All the chip attenuators seem to be disappointing to a degree. It all depends on your reference. If it is a mechanical attenuator with silver switching surfaces using high quality resistors in a shunt or ladder configuration no chip stands a chance.

Yet, the attraction of simple packaging and easy control is strong. Even high end products use very dubious chips as attenuators. What would be interesting is a comparison to something known and established like a DS1666.

That's the reason, why I still think about to build a relay-based 128step volume control with Vishay Dale CMF55 Resistors .....
 
AX tech editor
Joined 2002
Paid Member
There is definitely an influence of the chip in the sound ..... but we will see .... or better listen to the difference :) And I tested every single stage in the PreAmp by it's one how it influences the sound ......

The question being, of course, which one is more accurate. Or which one you like more. Not necessarily the same.

Jan
 
AX tech editor
Joined 2002
Paid Member
What would be interesting is a comparison to something known and established like a DS1666.

The DS1666?? The worst level chip ever to leave a factory? You must be joking. They don't even dare to show a distortion graph in the data sheet. Everything looks better compared to a DS1666.

Some more info on those solid state ladder attenuators from Jeff Rowland:
Jeff Rowland :: Digital Volume Control: DACs versus the Crystal Semiconductor CS3310
A real tour de force for very high performance leaving nothing desired.

Jan
 
Last edited: