An embedded control and acquisition system for multichannel detectors