MicrodsPIC-based Design for a Lidar Flexible Unit