Professional Documents
Culture Documents
CE644 Firmware User Manual v1.21
CE644 Firmware User Manual v1.21
2 March 5, 2013
Contents
Introduction........................................................................................................................................2
Licensing: ........................................................................................................................................2
More licensing: ...........................................................................................................................2
Using or testing the firmware ..........................................................................................................3
Connecting the controller to the DAC ..................................................................................................3
Non-Isolated I2C .............................................................................................................................3
Isolated I2C .....................................................................................................................................4
Pin states for input switching or indicating ..........................................................................................5
Connecting TPA's 4:1 S/PDIF Receiver/MUX module .......................................................................6
Pin's for rotary encoder, IR receiver and push buttons ........................................................................7
IR receiver.......................................................................................................................................7
Rotary encoder ...............................................................................................................................7
DIP switch ...........................................................................................................................................7
Jumpers J1, J2, J3 & J4.........................................................................................................................7
Jumpers J5, J6 & J7 .............................................................................................................................8
Potentiometer VR1 .............................................................................................................................8
The battery .........................................................................................................................................8
First time use ......................................................................................................................................8
Flow chart ...........................................................................................................................................9
GUI ................................................................................................................................................... 10
Main Screen .................................................................................................................................. 10
Input Settings Menu...................................................................................................................... 10
Save Settings ............................................................................................................................. 11
Main Menu ................................................................................................................................... 11
Display ...................................................................................................................................... 11
Date / Time ............................................................................................................................... 12
T°Monitor ................................................................................................................................. 13
Advanced .................................................................................................................................. 13
Sleep ......................................................................................................................................... 17
Special thanks to: .............................................................................................................................. 18
Introduction
This firmware manual is intended to be used as a simple guide that should help to understand all the
functions available. Besides that it should provide help with using the controller and it's firmware to
switch inputs, hooking up the IR receiver, rotary encoder and push buttons. Note that switching
inputs can be done in multiple ways, but only the most commonly used ways are supported by the
firmware. Future updates might add some more functions to the firmware. This manual and the may
change without any notice. Please check the version number at the bottom of each page.
Licensing:
Developed by CE-Designs especially for the CE644 controller. For more information visit:
http://ce-designs.net/
The CE644 Firmware by CE-Designs is licensed under a Creative Commons Attribution 3.0 Unported
License. http://creativecommons.org/licenses/by/3.0/legalcode
More licensing:
RTC library by Jeelabs
Date and time functions using a DS1307 RTC connected via I2C and Wire lib 2010-02-04
<jc@wippler.nl>
http://opensource.org/licenses/mit-license.php
http://creativecommons.org/licenses/by-sa/3.0/legalcode
This work was inspired on the Arduino SKD "LiquidCrystal" library and the "LiquidCrystal_I2C" library
from Mario_H.
For details on the library see the Wiki on github or the blog post http://arcfn.com/2009/08/multi-
protocol-infrared-remote-library.html
info@ce-designs.net
A guide on how to upload the firmware to the controller can be found here:
The firmware can also be used with Arduino's that have 64kB or more programming space, but some
parts of the code may possible be altered, due to the used port expander. When taking this journey I
expect you to have the needed knowledge on how to achieve this.
Using the firmware is at your own risk, although the risk of damaging your DAC is very unlikely.
Non-Isolated I2C
When using the non-isolated I2C breakout connect it to the DAC’s I2C header by means of a logic
level converter. The logic level converter from the image can be bought at Sparkfun.
Isolated I2C
When using the Isolated I2C breakout connect SDA, SCK, GND and 3.3V from the DAC's I2C header to
SDA, SCK, GND and Vin at the isolated I2C breakout at the controller. The isolated site is powered by
the DAC. When powering it with 3.3V also means that the AduM1250 I2C isolator does the needed
level conversion.
Note that when using the isolated I2C outbreak to connect to the DAC it is also needed to isolate the
controller’s I/O's used for input switching. Otherwise makes it no sense to use the I2C isolator. There
are multiple ways of achieving this by using for instance digital isolators, optocouplers or even relays.
This manual does not address these details.
When the firmware starts pin D20 is configured as output and set HIGH. This means that this pin can
be used to drive a relay that switches the power to the DAC and other modules. This pin is set LOW
when 'Standby Mode' or 'Sleep Mode' is entered, so the DAC and other modules are switched off
while the controller keeps powered. The relay does not have to be used in order for the firmware to
work, but because there is a 50ms delay there is a change for a split second of full volume at startup.
Remove the relay pin configuration and the 50 ms delay from the code when not using a relay to
switch on the DAC!! Just comment the following lines of code:
Pin D9 and D10 can be used to connect a two LED's for indicating S/PDIF or I2S/DSD. Pin's D10 & D12
can be used as ground pins for the LED indicators. Do use resistors in series with the LED's to limit the
current!!!
All other pins from the table can be used to switch between different inputs. Which of these pins are
active depends on the used configuration at the “Main Menu → Advanced Menu → Config”
The next image shows how to build two voltage dividers and how to connect them to TPA's 4:1
S/PDIF Receiver/MUX module. This is a very cheap, but reliable solution. When using the non-
isolated I2C connection the ground line between the controller and 4:1 mux can be omitted.
IR receiver
D1 Out from IR receiver
GND Ground
5V 5 Volts for IR receiver
Rotary encoder
D4 Channel B
D3 Switch
D2 Channel A
GND Ground
5V 5 Volts
The code for the push buttons is not available yet. This section will be added later on.
DIP switch
There is a 3-position DIP switch on the controller that when using this firmware has the function to
lock the 'IR Learn,' 'DAC Configuration' and/or 'Volume control' settings in a way that they cannot be
accessed from the menu. This can prevent that someone accidentally sets off the 'Volume Control' or
sets it to 'Stereo' while the DAC is a 'Dual Mono' setup or change your precious IR codes.
The firmware will read the DIP switch only at startup, so a power cycle is needed when changing the
DIP switch while the running the firmware.
When a position from the DIP switch is switched to ON it will lock the settings according to the table
below.
The jumper J2 connects 5V to the second potentiometer of the MCP42010. This can be useful when
one want to dim a LED or something. Note that controlling the second potentiometer is not covered
by the firmware.
|0|1|1|1|0|0|0| 0x38
|0|1|1|1|0|0|1| 0x39
|0|1|1|1|0|1|0| 0x3A
|0|1|1|1|0|1|1| 0x3B
|0|1|1|1|1|0|0| 0x3C
|0|1|1|1|1|0|1| 0x3D
|0|1|1|1|1|1|0| 0x3E
|0|1|1|1|1|1|1| 0x3F
Tip: Use the windows calculator in programming mode to convert binary numbers to hexadecimal
numbers or vice versa.
Potentiometer VR1
The small SMD potentiometer VR1 is there to adjust the contrast of the LCD display. When using the
controller for the first time it is most often needed to adjust the contrast to be able to read the
display. Once the contrast is set the potentiometer is most probably never going to be used again.
The battery
The 3 volt coin cell battery is the backup supply for the DS1307 RTC. It ensures that the timekeeping
operation continues while the part operates from the backup supply
When running the firmware version 1.1 or lower for the first time it is important to perform a factory
reset from the menu. By doing so you make sure that the default settings are written to the EEPROM
of the Atmega644. When at first use the factory reset is skipped, the input names will not be visible
and other settings will not work like they are supposed to work because the controller does not know
the settings yet.
Always test the controller first without it being connected to the DAC. When the controller responds
well then connect it to the DAC. Preferably use a pre-amplifier or integrated amplifier to test the
controller when it is connected to the DAC. This prevents some very loud music in case something
goes wrong. Please only connect it to a power amplifier when you’re sure that the controller mutes
the DAC’s fast enough.
Reminder: When not using a relay to switch to power the DAC do remove the corresponding
lines of code, see: Pin states for input switching or indicating.
Flow chart
After the controller has started and the DAC is configured the GUI starts. From that point the
controller allows user control.
GUI
Main Screen
The main screen shows the:
Save Settings
Each time when a settings menu is exited the next screen will show. The top row shows which setting
is associated. A choice has to be made whether to save the setting(s), leave with saving or return to
the setting(s). Use the up or down keys to select a menu item. Press the center key to select.
Main Menu
The main menu can only be accessed by using the remote.
Use the up or down keys to select a menu item. Press the center key to select the menu item.
Display
Backlight
The brightness of a LCD can be adjusted here. The controller uses the MCP42010 digital
potentiometer to control the current to the backlight LED. The brightness can be set in 32 steps. Use
the left or right keys to adjust the backlight. Press the center key to save the setting.
Auto Off
This is an 'auto display off' timer making the screen go off after the set amount of seconds. The DAC
keeps playing and all functions are accessible while the screen goes off. This function only works
when the Main Screen is shown. Use the left or right keys to switch between enable/disable and the
timer. Use the up and down keys to select the correct value. Then press the center key to save the
settings.
Auto Clock
When the timer expires the real time clock is shown on the screen. The DAC keeps playing and all
functions are accessible while the real time clock is shown. The clock will only be activated when the
'Main Screen' is shown. Use the left or right keys to switch between enable/disable and the timer.
Use the up and down keys to select the correct value. Then press the center key to save the settings.
No picture available.
Date / Time
Clock
Shows the current date and time
Set Date
The date can be set in this menu. Use the left or right keys so select the day of the week, day of
month, month, or year. Use the up or down key to select the correct value. Then press the center key
to save.
Set Time
Time can be set in this menu. Use the left or right keys so select the hours or minutes. Use the up or
down key to select the correct value. Then press the center key to save.
T°Monitor
This function shows the temperature measured by the LM35 temperature sensor. The default setting
shows the temperature in degrees Celsius. Use the left or right keys to switch between degrees
Celsius and degrees Fahrenheit. Then press the center key to save.
Advanced
The Advanced menu gives you access to some more DAC and controller related settings. Most of
these settings need to be set just once.
Learn IR
A function to teach the controller the commands of any remote, so any remote can be used with the
controller.
Press the key that you want to use for the asked function as short as possible. Depending on the
type of remote it can be necessary to press the key for up to four times before the firmware is sure
that it stored the correct code. Just make sure that you follow the directions of the controller and
make the key presses are as short as possible!
When all keys are stored the firmware verifies the codes. If it turns out that the code are not usable
than the firmware will start the IR learn function again.
The rate at which the controller responds depends on the used remote. With some remotes it might
respond too slow or too fast. To tune the speed you can change the “IR_SPEED_LIMITER” value. Look
for this line of code:
Config
Gives access to the DAC configuration. After changing any of these setting a power cycle of the
controller + DAC is required for the setting to take effect.
Output
The output mode can be set here. Possible options are 'Stereo' or 'Dual Mono'. Use the up or down
key to select the correct value. Then press the center key to save.
Phase
The output phase can only be set when in 'Dual Mono' mode. Possible options are 'In Phase' or 'Anti
Phase'. Use the up or down key to select the correct value. Then press the center key to save.
Clock (f)
The clock frequency of the DAC needs to be selected here for correct of the sample rate. Possible
options are '80 MHz' or '100 MHz'. Use the up or down key to select the correct value. Then press the
center key to save.
Version
The Buffalo version needs to be set in order to achieve the correct selecting of the inputs. Note that
only the most common ways of switching inputs for each version is handles by the controller.
Possible options are 'Buffalo II', 'Buffalo III' or 'Buffalo IIISE'. Use the up or down key to select the
correct value. Then press the center key to save.
Vol Ctrl
The volume control can be enabled or disabled here. The default startup volume can also be set here.
Use the left or right keys to select the between enabling/disabling the volume control or the default
startup volume. Use the up or down key to select the correct value. Then press the center key to
save. WARNING: disabling the volume control will set the volume at 0 dB attenuation! Only disables
this when using a pre-amp or integrated amplifier!!!
Inputs
Each of the 6 input names can be changed here. Each input can also be enabled or disabled. The
disabled input will be skipped when switching between inputs. Use the left or right keys so select
each character of the input name or the enabling/disabling of the input. Use the up or down keys to
select the correct character or value. Then press the center key to save.
Reset
The reset function restores all factory default settings. The summary below shows all default settings.
Sleep
This is a sleep timer. Once the timer is enabled and the sleep timer has expired the controller will
switch a relay that switches off the DAC. Use the left or right keys so select the between
enabling/disabling and the sleep timer. Use the up or down key to select the correct value. Then
press the center key to save. To wake the DAC up press and hold the center key for a few seconds.
Note that this function will only work when a relay that is controlled by the controller is used to as a
switch to turn the DAC on/off.