Firmware for self-made preamplifier