Generation of Single Pulses on GPIO-24 USB-IO adapter

Discussion in 'The Projects Forum' started by jacobs, Apr 13, 2010.

  1. jacobs

    Thread Starter New Member

    Apr 12, 2010
    Hi Everyone,

    I use GPIO-24 adapter: a nice board supporting USB to I/O interface produced by Diolan. I want to create an interface using 6 pressure sensors.

    What I need is to generate a single pulse on a certain pin. Their firmware allows to do it with GPIO_MAKE_PULSE command.

    I specify the length of the pulse. I specify the logical level. I specify the pin.

    The pulse is really and truly generated, but with another length and sometimes with another logical level!!! I have sent several GPIO_MAKE_PULSE commands with various length and logical level parameters. But in vain. The pulse is generated with some constant parameters that are hardly to be influenced.

    Is there anyone using Diolan adapters? Is it the bug of the device or just a "user error"?

    Can anyone help???

    Kind regards,
  2. teledahn

    New Member

    Apr 14, 2010
    hi jacobs,
    are you trying to use gpio_set_pulse_cfg command or gpio_make_pulse command to set pulse parameters?
  3. jacobs

    Thread Starter New Member

    Apr 12, 2010
    As I already stated, I send GPIO_MAKE_PULSE command.
    GPIO_SET_PULSE_CFG command just configures the pulse parameters and doesn't make pulses.

    I've just sent GPIO_SET_PULSE_CFG command and set the desired pulse length and logical level. Then I sent GPIO_MAKE_PULSE command and generated the pulse. This algorithm really worked.

    But that's nonsense: why should I send 2 commands instead of one? GPIO_MAKE_PULSE command has specified bytes for pulse length and logical level. What are they intended for? Why can't I use them?
  4. eblc1388

    Senior Member

    Nov 28, 2008
    In the eight bytes you need to send to the Diolan to achieve the desired pulse output, can you confirm that the MODE byte(the seventh byte, the one before the very last byte) has been set to zero?

    If not zero then Diolan will generate the pulse using memory pulse settings instead of the values supplied by the current Make pulse command.

    If the byte is zero, then you have a firmware bug issue in the Diolan. Please inform the manufacturer.

    But from the look of it that you can get the correct pulse with two commands, the first case is most likely.
  5. jacobs

    Thread Starter New Member

    Apr 12, 2010
    Hi, Chung

    Thanks for the tip!

    I am almost embarrassed to admit that I didn't even check Byte 6: MODE.

    Kind regards,
  6. retched

    AAC Fanatic!

    Dec 5, 2009
    You think that is embarrassing, you should see my wife. At least you can correct your oversight. ;)