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?![confused.gif](http://forums.parallax.com/images/smilies/confused.gif)
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?
![confused.gif](http://forums.parallax.com/images/smilies/confused.gif)
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
Now it's time to work with the rotary encoder!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com