PGA2320: control issue - diyAudio
Go Back   Home > Forums > Design & Build > Parts

Parts Where to get, and how to make the best bits. PCB's, caps, transformers, 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 May 2010, 05:25 PM   #1
diyAudio Member
 
Join Date: Feb 2005
Location: Southern France
Default PGA2320: control issue

Hi all,

I have designed a DAC board with a PCM1794, a PGA2320 for volume control...

Anyway, here is my problem. I can't seem to make the PGA2320 work and I'm suspecting that it is due to the control of the /CS pin.

For simplification reasons, I just tied the /CS pin of the PGA2320 to ground, thinking that it would be ok because the SPI bus I'm using is only used to control this chip.

Apparently it doesn't work. Looks like the new gain settings will be effective only after /CS goes back to HIGH, which IS NOT clearly documented in the datasheet.

Anybody can confirm this please? (Now if this is the problem, I'll have to butcher my nicely made PCB to be able to control the /CS pin...)

Thanks to anybody with experience with this chip!
  Reply With Quote
Old 22nd May 2010, 06:01 PM   #2
diyAudio Member
 
theAnonymous1's Avatar
 
Join Date: Feb 2004
Location: Anonymityville
I don't have the answer you are looking for, but I can tell that the two different PGA23xx based circuits I have used both have the CS pin connected to the uC, not directly to ground.

You can have a look at the source code for this project and maybe see what he did with the CS pin.....

MiniVol PGA2320 Volume Control - error404's Audio DIY Endeavours
  Reply With Quote
Old 23rd May 2010, 11:06 AM   #3
diyAudio Member
 
Join Date: Feb 2005
Location: Southern France
Thanks.

Indeed the /CS pin goes low before sending data and back to high afterwards.

It's probably when it goes back to high that the gain settings are actually applied, but it was not clear from the datasheet. The latter just says that you can only write data when /CS is low...

Now I should have suspected something, because it says that the /MUTE pin going low when /CS is low only triggers a mute condition when /CS goes back to high. But that was not obvious. Even for the mute condition, what happens if we are sending data to the chip and put /MUTE to low? When /CS is put back to high, will the gain settings be stored or not (and applied if /MUTE goes back to high)?

I should probably ask that to TI? I have no experience asking them for technical questions, do you think someone will even answer?
  Reply With Quote
Old 23rd May 2010, 12:29 PM   #4
diyAudio Member
 
metal's Avatar
 
Join Date: Jan 2004
Your approach is just incorrect.. What language do you use, and what micro?
  Reply With Quote
Old 24th May 2010, 10:08 AM   #5
diyAudio Member
 
Join Date: Feb 2005
Location: Southern France
My approach is incorrect? How so?

I'm using a dsPIC33, but that's probably not the problem here.
  Reply With Quote
Old 24th May 2010, 10:17 AM   #6
diyAudio Member
 
metal's Avatar
 
Join Date: Jan 2004
Don't make CS low unless you want to send data so it's high-low-high sequesnce, otherwise, every change on the line will be considered a bit of data if you leave CS low all the time. Can you show us some code so others can help?

When PGA starts, it's muted, and only works when new word is sent to it. There might you have a problem in your code when sending data.
  Reply With Quote
Old 24th May 2010, 10:34 AM   #7
diyAudio Member
 
Join Date: Feb 2005
Location: Southern France
I was aware of that, and I'm using SPI in master mode. I'm pretty sure the SPI clock is active only when I send data to the PGA2320.

The only thing I overlooked is the clock edge on which data changes. It was configured for rising edge in the PIC, but the PGA2320 samples data on the rising edge, so that may not work. I'll try changing that before soldering an additional wire on my PCB.
  Reply With Quote
Old 24th May 2010, 11:42 AM   #8
diyAudio Member
 
metal's Avatar
 
Join Date: Jan 2004
Look at the datasheet: data must change at the falling edge, and PGA reads it at the rising edge.
  Reply With Quote
Old 24th May 2010, 12:04 PM   #9
diyAudio Member
 
Join Date: Feb 2005
Location: Southern France
Yes. I'll try that. But not being able to control /CS may still make it hard to synchronize the data transfer, depending on the state of the SPI lines at power-up.

So I'll try, but I guess I will eventually have to control /CS. Something I overlooked... my bad.
  Reply With Quote
Old 2nd June 2010, 08:21 PM   #10
diyAudio Member
 
Join Date: Feb 2005
Location: Southern France
OK. Just a quick follow-up.

Now that I control /CS, the chip works as expected. End of the story.
  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
PGA2310 vs. PGA2320 error401 Chip Amps 3 29th December 2011 08:51 AM
My RF controled PGA2320 MiniVol and ch selector quadtech Analog Line Level 1 8th February 2011 06:11 PM
Yamaha RX-V1 Volume Control Issue tone2222 Solid State 2 24th August 2010 08:22 PM
FS: PGA2320 Digital Volume Control IC (100pcs) theAnonymous1 Swap Meet 5 2nd November 2009 05:30 PM
PGA2320: anyone? AudioWizard Parts 2 20th July 2005 03:39 PM


New To Site? Need Help?

All times are GMT. The time now is 02:48 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