Go Back   Home > Forums > Source & Line > Digital Source
Home Forums Rules Articles Store Gallery Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 22nd March 2006, 03:12 AM   #1
Xlrator is offline Xlrator  United States
diyAudio Member
 
Join Date: Jan 2006
Location: Illinois
Default PGA2310 and Basic Stamp not responding

I have a PGA2310 Stereo Audio Volume Control socketed on a perfboard and connected to my Basic Stamp 2 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 this method:

volume_1 = %00011001 'channels step #25
LOW 7
PAUSE 10
SHIFTOUT 6, 5, MSBFIRST, [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.

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, [volume_1\16]
PAUSE 10
HIGH 7
PAUSE 2000

volume_2 = %0100101101001011 'both channels step #75
LOW 7
PAUSE 10
SHIFTOUT 6, 5, MSBFIRST, [volume_2\16]
PAUSE 10
HIGH 7
PAUSE 2000

volume_3 = %0110010001100100 'both channels step #100
LOW 7
PAUSE 10
SHIFTOUT 6, 5, MSBFIRST, [volume_3\16]
PAUSE 10
HIGH 7
PAUSE 2000

LOOP
  Reply With Quote
Old 22nd March 2006, 03:17 AM   #2
paulb is offline paulb  Canada
diyAudio Member
 
Join Date: Jun 2001
Location: Calgary
Can you get access to a digital scope? It's always nice to see the bits coming out.
  Reply With Quote
Old 22nd March 2006, 06:36 AM   #3
Xlrator is offline Xlrator  United States
diyAudio Member
 
Join Date: Jan 2006
Location: Illinois
I don't have a scope, but is there PC software that can do that?
  Reply With Quote
Old 23rd March 2006, 03:29 AM   #4
Xlrator is offline Xlrator  United States
diyAudio Member
 
Join Date: Jan 2006
Location: Illinois
I had a bad pad on cheap RatShack board. Those things get loose with the slightest amount of heat. It was shorting out when it was in it's housing. It is working alright, now. Just have to figure out to get it to step with my rotary encoder.

BTW, I am interested if anyone has a reccomendation for a DIY PC oscilliscope.
Attached Images
File Type: jpg p1000119.jpg (85.4 KB, 164 views)
  Reply With Quote
Old 23rd March 2006, 10:42 AM   #5
ALBQ is offline ALBQ  United States
diyAudio Member
 
Join Date: Dec 2003
Location: Albuquerque
Default PGA2310

Xlrator,
At a glance, the code segments and timing look correct. My first though would be to make sure you have everything connected correctly. You can do this by eye and by extending the delay times in your code, you can check the signals using a meter. See attached thread for a working example. If still problems, private mail me and I will help.
Good luck -ALBQ

DIY Remote Control for Everyone

gillespie147 (at) comcast (dot) net
  Reply With Quote
Old 23rd March 2006, 12:23 PM   #6
diyAudio Member
 
jackinnj's Avatar
 
Join Date: Apr 2002
Location: Llanddewi Brefi, NJ
one thing which the Stamp (or the BX24, or PICs like the PIC 16F84) likes is to NOT allowing any of the data pins to float, and for noise reasons, it is wise to decouple the data lines (Clock, Chip Enable and SDO) with resistors. I have used 10k resistor arrays for this.

Instead of the value MSBFIRST try using the numeric 1.

Have you used the deboogger to look at the data lines -- interesting D*E*B*U*G is a prohibo in DIYAUDIOLAND

since you don't have a scope, you can attach a 270R resistor to a LED on each of the data lines and make sure that they are doing what they are supposed to be doing -- just insert PAUSE 250 statements.

also -- devices like ADC's DAC's and digital pots can be a bit squirrely on wiring and deocupling and groundplanes -- make sure that the power pins on the PGA2310 are decoupled with 100nF ceramic caps.
  Reply With Quote

Reply


Hide this!Advertise here!

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LC Audio is not responding with support BMW850 Class D 3 25th November 2010 02:01 PM
PGA2310 - Basic Stamp Troubles ALBQ Digital Source 2 8th December 2004 04:31 AM
Basic Stamp Forums starting up at Parallax jackinnj Solid State 0 26th July 2004 08:12 PM
PGA2310 + BASIC stamp HooRide Digital Source 4 20th April 2004 07:05 AM


New To Site? Need Help?

All times are GMT. The time now is 05:50 AM.

Page generated in 0.08534 seconds (77.27% PHP - 22.73% MySQL) with 11 queries

Copyright ©1999-2012 diyAudio