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.

CCS/TMS320F28027: eCAP module

Part Number: TMS320F28027

Tool/software: Code Composer Studio

Hello,

I have a signal with 3 different levels i want to measure the time period for each level. I have a question is it possible to calculate the time using eCAP? Because for eCAP to consider an edge in signal the voltage difference should be more than 1 V (I have worked out with this). if I have a signal with 0 V, 1.5 V and 3 V. Is it possible to determine the interval length for each voltage level? I have the signal shown in attached figure.

I am using the signal like this now. But some of the values of capture register are negative.

Regards,

Mohsin Ejaz Ahmad

  • Mohsin,
    The eCAP can only register 2 voltages, above VIH is equal to a logic high and anything below VIL is considered a logic low.

    You may be able to accomplish your goal with some external logic and the eCAP, but the eCAP cannot directly capture it.

    If you have a spare ADC or Comparator, you may be able use that to determine the voltage level and then use a CPU timer to determine how long was spent at that logic level.

    On newer devices like F28004x there is better integration between the analog modules and the eCAP, you may want to take a look at that.

    Regards,
    Cody
  • Cody, 

    Is it defined voltage VIH and VIL? because i was working with PWM pulse as input to eCAP and it has 3.3 V and 0 V. What is the threshold hold which is considered as high or low for eCAP?

    Regards,

    Mohsin

  • Mohsin,

         You can find the value for VIL and VIH in "Recommended Operating Conditions" table of the Datasheet

    3.3V is above VIH and 0V is below VIL so that should work just fine.

    The threshold for a "high" is VIH and the threshold for a "low" is VIL.

    Regards,
    Cody