PGA2310 - Basic Stamp Troubles - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source

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 7th December 2004, 12:53 PM   #1
ALBQ is offline ALBQ  United States
diyAudio Member
 
Join Date: Dec 2003
Location: Albuquerque
Default PGA2310 - Basic Stamp Troubles

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
  Reply With Quote
Old 7th December 2004, 01:27 PM   #2
diyAudio Member
 
jackinnj's Avatar
 
Join Date: Apr 2002
Location: Llanddewi Brefi, NJ
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.
  Reply With Quote
Old 8th December 2004, 04:31 AM   #3
ALBQ is offline ALBQ  United States
diyAudio Member
 
Join Date: Dec 2003
Location: Albuquerque
Default 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/gilles...-MainPage.html
Attached Images
File Type: jpg pga2310-breadboard.jpg (47.3 KB, 236 views)
  Reply With Quote

Reply


Hide this!Advertise here!
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
6C33C tube stamp sphinx Tubes / Valves 4 6th January 2008 02:04 AM
PGA2310 and Basic Stamp not responding Xlrator Digital Source 5 23rd March 2006 12:23 PM
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
1394 time stamp Akh_Ind Digital Source 3 24th November 2003 01:08 PM


New To Site? Need Help?

All times are GMT. The time now is 10:51 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2