The number displayed onscreen is the data value sent back from the DSP considering all the blocks to the left of the Readback block. Every time you click Read, this value will be updated with the latest from the DSP. By displaying the output value from any block, in any format desired, Readback is used extensively for debugging. Readbacks can also be used to hold values for a microcontroller to access over the control port.
Values can be read back in either hex or decimal. For the latter, you must specify what format you want the number to be displayed in. The default for 1st generation SigmaDSPs (including AD1940, AD1941, ADAU1701, ADAU1702, ADAU1401) is 5.19: 5 bits for the integer, 19 for the decimal. Any changes to this format will shift the decimal value of the number displayed.
Second-generation SigmaDSPs like the ADAU1761, ADAU1781, and ADAU1442 are able to read back in full 28-bit (5.23) accuracy.
Third-generation SigmaDSPs, such as ADAU1452, ADAU1466, and ADAU1467 are able to read back in full 32-bit (8.24) accuracy.
See here for more information about the numeric formats used in SigmaDSP.
For a sample design using this block, see the Basic DSP example.
For some examples of using this cell to check the peak or RMS level of a signal, please see this EngineerZone forum FAQ: Monitoring average and instantaneous signal levels
The DSP Readback cell can be configured to read back from the target DSP repeatedly at regular intervals. To enable this mode, right-click the cell and select Start Continuous Read.
You can also click the small circle in the cell to enable or disable Continuous Read mode. When the circle is blue, Continuous Read mode is active. When the circle is orange, Continuous Read mode is inactive.
When Continuous Read mode is active, you can change the update rate by right-clicking on the cell and selecting from a list of options. Selecting a slower update rate will allow you to have more readback cells operating at the same time, and will lower the chances of a buffer underrun error on the USB interface.
The following assumes you have a working microcontroller platform, with SigmaDSP interface code based on Interfacing SigmaDSP Processors with a Microcontroller.
The Readback block has a single read-only address which holds the value from the input pin. The value is updated with each audio sample. You can read the value and decode to float:
double readback_val = SIGMA_READ_REGISTER_FLOAT(MOD_READBACK1_READBACKALGNEWSIGMA3001VALUE_ADDR);
Retain the integer representation:
int32_t readback_val = SIGMA_READ_REGISTER_INTEGER(MOD_READBACK1_READBACKALGNEWSIGMA3001VALUE_ADDR, 4);
Or simply print the value to the serial port; great for debugging.
VALUE AT 0x35: 0x01 00 00 00