Once configured and started, the whole process can be
automated to a point where the program is only read in the
conversion results. The completion of the ADC conversions
can also be programmed to trigger an interrupt for the more
timing critical algorithm. An example of the usage is the
sensor less BLDC control where the ADC is used for zero
crossing detection. The interrupt can also be programmed to
happen only if the result is within a certain range. For the
classical method where the zero crossing detection is done at
the on period of the PWM, and for the case where the BEMF
signal is an increasing one, the interrupt can be programmed
to happen only after the voltage is above the zero crossing
point. For the zero crossing detection during the off period of
the slow decay type of modulation, the range can be changed
to near ground voltage. Apart from the 3 ADC pins needed for
the zero crossing detection of the three phases, another 5 more
ADC pins can be used to read the load current, battery
voltage, temperature sensor, handlebar etc.