Wrote 2mhz control logic