You may want to check the CODE section on the main blog…
Author Archive
Where is the latest code? Leave a comment
Fixed a Bug in the Code (v.B06e) 23 comments
Code was missing “#include <pins_arduino.h>” under Libraries. For some reason copying html from the Arduino environment and pasting into wordpress will result in missing that part of the code. I have added it to the code just now. I also copied the fixed code and pasted it in a blank sketch in Arduino and compiles [...]
Code for Buffalo II DAC vB06e 5 comments
/*************************************************************************************************** * HIFIDUINO v. B06e * * Saturday January 8th, 2011 * * Arduino code for Buffalo II DAC and other DACs based on the Sabre32 DAC chip. This code is adapted * from an earlier version developed for the Wolfson 8741 DAC chip. For more information visit * www.hifiduino.wordpress.com or www.hifiduino.blogspot.com * * (Although this code is based on a confidential data sheet for which I’ve signed an NDA, I’ve also * requested and have received permission to publish this code). * * Change log: * v. B06e 01/08/11: Supports 32-bit I2S input in accordance to Buffalo II input wiring of SabreDAC * Rearranged code for default conditions, correct reading of sample rate in I2S * Allows manual ”best DPLL bandwidth” setting. Allows manual selection of I2S or * SPDIF. Can set default startup to I2S or SPDIF (in the code) * v. B05 11/25/10: Added remote control capability using the Apple Aluminum Remote Control. This * version enables remote volume control only. * v. B04 11/06/10: Added large numbers, tidy-up the UI, ”pulse” indicator -every time the status * information is read. Also status indicator for PCM/DSD and Signal Lock * v. B03 11/02/10: Supports s/w debounce, added setting of FIR filter, DPLL bandwidth, jitter * reduction and adjustment of LCD brightness. * v. B021 10/18/10: No new functionality, but cleaned up the code and comments. * v. B02 10/15/10: Added reading of sample rate. * v. B01 10/11/10: Volume control, LCD, Rotary Encoder. ***************************************************************************************************/ /*************************************************************************************************** * look for ”spdifStart” and set to true if you want the DAC to startup in SPDIF mode and false if * you want the DAC to startup in I2S mode * * ***************************************************************************************************/
Code for Buffalo II DAC vB05 1 comment
/*************************************************************************************************** * HIFIDUINO v. B05 * * November 25, 2010 * * Arduino code for Buffalo II DAC and other DACs based on the Sabre32 DAC chip. This code is adapted * from an earlier version developed for the Wolfson 8741 DAC chip. For more information visit * www.hifiduino.wordpress.com or www.hifiduino.blogspot.com * * (Although this code is based on a confidential data sheet for which I’ve signed an NDA, I’ve also * requested and have received permission to publish this code). * * Change log: * v. B05 11/25/10: Added remote control capability using the Apple Aluminum Remote Control. This version enables remote volume control only. * v. B04 11/06/10: Added large numbers, tidy-up the UI, ”pulse” indicator -every time the status * information is read. Also status indicator for PCM/DSD and Signal Lock * v. B03 11/02/10: Supports s/w debounce, added setting of FIR filter, DPLL bandwidth, jitter * reduction and adjustment of LCD brightness. * v. B021 10/18/10: No new functionality, but cleaned up the code and comments. * v. B02 10/15/10: Added reading of sample rate. * v. B01 10/11/10: Volume control, LCD, Rotary Encoder. ***************************************************************************************************/
Code for Buffalo II DAC v. B04 1 comment
/*************************************************************************************************** * HIFIDUINO v. B04 * * November 06, 2010 * * Arduino code for Buffalo II DAC and other DACs based on the Sabre32 DAC chip. This code is adapted * from an earlier version developed for the Wolfson 8741 DAC chip. For more information visit * www.hifiduino.wordpress.com or www.hifiduino.blogspot.com * * (Although this code is based on a confidential data sheet for which I’ve signed an NDA, I’ve also * requested and have received permission to publish this code). * * Change log: * v. B04 11/06/10: Added large numbers, tidy-up the UI, ”pulse” indicator -every time the status * information is read. Also status indicator for PCM/DSD and Signal Lock * v. B03 11/02/10: Supports s/w debounce, added setting of FIR filter, DPLL bandwidth, jitter * reduction and adjustment of LCD brightness. * v. B021 10/18/10: No new functionality, but cleaned up the code and comments. * v. B02 10/15/10: Added reading of sample rate. * v. B01 10/11/10: Volume control, LCD, Rotary Encoder. ***************************************************************************************************/
Code for Buffalo II DAC v. B03 1 comment
/*************************************************************************************************** * HIFIDUINO v. B03 * * November 02, 2010 * Arduino code for Buffalo II DAC and other DACs based on the Sabre32 DAC chip. This code is adapted * from an earlier version developed for the Wolfson 8741 DAC chip. For more information visit * www.hifiduino.wordpress.com or www.hifiduino.blogspot.com * * Although this code is based on a confidential data sheet for which I’ve signed an NDA, I’ve also * requested and have received permission to publish this code. * * Change log: * v. B03 11/02/10: Supports s/w debounce, added setting of FIR filter, DPLL bandwidth, jitter reduction and adjustment of LCD brightness. * v. B021 10/18/10: No new functionality, but cleaned up the code and comments. * v. B02 10/15/10: Added reading of sample rate. * v. B01 10/11/10: Volume control, LCD, Rotary Encoder. ***************************************************************************************************/
v B021 (Cleaned Up the code for v B02) Leave a comment
/*************************************************************************************************** * HIFIDUINO v. B021 * * October 15, 2010 * Arduino code for Buffalo II DAC and other DACs based on the Sabre32 DAC chip. This code is adapted * from an earlier version developed for the Wolfson 8741 DAC chip. For more information visit * www.hifiduino.wordpress.com or www.hifiduino.blogspot.com * * Although this code is based on a confidential data sheet for which I’ve signed an NDA, I’ve also * requested and have received permission to publish this code. * * Change log: * v. B01 10/11/10: Volume control, LCD, Rotary Encoder * v. B02 10/15/10: Added reading of sample rate * v. B021 10/18/10: No new functionality, but cleaned up the code and comments ***************************************************************************************************/ // LIBRARIES #include <LiquidCrystal.h> // For LCD // Initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 10, 9, 8, 7); #include <Wire.h> // For I2C // CONSTANT DEFINITION // (The digital volume for Sabre32 is 0 to -127 db in .5 db steps) #define DEFAULTVOL 0×64 //-50 dB this is 50×2=100 or 0×64 #define MINVOL 0xC6 //-99dB this is 99X2=198 or 0xC6 #define MAXVOL 0×00 //-0 dB #define DIMVOL 0x3C //-60dB The volume level when [...]
Code for Buffalo II DAC v B02 1 comment
/* HIFIDUINO v. B02 October 15, 2010 Arduino code for Buffalo II DAC and other DACs based on the Sabre32 DAC chip This code is adapted from an earlier version developed for the Wolfson 8741 DAC chip For more information visit www.hifiduino.wordpress.com Although this is based on a confidential data sheet for which I’ve signed an NDA, I’ve also received permission to publish this code. Change log: v. B01 10/11/10: Volume control, LCD, Rotary Encoder v. B02 10/15/10: Added reading of sample rate */ /* For the LCD, I am using a ”standard” HD44780 20×4 display, and I am using the official Arduino LiquidCrystal library that comes with the standard installation. The pin assignment is different from the example code and it is as follows: * LCD RS pin to digital pin 12 * LCD Enable pin to digital pin 11 * LCD D4 pin to digital pin 10 * LCD D5 pin to digital pin 9 * LCD D6 pin to digital pin 8 * LCD D7 pin to digital pin 7 */ // LIBRARIES USED IN THIS CODE // include the LCD library code: #include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 10, 9, 8, 7); // include the library code for I2C: #include <Wire.h> // #DEFINES // Volume for Sabre32 is 0 to -127 db in .5 db steps #define DEFAULTVOL 0×64 //-50 dB this is 50×2=100 or 0×64 [...]
Code for Buffalo II DAC v B01 1 comment
/* HIFIDUINO v. B01 October 11, 2010 Arduino code for Buffalo II DAC and other DACs based on the Sabre32 DAC chip This code is adapted from an earlier version developed for the Wolfson 8741 DAC chip For more information visit www.hifiduino.wordpress.com Although this is based on a confidential data sheet for which I’ve sigend an NDA, I’ve also received permission to publish this code. */ /* For the LCD, I am using a ”standard” HD44780 20×4 display, and I am using the official Arduino LiquidCrystal library that comes with the standard installation. The pin assignment is different from the example code and it is as follows: * LCD RS pin to digital pin 12 * LCD Enable pin to digital pin 11 * LCD D4 pin to digital pin 10 * LCD D5 pin to digital pin 9 * LCD D6 pin to digital pin 8 * LCD D7 pin to digital pin 7 */ // LIBRARIES USED IN THIS CODE // include the LCD library code: #include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 10, 9, 8, 7); // include the library code for I2C: #include <Wire.h> // #DEFINES // Volume for Sabre32 is 0 to -127 db in .5 db steps #define DEFAULTVOL 0×64 //-50 dB this is 50×2=100 or 0×64 #define MINVOL 0xC6 //-99dB this is 99X2=198 [...]
Code v 0.7a 8 comments
/* Hifiduino v 0.7a May 19, 2011: Minor update and bug fixes to the version 0.7 of June 21, 2009 ————————————————————————— IMPORTANT: This code requires LCD12cW.h for i2c LCD from Web4robot LCD and macros.h for defining the large characters. Download library from: http://www.arduino.cc/playground/Code/LCDAPI and select ”LCD12cW”. After downloading copy the folder ”LCDi2cW” to the ”libraries” folder in the Arduino folder. ”macros.h” is inside one of the examples in the examples folder. Move it out of that folder into the LCDi2cW folder —————————————————————————- In this release: - Support for Web4robot LCD: http://www.arduino.cc/playground/Code/LCDAPI - Large number display for filter selection and volume - Digital Filter Selection: Filter 1 to Filter 5. - Rotary encoder. - Volume Control. Now -99 db to 0db in 1db increment. - Volume ”dimmer”. Volume dims to -60 dB when pushing rotary encoder - Changed the default delay in the LCD library to (0,0) See below note. - Select input sample rate (low, med, high) for future use. - Adjust brightness and contrast of display with remote - Remember brightness and contrast settings in eeprom - New fonts for large number display */ /* Additional notes: - The default delay for the web4robot LCD is (50,4) It can be changed with setDelay(Cmd,Char). In fact setDelay(0,0) works with the web4robot display at least in this code, making it fairly fast */ #include <Wire.h> #include ”macros.h” // Used for defining custom characters // library for i2c LCD from Web4robot LCD // Download library from http://www.arduino.cc/playground/Code/LCDAPI // and select ”LCD12cW”. After downloading copy the folder ”LCDi2cW” // to the ”libraries” folder in the Arduino folder #include <LCDi2cW.h> LCDi2cW lcd = LCDi2cW(4,20,0x4C,0); // Initialized the library // We will use the eeprom to store values #include <EEPROM.h> #define BRIADDR 0 // The address [...]