Re: NI general-purpose counter changes

On Mon, 5 Feb 2007, Frank Mori Hess wrote:

> On Monday 05 February 2007 04:37 am, Klaas Gadeyne wrote:
>> I don't see a signal appearing on a scope yet, but I guess this has
>> something to do with the following comment in the head of
>> gpct_pulse_generator.c?
>>
>>   * The example assumes the board has already been configured to
>>   * route the output signal of the counter to an appropriate
>>   * location (you may need to route it to a PFI output line
>>   * for example).
>
> No, I think the routing is fixed with the 660x (at least they don't tell
> you how to change it).  I think the problem is the output pin is not
> getting configured as an output.

Indeed, comparing the old ni_660x code with the new one, the

// Configure Counter for output
writel(pin_is_output(0), devpriv->mite->daq_io_addr +
GPCT_OFFSET[chipset] + registerData[IOConfigReg(chipset,counter_channel)].offset);

seems to be missing.

> With ni_mio_common I use the choose_routing demo (INSN_CONFIG_SET_ROUTING)
> on the PFI subdevice to select what signal to route to a particular pfi
> output.  And I use the dio demo to set the pfi line as an output.  So I
> think something equivalent to the ni_mio_common pfi subdevice needs to
> added to ni_660x (subdevice 0 is free now).  Then it could support
> INSN_CONFIG_DIO_INPUT and INSN_CONFIG_DIO_OUTPUT instructions.

IMHO, it becomes a hell of a job to configure a counter for the user, so I
guess your original suggestion of providing a more high level user API
makes sense :-)

regards,

Klaas

Received on 2007-02-06Z09:20:13