3 Replies Latest reply on Mar 18, 2015 2:35 PM by JPMontero_Intel

    Parse PPM frame?

    LimXian

      Hi,

      Does anyone know how to parse following signal in Edison?

      I would prefer mraa to parse this pulse train in microseconds.

      http://www.pabr.org/pxarc/doc/opwm_ppm.gif

        • 1. Re: Parse PPM frame?
          JPMontero_Intel

          Hi LimXian,

           

          I’m not sure if I understand what you want to do. Do you need the signal to respond to the inputs of the PWM Channel 1, 2 and 3? If this is the case I’d suggest you to write a function to do the signal manually. The function will be waiting for the PWM channels to be on HIGH at this point the PPM will be set to high and activates a 0.5ms delay then toggle the pin until the next PWM channel is on HIGH and so on for all the channels. If this is not what you are planning to do, please explain it with more detail to see how we can help you.

           

          Regards,
          JPMontero_Intel

          • 2. Re: Parse PPM frame?
            LimXian

            Hi,

            I would like to measure positive period of "input PPM".

            The PPM is provided from other device (i.e. RC receiver).

            The question is that "how can I measure pulse period without loss?"

            • 3. Re: Parse PPM frame?
              JPMontero_Intel

              Hi LimXian

               

              If you want to use mraa maybe the function mraa_pwm_read could help. It reads a signal and display the duty cycle percentage as a float. Another option is to write a small code to be polling the state of the signal to measure the time the signal is on high to calculate the pulse length. I hope this helps.

               

              Regards,
              JPMontero_Intel