All,
I am having trouble setting the gain on a Ti PGA2310 digital volume control using a basic stamp. Whether I just punch in a control word (2x8bit words L/R = 16bit lsbfirst) or count up/dwn in binary, cannot get full 255 steps. Looks like chip only has output when lsb's are 01 (1) or 11 (3). I think is wired/programmed correctly because can indivdually control channels (right =111/left=000 - as example) so, appears to have complete 16bit control code. I tried two different chips with same result. Any suggestions? - Note that audio output, etc.. works fine, just ship not accepting full range of gain settings
Thanks -ALBQ
I am having trouble setting the gain on a Ti PGA2310 digital volume control using a basic stamp. Whether I just punch in a control word (2x8bit words L/R = 16bit lsbfirst) or count up/dwn in binary, cannot get full 255 steps. Looks like chip only has output when lsb's are 01 (1) or 11 (3). I think is wired/programmed correctly because can indivdually control channels (right =111/left=000 - as example) so, appears to have complete 16bit control code. I tried two different chips with same result. Any suggestions? - Note that audio output, etc.. works fine, just ship not accepting full range of gain settings
Thanks -ALBQ
for the BS-II, if you set the volume on both channels as a WORD variable, use the following routine -- bring the Chip Select Pin Low, shiftout, using MSB first all 16 bits, bring the Chip Select High.
or you can use SHIFTOUT twice ifyou use 2-BYTES, once for RIGHT, once for LEFT, just don't bring the ChipSelect Pin High. Pausing to send another SHIFTOUT just holds up the clock and the PGA2310 shouldn't mind.
In both cases, bring CS high after the data is sent.
Make sure that you have 10k resistors from the CLK, CS and Dout pins to ground on the stamp, they don't like to float.
or you can use SHIFTOUT twice ifyou use 2-BYTES, once for RIGHT, once for LEFT, just don't bring the ChipSelect Pin High. Pausing to send another SHIFTOUT just holds up the clock and the PGA2310 shouldn't mind.
In both cases, bring CS high after the data is sent.
Make sure that you have 10k resistors from the CLK, CS and Dout pins to ground on the stamp, they don't like to float.
Duh - That's got it!
jackinnj,
Thank you for the help. Duh - had shiftout set to lsbfirst. Also, attached is code segment w/back of napkin BS2 gain formula and serial LCD output. Additionally, this is a really great sounding chip - compares very well with higher end Burr-Brown ops amps I have heard - very cool
Thank you again, - ALBQ
code segment:
setting = abs((1 */ 8064) - (128 - abs(128 */ volume)))
low 6
pause 10
shiftout 7, 8, msbfirst, [volume\8,volume\8]
pause 10
high 6
serout 0,baud,[i,192, "Volume="]
serout 0,baud,[i,201, "-", dec setting,".",dec1 setting,"dB"]
http://mywebpages.comcast.net/gillespie147/AlbuquerqueAudio-MainPage.html
jackinnj,
Thank you for the help. Duh - had shiftout set to lsbfirst. Also, attached is code segment w/back of napkin BS2 gain formula and serial LCD output. Additionally, this is a really great sounding chip - compares very well with higher end Burr-Brown ops amps I have heard - very cool
Thank you again, - ALBQ
code segment:
setting = abs((1 */ 8064) - (128 - abs(128 */ volume)))
low 6
pause 10
shiftout 7, 8, msbfirst, [volume\8,volume\8]
pause 10
high 6
serout 0,baud,[i,192, "Volume="]
serout 0,baud,[i,201, "-", dec setting,".",dec1 setting,"dB"]
http://mywebpages.comcast.net/gillespie147/AlbuquerqueAudio-MainPage.html
Attachments
- Status
- Not open for further replies.