Brushless motor control for dspic33f and 16/32bit pic variants