cs3318 and arduino - diyAudio
Go Back   Home > Forums > Source & Line > Analog Line Level

Analog Line Level Preamplifiers , Passive Pre-amps, Crossovers, 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 February 2012, 04:04 AM   #1
diyAudio Member
 
linuxworks's Avatar
 
Join Date: Jul 2008
Location: santa clara, CA
Default cs3318 and arduino

I'm starting my journey on the new (to me) cs3318 8-channel analog volume control chip.

for the last 2 years or so, I have been using singles and pairs of pga23xx chips and now I'm going to give the cirrus 8ch chip a try.

today, I soldered that expensive chip onto a schmartboard:

Click the image to open in full size.

and since this chip is 3.3v based and my arduino is native-5v based, I'll need i2c level conversion:

Click the image to open in full size.

I'm using my Volu-Master code base (newer version of what is on AMB.org's website for the LCDuino and alpha10 preamp). since the cirrus chip works very similarly to the pga, it should be a few lines of code change to at least be able to control the master1 fader group (in theory..)

will continue as progress is made...
__________________
My Photostream:http://www.flickr.com/photos/linux-works/
  Reply With Quote
Old 7th February 2012, 08:25 AM   #2
diyAudio Member
 
jan.didden's Avatar
 
Join Date: May 2002
Location: Great City of Turnhout, Belgium
Blog Entries: 7
I'm using a CS3318 in my DCX2496 output mod. So if needed I can probably answer questions on driving it when they come up.
At the time I was stilll programming in assembly so the code is probably not very usefull.
Are you aware of the dummy register writes you have to do to overcome a firmware error? Don't know if it has been solved in the chip at the moment but I still do it.

jan didden
__________________
If you don't change your beliefs, your life will be like this forever. Is that good news? - W. S. Maugham
Check out Linear Audio!
  Reply With Quote
Old 7th February 2012, 09:15 AM   #3
Turbon is offline Turbon  Sweden
diyAudio Member
 
Turbon's Avatar
 
Join Date: Aug 2011
Location: South
Quote:
Originally Posted by janneman View Post
I'm using a CS3318 in my DCX2496 output mod. So if needed I can probably answer questions on driving it when they come up.
At the time I was stilll programming in assembly so the code is probably not very usefull.
Are you aware of the dummy register writes you have to do to overcome a firmware error? Don't know if it has been solved in the chip at the moment but I still do it.

jan didden
Jan, why would assembly be a bad choice and unusable today?

Brgds
__________________
These are my principles, and if you don't like them... well, I have others.
  Reply With Quote
Old 7th February 2012, 11:28 AM   #4
diyAudio Member
 
Join Date: Dec 2009
Location: INDIA
I am also interested in it, however to avoid complexity i will be driving it with PIC24 series PIC , which is 3.3v driven.
Probably will need many help related to this . i am new in the digital control .
  Reply With Quote
Old 7th February 2012, 12:12 PM   #5
diyAudio Member
 
jan.didden's Avatar
 
Join Date: May 2002
Location: Great City of Turnhout, Belgium
Blog Entries: 7
Quote:
Originally Posted by Turbon View Post
Jan, why would assembly be a bad choice and unusable today?

Brgds
No it's not a bad choice at all, it's just that for occasional use (not using it on a daily basis) it's not easy to maintain your proficiency.
I now do all my programming on PICs using Flowcode, which is a graphical programming interface on top of C. Works great and has a very shallow learning curve, which is great for occasional use.

jan
__________________
If you don't change your beliefs, your life will be like this forever. Is that good news? - W. S. Maugham
Check out Linear Audio!
  Reply With Quote
Old 7th February 2012, 03:29 PM   #6
ds23man is offline ds23man  Netherlands
diyAudio Member
 
Join Date: Oct 2006
Quote:
Originally Posted by janneman View Post
Are you aware of the dummy register writes you have to do to overcome a firmware error? Don't know if it has been solved in the chip at the moment but I still do it.

jan didden
http://www.digikey.com/Web%20Export/...f?redirected=1

Regards Gerhard
  Reply With Quote
Old 7th February 2012, 03:50 PM   #7
diyAudio Member
 
linuxworks's Avatar
 
Join Date: Jul 2008
Location: santa clara, CA
Quote:
Originally Posted by janneman View Post
Are you aware of the dummy register writes you have to do to overcome a firmware error? Don't know if it has been solved in the chip at the moment but I still do it.

jan didden

have not gotton that far yet. can you give more detail on that issue? does the chip lock up somehow or is this the method they describe known as 'aborted writes' in order to execute a read command?

I'm not even sure I need to do reads. why do you need to read anything? the whole chip is write-oriented and seems like you can fully control it via write-only CSRs.
__________________
My Photostream:http://www.flickr.com/photos/linux-works/
  Reply With Quote
Old 7th February 2012, 03:53 PM   #8
diyAudio Member
 
linuxworks's Avatar
 
Join Date: Jul 2008
Location: santa clara, CA
Quote:
Originally Posted by Turbon View Post
Jan, why would assembly be a bad choice and unusable today?

Brgds
my take is that its too much work and the compilers are so good at optimizing, its rarely needed to do assembler anymore.

for high speed things, sometimes it makes sense; but for example, the arduino code that actually follows the 38k IR signal, bit by bit, is a pure C code software routine. no hardware help was needed other than setting a hardware timer inside.

my whole last project was about 12,000 lines of C code. no way would I ever consider doing that much end coding in assembler! I shudder to think of how many assembler lines that would have been!
__________________
My Photostream:http://www.flickr.com/photos/linux-works/

Last edited by linuxworks; 7th February 2012 at 04:06 PM.
  Reply With Quote
Old 7th February 2012, 03:57 PM   #9
diyAudio Member
 
linuxworks's Avatar
 
Join Date: Jul 2008
Location: santa clara, CA
Quote:
Originally Posted by ds23man View Post
aha! so that's what the issue was.

I did not notice this until you pointed it out

I went all up and down the main data sheet but I guess cirrus did not think it was 'worth the effort' to updat their MAIN data sheet. wow.

thanks!
__________________
My Photostream:http://www.flickr.com/photos/linux-works/
  Reply With Quote
Old 7th February 2012, 03:58 PM   #10
ds23man is offline ds23man  Netherlands
diyAudio Member
 
Join Date: Oct 2006
Quote:
Originally Posted by linuxworks View Post
have not gotton that far yet. can you give more detail on that issue? does the chip lock up somehow or is this the method they describe known as 'aborted writes' in order to execute a read command?

I'm not even sure I need to do reads. why do you need to read anything? the whole chip is write-oriented and seems like you can fully control it via write-only CSRs.
If I read the errata correct it is neccessary to write these once after startup for achieving max. audio performance. Nothing to do with reading.

Regards Gerhard

PS Why is this not in the Datasheet???????
  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
Digital Volume Contol - CS3318 - MAX5440 Ridin '24'z Digital Source 5 8th June 2011 02:36 PM
Sylonex and Arduino preamp oenboek Analog Line Level 17 12th March 2011 01:50 AM
Arduino for audio projects? glt Parts 5 9th March 2011 06:28 PM
Cooling fans with Arduino seahuston Chip Amps 10 23rd October 2010 06:58 AM
Can DIY audio be like Arduino glt Everything Else 1 3rd April 2009 04:57 PM


New To Site? Need Help?

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