Home » xyzzy » Tower » Firmware
Re: Firmware [message #69626 is a reply to message #69623] |
Tue, 27 September 2011 10:01 |
|
Wayne Parham
Messages: 18782 Registered: January 2001
|
Illuminati (33rd Degree) |
|
|
I have the prototype finished. Sent an early version to Uriah a couple weeks ago, but it was more of a proof-of-concept. The coding at that time drove a parallel output, like what you'd use to drive a DAC. The one I have now uses an SPI interface, supported by several digipots. I've been testing with the AD5206 device.
Other compatible digipot chips would have an SPI interface, 256-bit resolution and linear taper. The firmware sends a logarithmic sequence, so a linear digipot is needed. That's much more common than audio taper digipots, and the logarithmic sequence is more accurate anyway. I've never seen a "log" taper pot that was anywhere close, most are crude approximations.
The firmware runs on an AT2313 processor. I can send you one that's preprogrammed and you can hook it up. It's a cinch.
It reads IR codes sent from a universal remote (set to code 0380). Most will control three devices (like TV, cable and DVR) with one remote, but I like to set all three to code 0380 so I don't accentally change it to a mode that doesn't work. Seems like every time that happens I think the batteries are dead, then replace them only to realize the cat selected the device setting I didn't program. So I usually set all three modes to code 0380, so no matter what device is chosen, the buttons work for my stereo preamp controller.
I prefer the universal remotes with the up/down/left/right controls arranged in a circle. That way volume is up/down, and balance is left/right. It's an intuitive interface. The center button toggles locking the channels together, in case you don't want to set left/right channels separately. If they're already panned to one side or the other, then both channels are set to the average value, the "middle" level. When channels are locked, only up/down work. Toggle it to set that mode on or off.
The "power" button selects power on/off. Buttons one through five select the corresponding input channel. Pressing "input" or "select" will also select channels in a round-robin fashion, incrementing the channel each time it's pushed. The "mute" button sets volume to zero first time it's pressed, then back to normal volume the next time.
When the processor is powered up, the remote is monitored and digipots can be modified. But input selectors can't until "power" is pressed. This turns on the power pin (5V, 40mA max), which can be used to drive a relay and LED. Once power is on, the channel selection can be made as well. It is initially set to channel one, and the corresponding pin is set (again, 5V, 40mA). If another channel is selected, the channel one pin turns off, and the other selected channel pin turns on. When power is tuned off, all channel pins go off.
The digipot and channel selections are volatile, meaning the settings are lost if processor power is removed. However, it is assumed that power to the processor chip will always be applied (so it can listen to the remote for commands). Power to the preamp circuits can be switched by the power relay, but power to the processor should always be present.
When power is first applied to the processor, it sets the digipots to zero (lowest volume) and sets channel to one. However, until "power" is pressed, the channel select pins are off. Once power is pressed, the channel one pin turns on and channel selection can be changed, as described above.
I'd probably drive a 2N2222 from the processor pins to provide a relay signal. An LED can also be safely connected, but current should probably be limited to about 20mA. The maximum rating is 40mA per output pin, but I'd probably keep 'em down under 20mA.
Finally, there are input pins provided to sense front-panel buttons. That way the device can be controlled without the remote control. There are pins for power, up, down, left, right and (channel) select. These are all selected by connection to ground. There's an internal pullup resistor, so no other components are necessary - just an SPST pushbutton to ground.
|
|
|
Goto Forum:
Current Time: Sun Nov 03 22:19:35 CST 2024
|