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

SigmaDSP level meter readout via I2C

SigmaDSP & SigmaStudio ElmarJ Jun 1, 2016 00:00 3 replies Original on forum ↗
Subscribe
ElmarJ Question
Jun 1, 2016 00:00

Hi,

I am trying to readout some level detectors from my ADAU1702 via the host processor, but I cannot find enough documentation to help me further. I found two interesting topics:

DSP read back for data capture

Monitoring average and instantaneous signal levels

What I want to achieve:

- Host MCU reads out current and average RMS value of a level meter.

- Host MCU further processes it to a level in dB.

First problem is the most important now.

I made a schematic with a Single Band Level Detector in it, connected to an audio stream.

Link/compile/download / download to EEPROM

Turn on level meter once connected with USBi; log data with Logic Analyzer

Analyze data stream and try to copy

Step 3 is getting interesting, this is what my I2C bus does while reading out the level meters:

W68, 08, 1A, 04, 4E

W68, 08, 1A, R68, 00, 00, 14

First line:Write to 0x68 (I2C slave address), register 0x081A: Data capture reg, data= 0x044E

Second line:Readout data from reg 0x081A, 0x000014

I expect that the last value (0x000014) is one of the volumes, but I can not really correlate it.

Can somebody tell me at which PC to read out the actual volume and the envelope, and how to correlate this with the .params file?

Can somebody tell me how to the read value to dB's?

Below:

Data from my compiledDSP image, the .params file.

Cell Name
= Level2

Parameter Name
= SingleBandLevelDetwOutDisplay2ndGen5TCONST

Parameter Address = 51

Parameter Value = 0.00240135192871094

Parameter Data :

0x00 , 0x00 , 0x4E , 0xB0 ,

Cell Name
= Level2

Parameter Name
= SingleBandLevelDetwOutDisplay2ndGen5hold

Parameter Address = 52

Parameter Value = 480

Parameter Data :

0x00 , 0x00 , 0x01 , 0xE0 ,

Cell Name
= Level2

Parameter Name
= SingleBandLevelDetwOutDisplay2ndGen5decay

Parameter Address = 53

Parameter Value = 0.000216960906982422

Parameter Data :

0x00 , 0x00 , 0x07 , 0x1C ,

Cell Name
= Level2_2

Parameter Name
= SingleBandLevelDetwOutDisplay2ndGen6TCONST

Parameter Address = 54

Parameter Value = 0.00240135192871094

Parameter Data :

0x00 , 0x00 , 0x4E , 0xB0 ,

Cell Name
= Level2_2

Parameter Name
= SingleBandLevelDetwOutDisplay2ndGen6hold

Parameter Address = 55

Parameter Value = 480

Parameter Data :

0x00 , 0x00 , 0x01 , 0xE0 ,

Cell Name
= Level2_2

Parameter Name
= SingleBandLevelDetwOutDisplay2ndGen6decay

Parameter Address = 56

Parameter Value = 0.000216960906982422

Parameter Data :

0x00 , 0x00 , 0x07 , 0x1C ,

Audio Signal Processors

adau1702

SigmaDSP Audio Processors

ElmarJ Reply
Jun 1, 2016 00:00

Forgot to mention:

- I did copy the I2C streams to my host, and I can read out some numbers. I cannot find how to use the generated files to find the addresses of the levelmeters; I connat find the different locations for the settings (avg, peak etc).

My clients are now waiting for this,

chefmech Reply
Oct 30, 2016 00:00

In the help you find some information about calculating the value:

369683bde7717090709fe6cff6e512d2.png
369683bde7717090709fe6cff6e512d2.png
369683bde7717090709fe6cff6e512d2.png-620x265.png
369683bde7717090709fe6cff6e512d2.png-620x265.png
chefmech Reply
Oct 30, 2016 00:00

Could you read the data from the RTA successfully?

I can read from address, 11, 12 and 13 and get the right values.

Reading from address 14 I always get [0000].

I also tried to write a 0x044E to address 14 first, but I still get back 0.

ba2e3a4fa14aa5827d1187f76bb3ee66.png
ba2e3a4fa14aa5827d1187f76bb3ee66.png
ba2e3a4fa14aa5827d1187f76bb3ee66.png-620x319.png
ba2e3a4fa14aa5827d1187f76bb3ee66.png-620x319.png