This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using a hardware-comparator or software-comparator

Other Parts Discussed in Thread: TMS320F28035

Hi,

I am studying the ADC and Comparators of TMS320F28035. I am wondering, in what kind of applications that I have to use the physical comparator on the chip, or otherwise just do the comparison in my code.

I don't have a lot of design experience, so it'd be appreciated if someone could provide me some information.

 

Thank you,

 

Frank

  • Frank,

    Both are options and should give you what you want.  The main reason to choose one over the other is the speed at which the comparison is needed and what you'll do with the result.

    Software - The most flexible and most common option. The software needs to do something based off an ADC input value, but we'll do this comparison based off of the software flow.

    Comparator - Often used for safety (over-current trips, over-voltage trips).  Based on the value of an analog input, we need this comparison done quickly.  For example, we may want to stop the PWMs immediately.  Because of the physical connections between the comparator modules and PWM modules in the device, we can stop the PWM within a cycle. The trip can then cause an interrupt so that you know a fault occurred.  There are other uses as well.


    Thank you,
    Brett