cs3318 and arduino - Page 8 - diyAudio
Go Back   Home > Forums > Source & Line > Analog Line Level
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

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 26th March 2013, 01:56 AM   #71
glt is offline glt  United States
diyAudio Member
 
Join Date: Oct 2004
Quote:
Originally Posted by maxw View Post
Yeah I've read that. I've used other I2C devices without issues but they were all 5V. This time I'm using one of these to change the level. Do I put the pull up resistors on the arduino to 5V or on the CS3318 side to 3.3V?
The board already has 10K pull ups. But you can use smaller pull ups if you wish. You need them on both sides.

Regarding your code:

Wire.beginTransmission(CSAddr); // Begin I2C
Wire.write(B10000000); // Chip Address and R/W bit
Wire.write(0x00); // select the register
Wire.write(0x99); // set register
Wire.endTransmission();


Wire.begin is for the chip address
Wire.write is to select the register address
The next write is for the value you want to write into the register
Wire.end sends the data and releases the bus

Try writing one register at a time.
__________________
www.hifiduino.wordpress.com
  Reply With Quote
Old 27th March 2013, 12:49 AM   #72
maxw is offline maxw  United Kingdom
diyAudio Member
 
maxw's Avatar
 
Join Date: Jun 2004
Location: London
Quote:
Originally Posted by counter culture View Post
Is that ALL the code?

...because it won't do anything. Unless there's something about Arduino C that is radically different from all the C I've ever come across.

You need a main() routine, and you need to call those routines...

int main(void)
{
setup();
loop();
}

Otherwise show us all of the code, it's impossible to debug fragmentary code.
Yes, that is all the code. I don't think there is a main() routine in the Arduino IDE.

Quote:
Originally Posted by glt View Post
The board already has 10K pull ups. But you can use smaller pull ups if you wish. You need them on both sides.

Regarding your code:

Wire.beginTransmission(CSAddr); // Begin I2C
Wire.write(B10000000); // Chip Address and R/W bit
Wire.write(0x00); // select the register
Wire.write(0x99); // set register
Wire.endTransmission();


Wire.begin is for the chip address
Wire.write is to select the register address
The next write is for the value you want to write into the register
Wire.end sends the data and releases the bus

Try writing one register at a time.
Thanks glt, this solved it. The first wire.write was not required. I put it in due to this being in the datasheet:
"The first byte sent to the CS3318 after a Start condition consists of a 7-bit chip address field and a R/W
bit", but I guess that part is taken care of in the Wire.beginTransmission.

Anyway, I got it going, then fried the chip. Not sure how but hey ho, learn as I go
  Reply With Quote
Old 27th March 2013, 12:56 AM   #73
diyAudio Member
 
Join Date: Jun 2011
Quote:
Originally Posted by maxw View Post
Yes, that is all the code. I don't think there is a main() routine in the Arduino IDE.
OK, thanks. I had a look at the Arduino programming language, I'll know in future.
  Reply With Quote
Old 21st December 2016, 09:09 AM   #74
diyAudio Member
 
Join Date: Jul 2016
Location: Israel
Hi guys.

After not manage to fix the PGA2310 clicks issue cause of the low resolution i searched the web and got to this post.
I saw in the first page that linuxworks used a pcb for the CS3318, i couldn't find anywhere to buy this pcb, is it available somewhere?

Regards,
Isak.
  Reply With Quote
Old 21st December 2016, 09:25 AM   #75
maxw is offline maxw  United Kingdom
diyAudio Member
 
maxw's Avatar
 
Join Date: Jun 2004
Location: London
You could also use a QFN adapter PCB but there is a reason the CS3318 didn't gain wide spread DIY use: it's a bit of a pain to work with.
  Reply With Quote
Old 21st December 2016, 10:20 AM   #76
diyAudio Member
 
Join Date: Jul 2016
Location: Israel
Thank you for your reply.
Can you please be more specific, what do you mean?
Is this chip is problematic in some way?
  Reply With Quote
Old 21st December 2016, 10:49 AM   #77
maxw is offline maxw  United Kingdom
diyAudio Member
 
maxw's Avatar
 
Join Date: Jun 2004
Location: London
No real deal breakers but just a few things that make it a bit more tricky for DIY:
- It's expensive
- It's hard to solder (0.65mm pin pitch)
- 3.3V. Not a huge problem these days as there are more 3.3V device now but a couple years back options were more limited.
- Easy to destroy the IC. If one supply rail is connected but not the other it goes up in smoke. I think everyone who played with the CS3318 has fried at least one.
  Reply With Quote
Old 21st December 2016, 11:02 AM   #78
diyAudio Member
 
jan.didden's Avatar
 
Join Date: May 2002
Location: The great city of Turnhout, BE
Blog Entries: 8
Quote:
Originally Posted by isakeliyahu View Post
Hi guys.

After not manage to fix the PGA2310 clicks issue cause of the low resolution i searched the web and got to this post.
I saw in the first page that linuxworks used a pcb for the CS3318, i couldn't find anywhere to buy this pcb, is it available somewhere?

Regards,
Isak.
If you have the click issue with the PGA you will also have it with the CS. It is not caused by resolution but by having some DC offset on the signal. When switching the DC offset changes and that sounds as clicking. Because of the DC, the zero=volt switching of the PGA will not work.
Get rid of that and you get rid of the clicking.

Jan
__________________
Music is dither to the brain; lets me think below the usual chaos - me
Linear Audio Vol 12 is out! Check out my Autoranger and SilentSwitcher
  Reply With Quote
Old 21st December 2016, 11:07 AM   #79
diyAudio Member
 
Join Date: Jul 2016
Location: Israel
Wow, lol
I got yaa, well hope for the best.
Did you manage to make a project using CS3318 arduino?
If yes, can you please verify that its clicks free?
  Reply With Quote
Old 21st December 2016, 11:18 AM   #80
maxw is offline maxw  United Kingdom
diyAudio Member
 
maxw's Avatar
 
Join Date: Jun 2004
Location: London
The CS3318 was click free for me. So was the PGA2310. The PGA2310 issue for me was constant low audible noise.
  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 08:58 AM.


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

Content Relevant URLs by vBSEO 3.3.2
Wiki