PGA2310 and BS2 help
I have a PGA2310 Stereo Audio Volume Control socketed on a perfboard and connected to my HomeworkBoard according to the datasheet, but I still cannot get any response from it. With the code below I am trying to send straight binary to it. 16 bits, the first 8 for Right channel and last 8 for Left channel. I also tried the sending the 8 bits seperately.
volume_1 = %00011001 'channels step #25
LOW 7
PAUSE 10
SHIFTOUT 6, 5, MSBFIRST, [noparse][[/noparse]volume_1\8,volume_1\8]
PAUSE 10
HIGH 7
Should it work this way or am I misunderstanding something? Or do I need to check my perfboard for the 50th time?
The datasheet can be found here: focus.ti.com/docs/prod/folders/print/pga2310.html#technicaldocuments
volume_1 = %00011001 'channels step #25
LOW 7
PAUSE 10
SHIFTOUT 6, 5, MSBFIRST, [noparse][[/noparse]volume_1\8,volume_1\8]
PAUSE 10
HIGH 7
Should it work this way or am I misunderstanding something? Or do I need to check my perfboard for the 50th time?

The datasheet can be found here: focus.ti.com/docs/prod/folders/print/pga2310.html#technicaldocuments
' {$STAMP BS2}
' {$PBASIC 2.5}
volume_1 VAR Word
volume_2 VAR Word
volume_3 VAR Word
DIRL = %11100000
DO
volume_1 = %0001100100011001 'both channels step #25
LOW 7
PAUSE 10
SHIFTOUT 6, 5, MSBFIRST, [noparse][[/noparse]volume_1\16]
PAUSE 10
HIGH 7
PAUSE 2000
volume_2 = %0100101101001011 'both channels step #75
LOW 7
PAUSE 10
SHIFTOUT 6, 5, MSBFIRST, [noparse][[/noparse]volume_2\16]
PAUSE 10
HIGH 7
PAUSE 2000
volume_3 = %0110010001100100 'both channels step #100
LOW 7
PAUSE 10
SHIFTOUT 6, 5, MSBFIRST, [noparse][[/noparse]volume_3\16]
PAUSE 10
HIGH 7
PAUSE 2000
LOOP

Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Do you have the chip in upside down? And how are you connectiong the +VA and -VA of the chip?
And if you are uisng electrolitic capacitors make sure they aren't in backwards.
Heres is some code that I used
'{$STAMP BS2e} '{$PBASIC 2.5} '{$PORT COM1} '------------------Constants-------------------- ZCEN PIN 15 'zero crossing active high CS PIN 14 'chip select active low SDI PIN 13 'serial data input SCLK PIN 10 'serial clock input Mute PIN 8 'mute active low zero CON 0 '----------------Variables---------------------- Channel VAR Word right VAR channel.HIGHBYTE left VAR channel.LOWBYTE '-----------------PROGRAM----------------------- Startup: HIGH ZCEN HIGH MUTE HIGH CS DEBUG CLS, "ch_R>>......... ", CR, "ch_L>>......... ", CR '-----------------PROGRAM----------------------- Main: LOW CS right= 6 'can be set from 0 TO 255 left= 6 'can be set from 0 TO 255 SHIFTOUT SDI, SCLK, MSBFIRST,[noparse][[/noparse]Channel/16] HIGH CS DEBUG CRSRXY, 15, 3, DEC right, CLREOL, CRSRXY, 15, 4, DEC left, CLREOL, CRSRX ,0Now it's time to work with the rotary encoder!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com