Master Control Port Runtime Sequential Write (ADAU145x)
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
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
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
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?
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
This is very helpful. I really appreciate it. Thanks so much Venky!
Is it possible to use a parameter value from SigmaStudio as the register value?
yes. You can use parameter values in the sequence file.
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
Please log in to reply.









