ΣSigmaStudio Ask AI Русский Log in

Master Control Port Runtime Sequential Write (ADAU145x)

SigmaDSP & SigmaStudio RitchRock Mar 13, 2017 00:00 8 replies Original on forum ↗
Subscribe
RitchRock Question
Mar 13, 2017 00:00

I'm in the process of making schematics/PCB for my system, which includes the ADAU1452 and an ADC with built in PGAs that can be programmed via I2C. It would be very convenient to use the ADAU1452 Master Control Port to setup this ADC via I2C and do some sequential writes during runtime. This all seems possible according to the wiki: Master Control Port (ADAU145X) [Analog Devices Wiki]

The documentation states:

The master control port Runtime Sequential write block allows communication with external devices during the audio processing. Typically this block is used to configure an external device like a converter or codec. Communication over the master control port bus (I2C/SPI) occurs during the audio processing. The data transferred between host and device is defined in a SigmaStudio sequence file which can be generated using the SigmaStudio sequence window.

Great! I've read through the links and understand how to drag and drop commands from the capture window to define a sequence. This is straightforward, however I still can't figure out how I would send the I2C commands to configure my converter using this. What operation would I need to define? For example, how would I define an operation to write to a specific register on my ADC? Is there an example of how this might be accomplished?

Audio Signal Processors

adau1452

master control port

adau1452 sigmastudio

sigmastudio

SigmaDSP Audio Processors

Show More

ADIApproved Reply
Mar 13, 2017 00:00

Hi,

Which ADC are you trying to configure using I2C?

You have to create a sequence file for the ADC with register addresses and the data.

Then you have to provide the sequence file to the module

Thanks,

Venky

3d6d20770d2ce617c617a91a8b7ba462.png
3d6d20770d2ce617c617a91a8b7ba462.png
3d6d20770d2ce617c617a91a8b7ba462.png-611x152.png
3d6d20770d2ce617c617a91a8b7ba462.png-611x152.png
RitchRock Reply
Mar 14, 2017 00:00

Hi Venky and thanks for the reply. Yes, that is how I would do it, however what is the specific operation or command in the sequence file that writes the data to the registers?

I am using the TI PCM1865, which I can successfully program and control with a separate uProc via I2C, but like I mentioned, it would really be nice to use the ADAU1452 if possible.

Thanks,

C

RitchRock Reply
Mar 15, 2017 00:00

I had another look and I may have been making this more complicated than it is! I'm guessing 'address' would be the register to write to, since the device address is defined in the Control Port Block?

a8f5aa4a96a1a04a60ef4d65f079cb2a.png
a8f5aa4a96a1a04a60ef4d65f079cb2a.png
a8f5aa4a96a1a04a60ef4d65f079cb2a.png-620x134.png
a8f5aa4a96a1a04a60ef4d65f079cb2a.png-620x134.png
ADIApproved Reply
Mar 15, 2017 00:00

Sequence window is meant for ADI codecs supported by SigmaStudio. I suggest you edit the sequence file I have attached for your ADC instead of using sequence window.

Please follow the steps below to edit the XML for your ADC.

1. Edit IC, IC_Address and Address_byte_length fields in xml.

Please note that IC_Address should be 8-bit I2C address in decimal format. Address_byte_length in bytes.

2. Add your register writes as shown below.

Please match all the fields as follows.

instr => "writeXBytes"

len => Data Length in bytes+ Address_byte_length

addr => Register Address in decimal (not hexadecimal)

Then the value part should have the register values in Hexadecimal. A space should separate each data as shown in the example.

In this example len => 6 (data length) + 2 (Address_byte_length) = 8

3. You can add delays as shown below.

Delay is in milliseconds (Hexadecimal Format)

The sequence of register writes will happen in the order it is kept in the XML.

Thanks,

Venky

a79ed9dd68062f72a5bd615066bb906c.png
a79ed9dd68062f72a5bd615066bb906c.png
a79ed9dd68062f72a5bd615066bb906c.png-460x61.png
a79ed9dd68062f72a5bd615066bb906c.png-460x61.png
5d238cbc6324574ea02d78b33b359023.png
5d238cbc6324574ea02d78b33b359023.png
5d238cbc6324574ea02d78b33b359023.png-757x17.png
5d238cbc6324574ea02d78b33b359023.png-757x17.png
35993b674cf8b8761b9b2f1b65963537.png
35993b674cf8b8761b9b2f1b65963537.png
35993b674cf8b8761b9b2f1b65963537.png-530x19.png
35993b674cf8b8761b9b2f1b65963537.png-530x19.png
RitchRock Reply
Mar 16, 2017 00:00

This is very helpful. I really appreciate it. Thanks so much Venky!

RitchRock Reply
Mar 16, 2017 00:00

Is it possible to use a parameter value from SigmaStudio as the register value?

ADIApproved Reply
Mar 17, 2017 00:00

yes. You can use parameter values in the sequence file.

Trunta Reply
May 17, 2020 00:00

I realize this is a 3 year old thread, but could you please explain how parameter value is used in the sequence file. I have been trying for weeks and can't get it to works. I even asked the question here but have received no answer: ez.analog.com/.../master-control-port-runtime-sequential-write---dynamic-value