Announcement

Collapse
No announcement yet.

pin_PulseoutCount(pin, frequency, count, function);

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • pin_PulseoutCount(pin, frequency, count, function);

    Hi,
    Using the pin_PulseoutCount
    ref: DIABLO16_internalfunctions_R_2_0, page Section 2.1.20 page 47 / 491

    Can not pass on parameter using the 4th argument, "function"?
    Ex: pin_PulseoutCount(PA6, 5000, 7500, CallThisFunc(5));

    Also, no error when compiling with no Parenthesis;
    func CallThisFunc(var Num)
    Dummy := Num;
    endfunc

    pin_PulseoutCount(PA6, 5000, 6000, CallThisFunc);
    or
    CallThisFunc;

    But Error if:
    CallThisFunc();

    Please, let me know

    Yves C.


  • #2
    Hi Yves,

    Can you try this sample code for the pin_PulseoutCount() function? You may use this code as a reference for your program.

    Hope this helps and Best Regards,
    Attached Files
    Eran

    Comment


    • #3
      Hello Eran,

      Its working fine, many thanks

      Using this function, is there a way to "get" the remaining pulse count?


      I’ve tried to peek: PIN_COUNTER_PA6, but it always returns 0

      ?

      Yves C.

      Comment


      • #4
        Hi Yves,

        You may try this sample code that I made for you. This uses a sys_T() function to get the value of the system Timer.

        You may know more about this function in the DIABLO16 Internal Functions Manual.

        Hope this helps and Best Regards,
        Attached Files
        Eran

        Comment


        • #5
          Thank you Eran, will try it as soon as possible


          Yves C.

          Comment

          Working...
          X