Corpius
What do the highlighted lines do? Do they write the current offset to the registers, ie volume + 2 offset, then the volume might be 50 on one side & 51 on the other.
void setSabreLBalance(byte regVal){
regVal += offSetVolRight; writeSabreReg(1, regVal); // set up volume in DAC1
writeSabreReg(3, regVal); // set up volume in DAC3
writeSabreReg(5, regVal); // set up volume in DAC5
writeSabreReg(7, regVal); // set up volume in DAC7
}
void setSabreRBalance(byte regVal){
regVal += offSetVolLeft; writeSabreReg(0, regVal); // set up volume in DAC1
writeSabreReg(2, regVal); // set up volume in DAC3
writeSabreReg(4, regVal); // set up volume in DAC5
writeSabreReg(6, regVal); // set up volume in DAC7
I modified the Balance code to suit my screen and found the DAC was starting up at full volume (displayed correct startup volume "50" though), after start up if you adjusted the balance the volume would jump to the correct level. Then if you tried to change the volume the display would change but the actual vol level didn't change, once again if you adjusted balance the volume level would correct itself.
I ended up replacing;
/*void setSabreVolume(byte regVal)
{
void setSabreRBalance(byte regVal); // set volume of right channel
void setSabreLBalance(byte regVal); // set volume of left channel
}*/
with the original code;
void setSabreVolume(byte regVal)
{
writeSabreReg(0, regVal); // set up volume in DAC1
writeSabreReg(1, regVal); // set up volume in DAC2
writeSabreReg(2, regVal); // set up volume in DAC3
writeSabreReg(3, regVal); // set up volume in DAC4
writeSabreReg(4, regVal); // set up volume in DAC5
writeSabreReg(5, regVal); // set up volume in DAC6
writeSabreReg(6, regVal); // set up volume in DAC7
writeSabreReg(7, regVal); // set up volume in DAC8
}
and all worked fine
My display shows as a series of bars above & below center on the left of the screen.
Edited by user Thursday, April 4, 2013 9:33:45 PM(UTC)
| Reason: Not specified