Re-write imagingBoard firmware

more intelligent synchronization For clock signals