Firmware for the HiSPARC electronics