02-07-2009 09:43 PM
02-09-2009 02:49 PM
Hi Frank -
The IDW library was designed for use with the NI 655x devices. Specifically, it takes advantage of two features on these boards:
You may be able to edit the IDW source code to work with a DAQmx-based device, but you'll have to work with only a subset of the functionality. Here are some pitfalls and workarounds I can see:
It's not an impossible task, but it's largely simplified by the 655x's features.
02-09-2009 03:30 PM
Thanks for the response. I think I'll use a micro with hardware I2C for this, sounds like it will be easier but I have a question. I downloaded the 3 examples ( IDW Transmit, Receive and Combined and opened all of the VIs to see what was going on. Each of the VIs add the locis state and timing information for an I2C function (Start, Ack, etc.) and append it to 'Data Type of Wire and when all the functionality has been appended the data is converted to a waveform and displayed. Where is the interface to the actual hardware I/O port lines for the SCL and SDA signals implemented? I didn't see any hardware task or physical channel hooks.
02-09-2009 03:42 PM
Hi Frank -
There aren't any. I had to scope this project to some degree, and since there are so many hardware options and two different drivers (NI-DAQmx and NI-HSDIO) available for a task like this, I decided to provide a tool that just helps you build a digital waveform (DWDT) for this protocol. It doesn't do any of the work of configuring your specific hardware with your preferred driver; making an encompassing tool for all the existing permutations alone would be really hard. And supporting such a tool for future releases of NI hardware and drivers would require me to quit my day job. 🙂
I will admit my plan to publish one or two examples that utilize this component in a hardware-based application. I can't promise a delivery date on those, as they get prioritized against lots of other tasks, but the first such example should be up "soon".
02-12-2009 05:04 PM
Hi all -
An update to IDW has been released and can be downloaded on the main page. Changes (bug fixes and new features) in v1.1.0 are listed in the readme file.
03-11-2009 05:12 PM
I adjust timing parameters tSU;DAT and tHD;DAT to find the minimum required values by device. But when the parameters are set below 100 nS, output waves stop responding to the settings, the setup and hold time are measured 100 nS regardless of the settings.
How can I remove or reduce the 100 nS overhead?
03-12-2009 09:37 AM
Hi Anne -
What's your device's sample rate? And what are your desired timing settings?
Can you post the code that doesn't work?
03-12-2009 11:16 AM
The attachment is a simplfied version of the current program.
Vih - controls bus voltage using NI-4130 or an external power supply. Vil is set by NI-6552.
I2C clock - sets CLK frequency. Default value is 400K.
Timing parameters are listed at the bottom of front panel.
I edited Mode Timing.dat so the program can pass timing validation.
03-12-2009 11:57 AM - edited 03-12-2009 11:58 AM
Hi Anne -
Looking at the default values in your controls and indicators, and at this snippet of code that configures the sample rate fo your HSDIO device:
I suspect that it's getting configured to a rate of 10 MHz or less. On a 10 MHz sample clock, waveform samples are spaced 100 ns apart. This limits the edge placement resolution to multiples of 100 ns. To increase the resolution, you have to increase the sampling rate. (20 MHz ---> 50 ns, 50 MHz --> 25 ns, 100 MHz, 10 ns)
Remember that the 655x uses divide-down sampling of a 200 MHz onboard oscillator to generate the sample clock. This means that not all configured rates are actually achievable. For example, if you try to configure the board to run at 10.2 MHz, it'll coerce the rate to 10 MHz (200/20). To find out what the actual rate is -- and, if you want, change your selection dynamically based on that information -- query the Timing >> Sample Clock >> Rate property from the HSDIO session.
Something else I noticed, too: You wrote an algorithm that appends samples to the I2C waveform in order to coerce its length to a multiple of 2 for the HSDIO board. This functionality is already present in v1.1.0 of the IDW. Just wire a value of "2" into the Sample quantum input on the IDW:Close VI.
03-12-2009 05:36 PM
Your suggestion of resetting sample rate worked. I am very pleased, though realize that I won't be able to set a near 0 nS setup time. Current sample clock is 98.5M hz. The minimum displayed setup time is 10nS.
I downloaded the IDW 1.1.0. Is "Dig Waveform to Prepend" in Close.vi the same terminal you call Sample quantum?
Thank you very much!