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.

TMS320F2800157: TMS320F2800157

Part Number: TMS320F2800157

I need exact code to capture and compare input pulse of 1Hz.

Input: 1Hz pulse

Instruction: Detect pulse of 1 Hz present or not, Depending on which LED will switch on or off!. If Pulse is there of 1Hz the LED should glow else turn off the LED.

Possible Approach: The timer should capture or compare time between two consecutive rising edges, if the interval is less than 1.5 Hz then LED Glows else turn off LED.

Output: if the pulse is stuck at 0 or 1 then LED 2 should be off. else Led 2 should be on.

Thanks

  • Hi Kaustuv,

    Please take a look at our eCAP module that can capture input signals or pulses and you can calculate the freq of the pulse to then control a GPIO / LED as needed in your application. You can also take a look at the GPIO examples or LED blinky to know how to control an LED for example.

    Unfortunately we do not write exact code for this but you can definitely string together an eCAP example and GPIO example to do what you are describing.

    For any specific peripheral questions on eCAP or GPIO please post another question on those and we can find the right expert to help you on those peripherals.

    Best,

    Ryan Ma

  • Based on same issue I checked and it is working fine.

    I am working on EQEP module and tried to configure one but not able to get output.
    Requirement:

    0.5 Hz pulse as input.

    Need unit timer of 1Hz and compare two consecutive input signal state value. If the value matches then it should generate interrupt.

  • Hi Kaustuv,

    Have you had a chance to take a look at our eQEP software examples? Those should give you a good starting place to start using the eQEP module.

    Best,

    Ryan Ma

  • Yes, I have gone through them. But due to some reason I was not able to configure it correctly so that I can get periodic interrupt per second. Suggest me some way to achieve this behavior.

  • Hi Kaustuv,

    What submodule within the eQEP are you using to capture the gpio pulse? Are you only capturing one signal? If so, I would recommend using the eCAP to capture this signal. Is there a reason why you're using eQEP instead of eCAP?

    Best,

    Ryan Ma