Discussion:
I2C interface using 6552
(too old to reply)
kalyanramuv
2006-10-20 17:40:11 UTC
Permalink
Hi Mark,
Unfortunately, there are no examples on I2C for HSDIO-6552.
Good information on 6552 can be found&nbsp;from this&nbsp;knowledge base : <a href="http://zone.ni.com/devzone/conceptd.nsf/webmain/15de80989fd122188625704d007885ea" target="_blank">http://zone.ni.com/devzone/conceptd.nsf/webmain/15de80989fd122188625704d007885ea</a>
Also, if you are doing I2C communication below 250kHz, you can use NI USB-8451 to quickly develop your application. Here is the link to the NI USB-8451
<a href="http://sine.ni.com/nips/cds/view/p/lang/en/nid/202368" target="_blank">http://sine.ni.com/nips/cds/view/p/lang/en/nid/202368</a>
Hope this helps.
Thanks,
Kalyan
kalyanramuv
2006-10-20 22:10:08 UTC
Permalink
Hi Mark,
&nbsp;
Just clarification for previous post, I2C is do-able using 6552 but there are no examples at present to offer.
However,&nbsp;attached with this post&nbsp;is&nbsp;a sample LV code you can use to get started with I2C Communications. This sample demonstrates writing to an HWS File. You can use the same sample and write onto digital lines using HSDIO Functions.
&nbsp;
Hope this helps. Let me know if you have further questions.
&nbsp;
Thanks,
Kalyan


I2C.zip:
http://forums.ni.com/attachments/ni/70/5673/1/I2C.zip
kalyanramuv
2006-10-23 15:40:15 UTC
Permalink
Hi Haket,
&nbsp;
I am sorry I didn't knew that you were currently using LV 8.0. Attached is the example in version 8.0.
&nbsp;
Thanks,
Kalyan
&nbsp;


I2C_8.0.zip:
http://forums.ni.com/attachments/ni/70/5682/1/I2C_8.0.zip
TheWoost
2006-11-01 20:40:13 UTC
Permalink
Hi Haket, You can trigger the acquisition off of the generation session by routing the Data Active Event from your generation
session as a start trigger to your acquisition session.&nbsp; Please refer to the example Dynamic Generation and Acquisition - Source Synchronous.vi for an idea on how to accomplish this.Using the generation session's niHSDIO Export Signal.vi, select the Data Active Event as the signal and an unused PFI line as the output terminal.&nbsp; Then modify the acquisition session's niHSDIO Configure Trigger.vi for a digital edge trigger off of the same PFI line.&nbsp; As already set up in the example, the acquisition would be initiated first, followed by the generation.Regards,Andrew WNational Instruments
Haket
2006-11-02 02:10:07 UTC
Permalink
Hi Andrew, Thats exactly what I want, no external conections required.&nbsp; I tried to play with that examply like you detailed, but I didnt get it to work.&nbsp;&nbsp; I modified the bundled example see "lv2.jpg"&nbsp;&nbsp; into "lv3.jpg"&nbsp; but was unsure about the generation session as there are two niHSDIO Export Signal.vi instances there.


lv2.jpg:
Loading Image...


lv3.jpg:
Loading Image...
TheWoost
2006-11-02 22:10:12 UTC
Permalink
Hi Haket,

I apologize for not being more clear in my first post.&nbsp; The first niHSDIO
Export Signal.vi instance in the generation session exports the sample
clock to strobe, and the acquisition uses strobe for its sample clock.&nbsp;
The second instance exports the Data Active Event to PFI1 and then the
acquisition session triggers off of PFI2 (with an external connection of these 2 PFI lines).&nbsp; In MAX, both the Data Active Event and the acquisition start trigger have a direct route to PFI1, so you should be able to set both to PFI1 and just let the signal route internally.&nbsp; I tested this and received no errors in LabVIEW for this configuration.Regards,Andrew WNational Instruments
kphite
2008-08-14 20:10:11 UTC
Permalink
It's going on two years now... Any I2C or SPI examples yet?&nbsp;kphite
Haket
2008-08-14 21:10:08 UTC
Permalink
I wrote my own I2C interface and it works fine for my application. I'd be happy to share a copy.
Paul C.
2008-08-15 20:10:06 UTC
Permalink
Hi Kphite,
We don't have any official SPI or I2C examples with the 6552 as of yet.&nbsp; Perhaps Haket and provide his code and that might be a great way for you to get started.&nbsp; We do have some I2C and SPI examples for LabVIEW FPGA to be used with our R-series FPGA cards.&nbsp; This can be found <a href="http://zone.ni.com/devzone/cda/tut/p/id/4799?metc=nsi8203#toc7" target="_blank">here</a>.&nbsp; With all the different flavours of SPI and I2C and the capabilities of our HSDIO line, it would be very difficult to have example code that would help everyone.&nbsp; If you have any specific device or driver related questions though, I'd be happy to help answer them. &nbsp;Regards,
Paul C.

Continue reading on narkive:
Loading...