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:

6832654437_65467be183_b.jpg


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

6832652857_7f6d074156_b.jpg


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...
 
AX tech editor
Joined 2002
Paid Member
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
 
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
 
AX tech editor
Joined 2002
Paid Member
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
 
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.
 
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!
 
Last edited:
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???????
 
you are right and I'm not fully awake yet (lol). yes, you do some kind of init writes, not reads. I think I confused reads since the reads are 'strange' on this chip and I'm still not sure if my code will ever need to do a read command.

as for init, I plan to have a reset wire from the cpu to the CS chip. kind of annoys me having to go outside of just i2c to control the chip but its somewhat common to have to wiggle a reset wire, physically. I can have a reset manager or timer do the reset wire for me, but since I have to feed the chip some serial bytes as well, its probably best the cpu wave the reset line, then forcefeed it some tasty bytes when a reset on the main system has to happen.
 
I was planning on having a front-end voltage divider network, anyway. if I drive this 3318 from a behringer dcx2496, its already too high as it is, even the so-called high voltage version.

it almost looks like a marketing joke to me. 3v diff and they say its for pro audio use? but its not balanced. and not enough extra headroom to justify the cost. is it? does not seem to be.

I guess you could design a board that has 78xx/79xx chips on it and populate with 05 chips for the lower voltage 3308 and put 08 chips in or 09 chips in for the 3318.

if it was dual 12 or 15, I'd understand having 2 series of chips. but why did cirrus do this and 'only' do it at 8/9 v level? seems odd to me.
 
AX tech editor
Joined 2002
Paid Member
I'm running the balanced outputs of the DAC on the DCX, which runs off of 5V, into a balanced to se opamp and then straight into the CS3318. The +/-9V let me go a bit into gain so I can send out up to 5VRMS, for those who want to use it with pro levels.
Of course with the RC5 remote and display build into the DCX, it all works like a charm :)
If you want to use this with a DCX you'd want to chuck whatever is in there now, after the DAC. ;)

jan
 
ah, you go from dac output, which is much lower; compared to the op-amp dcx output. ok, that's one way to solve the over-input problem ;)

admittedly, the dcx is very high output and unusual for consumer use.

I still think I'll have a voltage divider ('hard pot') stage up front and people can configure any level of pre-atten (including no atten) so they won't be over-driven.
 
note that my use for the 3318 is not dedicated for the dcx.

I'm building a general purpose 8ch preamp. sometimes it can be used in stereo 2ch mode (headphones), sometimes in crossover multiamp mode and for some people it could be a home theater preamp with 7.1 mapping to 8 channels.

I don't want any dcx specific things on this board.

my own plans for my dcx will be to replace its dac and even its front end receiver chip; but the 8ch vol control system is a separate project, entirely.