added gain calibration for 3 adc channels
added zero logic