Sony AV Receiver Volume
Joe T
Posts: 10
Hello,
I am working on a comm module for a sony STR-DA5300ES av receiver. I am stuck on the volume feedback.
The front panel of the device shows volume db in the range from -infinity to +23. The data from the comm port is two bytes, Volume Step High and Volume Step Low.
Volume Step High matches the display for positive numbers, 128 for -infinity, one step up is 164 for -92, 255 for -1.
Volume Step Low is 0 for .0, 128 for .5.
What kind of data is this? A Float? Sinteger? Ultimately I woluld lke to convert it to a level value 0 to 255.
I got the protocol here: http://www.amxforums.com/showthread.php?t=3065
Thanks,
Joe
I am working on a comm module for a sony STR-DA5300ES av receiver. I am stuck on the volume feedback.
The front panel of the device shows volume db in the range from -infinity to +23. The data from the comm port is two bytes, Volume Step High and Volume Step Low.
Volume Step High matches the display for positive numbers, 128 for -infinity, one step up is 164 for -92, 255 for -1.
Volume Step Low is 0 for .0, 128 for .5.
What kind of data is this? A Float? Sinteger? Ultimately I woluld lke to convert it to a level value 0 to 255.
I got the protocol here: http://www.amxforums.com/showthread.php?t=3065
Thanks,
Joe
0
Comments
If you do a google search under "two's complement" it will give you an idea of how negative numbers are represented in Hex or Binary.
Here's an example:
Convert the decimal number from the queue to binary, then take the complement (subtract each bit from 1), then add +1, then convert it back to decimal.
E.G.:
-92 volume on dial gives you feedback of 164 in queue.
164 = 1010 0100 (* using the two's complement, the left most bit is the sign bit where '1' indicates a negative number*)
Convert it back to decimal,
0101 1100 = 92. Since the original sign bit was negative, 164 represents -92.
________________________________________
Using 255 as the other number you received from the queue:
255 = 1111 1111 (the leftmost '1' indicates the number is negative)
Take the complement:
--John
The AMX module uses a [101][2] cross reference chart for volume levels, rather than calculating.
Thanks for the reply. Not only did you answer my question, but also took the time to post an example of how to do the conversion.
Again thanks for your time
Turnip,
I started with the da7 comm module but, with the amount of overide code (using passthru)needed in the UI module (inputs, soundfields, tuner presets) I thought I would bite the bullet and write my own module. and the feedback was so bad (volume at -infinity would report volume 100, and as you mentioned +db dosen't work). I would never turn it up that loud It just seemed the way to go.
Thanks for th replies,
Joe