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
|
|
|
|
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.
|
|
|
|
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
|
|
|
|
Rank: Member
Groups: Member
Joined: 10/13/2013(UTC) Posts: 1 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
|
|
|
|
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)
|
|
|
|
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.