Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Login


Options
View
Go to last post Go to first unread
Tostaki  
#1 Posted : Monday, September 23, 2013 3:46:58 PM(UTC)
Tostaki

Rank: Member

Groups: Member
Joined: 7/18/2012(UTC)
Posts: 26

Thanks: 1 times
Was thanked: 3 time(s) in 2 post(s)
Hi there,

I just publicaly shared an Arduino library to manage the WM8741 Dac chip through I2C bus.
All code is on Github.

For those used to Arduino code, here the example sketch

Code:

	#include <WM8741.h>
		//dac set in stereo mode
		//attenuation nim : 0dB, attenuation max : -127dB, attenuation current : -50dB
	WM8741 opusdac(false, 0x00, 0x3FF, 0x190);

	void setup() {
			//do anything here
			opusdac.SetFilter(0x01);
			opusdac.SetVolume(0x190, true);
	}

	void loop() {
			// loop filters and change volume every 15 seconds
			opusdac.NextFilter();
			opusdac.SetVolume(0x190); //attenuation level -50
			delay(15000);
			opusdac.NextFilter();
			opusdac.SetVolume(0xC8);  //attenuation level -25
			delay(15000);
	}




May be useful to anybody. Enjoy

-

Edited by user Thursday, September 26, 2013 3:23:31 PM(UTC)  | Reason: Not specified

DQ828  
#2 Posted : Monday, September 23, 2013 10:18:18 PM(UTC)
DQ828

Rank: Member

Groups: Member
Joined: 8/17/2010(UTC)
Posts: 368
Location: australia

Thanks: 8 times
Was thanked: 3 time(s) in 3 post(s)
Thanks for sharing, if I end up using the OPUS I'll surely be using your library.
Tostaki  
#3 Posted : Thursday, September 26, 2013 4:53:47 PM(UTC)
Tostaki

Rank: Member

Groups: Member
Joined: 7/18/2012(UTC)
Posts: 26

Thanks: 1 times
Was thanked: 3 time(s) in 2 post(s)
Example added to be more specific
mroether  
#4 Posted : Tuesday, October 15, 2013 2:37:14 PM(UTC)
mroether

Rank: Member

Groups: Member
Joined: 10/13/2013(UTC)
Posts: 1
Germany
Location: Munich Area

Excellent work Tostaki!

I am going to build my dac based on dual mono OPUS boards and I wonder how to wire the the Arduino hardware with the OPUS dacs? Since I am new in dac building and using micro controller it would be of great help to see a schematic for this.

Thank you very much in advance

Michael

Tostaki  
#5 Posted : Wednesday, March 12, 2014 9:49:14 PM(UTC)
Tostaki

Rank: Member

Groups: Member
Joined: 7/18/2012(UTC)
Posts: 26

Thanks: 1 times
Was thanked: 3 time(s) in 2 post(s)
Just connect the I2C headers of the arduino to the I2C connector of the DAC (2 wires)
Depending on the Arduino board, you may need one level conversion.

(sorry for the late answer)
Rss Feed  Atom Feed
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.