Readback block data format
I have a DC block in 5.23 format connected to a readback block whose default format is 5.19. I can change the format of the readback block in SigmaStudio to 1.23. However, when I write a 5.23 value to the DC block and read it back (supposedly in 1.23 format), the 4 LSBs are truncated as if the readback format were still 5.19. I am doing the reads under control of my microcontroller.
Is there something I'm missing? Here's my project:
Hello,
The truncation happens inside the ADAU1701 itself (see its data sheet, page 38). Thus the lower bits are already truncated before they get to SigmaStudio or your microcontroller -- so neither can recover them regardless of the Readback block's format setting. To be sure of getting all the lowest bits, multiply the Readback block's input by 16 as shown:
Of course, this limits the available number range to + 0.9999 -- -1.00 decimal, but now the lowest 4 bits are covered. Since the 1701's Readback register is only 24 bits wide instead of 28, you're going to lose four bits on either the MSB or LSB.
Best regards,
Bob
Thanks for the explanation, and it works as you describe. Still, looking at the signal graph, it seems counter-intuitive that -1.0*16=-1.0.
So if I add gain of 16 to my original graph as shown below, what value gets sent to the DAC?
This is the head-hurting part of SigmaDSP: it sends LSBs (1.23) to the DACs by tossing out the MSBs (datasheet pg. 29), but reads back MSBs (5.19). So you don't want that *16 function in your audio path (which would clip it), just your readback path. Don't even ask me how long it took me to figure that out
Thanks, that's how I read p. 29 of the datasheet as well (Numeric formats). Many thanks to you and to KJBob for illuminating this for me.
I will try to mark both your answers as correct.
John
Please log in to reply.





