NI USB 8451

Hello All
In one of the application  ,i have to interface three sensore (please see attached .pdf file) with NI USB 8451 using SPI communication.
I donot know how to interface them ,
please help
It is very urgent
Thanks and regards
Attachments:
ADNS 50205.pdf ‏195 KB

 Hi,
You would bus the SCLK, MOSI and Slave Select signals of the three sensors together. These three signals are then controlled by the 8451 SPI port and one of the Slave Selects.
Each of the 5020 sensor will have a MISO left. You'll use three DIO lines to receive from each of the MISO.
The problem with the 5020 is that the SDIO is bidirectional. So you'll have to use a circuit that can help you separate the signal going from the 8451 and the data coming back from the three sensors. Maxim Semionductor has an application note that does exactly that. Look on the web for their App Note 85.
When you read the motion data, you'll be reading from the same registers of the three sensors and so therfore you'll be able to send the register address on the common MOSI and clock with SCLK.
Now,  set up the DIO port as input and perform a port read. You'll be capturing the motion data from the three 5020 simultaneously. You'll have to manage the accumulation of these bits, each DIO input associates with one of the sensors.
Again, depends on the speed and acceleration of your motion you may have to adjust the SCLK in order to capture all the motion data.
Hope this helps.
Regards,
New LV User 

Similar Messages

  • Using USB-8451 for accessing SMB Slave

    Can i use the following example to read a SMB(System Management Bus) slave device using USB-8451 (since SMB is derived from I2C) .
    Hardware Input and Output > I2C and SPI > I2C Basic > Generate I2C Read.vi
    Thanks
    Baburaj
    SMSC
    INDIA

    The following is the read and write sequence examples , I want to confirm that this sequence is done by General I2C Read.vi .
    Example Write sequence:
    1)      Slave Address 0x58
    2)      Register Address 0x00
    3)      Byte count 0x03 (to write 3 bytes)
    4)      Data Byte 1
    5)      Data Byte 2
    6)      Data Byte 3
    Example Read Sequence:
    1)      Slave Address 0x58
    2)      Register Address 0x00
    3)      Repeat start Slave address (will be 0x59)
    4)      Byte Count 0x03 ( to read 3 bytes)
    5)      Data Byte 1
    6)      Data Byte 2
    7)      Data Byte 3
    Thanks
    Baburaj

  • Need help - I2C write/read with TAOS TCS3414 light sensor using USB-8451

    Hello, I'm new to labview and need help setting up a vi that will allow me to communicate with a digital light sensor (TAOS TCS3414) using a USB-8451. I need to use the sensor to measure light from a light source that I designed and built as part of a project im working on. I've tried looking at several labview I2C exampled but find them to be very confusing. I've used an arduino to interface with the sensor successfully but need to use labview and dont understand how to write the program. The actions are simple; I need initialize the sensor with a simple command and then request data from 8 data registers and then read that data. The data will then be used in further calculations. The portion i need help with is writing and reading from the sensor. I've attached the datasheet for the sensor as a guide. I can also provide the arduino code that i use to read data from the sensor if that would help. 
    Pleae keep in mind that i am completely new to labVIEW. I really do want to learn from this but need quick results so the more help the better. It would greately appreciate any help or explaination. 
    Attachments:
    TCS3414_Datasheet_EN_v1.pdf ‏1806 KB

    Hi Aaron,
    Here you go, this is made with a USB-8452.
    When you run the code tick the power en dac enable box on.
    Maybe you can help me with my problem, I want to use a fiber to sense light from a led.
    Do you use any fiber hardware with the TCS3414?
    gr,
    Attachments:
    TCS3414.vi ‏63 KB

  • USB 8451 no timer / counter ?

    Hi all,
    i´m not sure if i´m in the right topic now, but i found no answer with the search function.
    I tried to generate an digital pulse using timer/counter functions with Labview 8.5 and an USB 8451, but it didn´t work.
    Is it possible that the USB 8451 doesn´t support timer / counter signals?
    Thanks for all your answer!

    Hi AK2DM,
    thanks for catching this one. I missed the important piece of information that the original poster would like to generate pulses. We have a KB-entry for this. You could also generate software-timed pulses with the 8451. The jitter (timing deviation), as you mentioned, could be a problem. The same issue arises with the 6501 I mentioned!
    For generating pulse trains I would recommend a basic E or M series device such as the 6210 USB.
    If you have further questions, don't hesitate to ask.
    Best regards,
    Peter
    Peter A.
    Field Sales Engineer, NI Germany

  • What can I do for using the NI USB-8451?

    Hello, I'm a Research Engineer in LG Display.
    I have a questition.
    I make a program for I2C communication by using the NI USB-8451 now.
    A program is maked by VC++(MS studio 2008).
    I want to read and write data of Gamma IC(BUF08821) made by TI.
    When I excecute READ code , an error occured about device reference. 
    An error massege is " The device reference is invalid. Verify that the supplied device reference contains a valid device name."
    I dont' know what is problem. I need help for solution this error.
    LG Display Co.,Ltd.
    [email protected]
    Message Edited by bumlee on 12-17-2009 01:32 AM

    See this discussion

  • USB 8451-how to set a chip select value

    I need some help on USB-8451 SPI programming using LabVIEW. On the USB-8451 device, there are 8 physical chip select (CS) lines. I will need to program or use all of these CS lines to select one of the 13 SPI slave chips on the circuit board. I know I will have to use the SPI Configuration Property Node to program CS state. What value should I use to set the CS property if need the following CS line states to select one of our chips?
    CS0 = 1; CS1 = 0; CS2 = 0; CS3 = 1; CS4 = 1; CS5 = 0; CS6 = 1; CS7 = 0
    Thanks, Min.

    FYI: VI referenced is attached.
    Chris R.
    Applications Engineer
    National Instruments
    Attachments:
    845x CS Lines Set_modified.vi ‏28 KB

  • Why is my USB 8451 raising errors after working correctly?

    I'm using a USB 8451 to tap into an existing I2C bus.  This bus already has one master and three slave devices on it.  Periodically I use the 8451 to read or write the registers from one of the slaves.  The issue I am facing is that my application starts correctly and works for a period of time.  However, eventually the 8451 will generate one of four error codes and cease working.
    The error codes I'm seeing are:
    301706 - Invalid device reference
    301721 - Unknown status code
    301740 - USB-8451 failed to seize the bus
    301742 - USB-8451 is not responding
    It turns out the original master on the device doesn't play perfectly on a multi-master bus.  I believe error code 301740 is related to that.  I don't understand why the other errors would occur after the device has been operating correctly.  Any ideas?
    Thanks,
    Dave

    Thanks for the response Andy.  Unfortunately NI Spy didn't tell me anything I couldn't figure out for myself.  ("Could not perform operation because of I/O error.")    Maybe you can make something more out of it.  I hooked it up to a usb tracer and all I can see from that is that the usb host times out after ~30 ms and resets the 8451.  You can see the timeout on the Spy capture on line #121, viWaitOnEvent.
    I connected the I2C lines to a decoding oscilloscope and I couldn't find any data transfers being blatently stepped on by either the embedded host or the 8451.  The only thing that comes close is the 8451 sending a restart condition and taking control of the bus from the embedded host.  This only happens when the host is writing a packet to a specific slave ('P').  These particular packets almost never conclude with an end condition.  The host *usually* sends a restart right away.  Several times I have seen where the 8451 issues its own (re)start condition and addresses the slave ("R") I am communicating with through my vi.  I'm not positive this is related to the errors I have seen.
    With the errors I am getting is it possible to reinitialize the 8451 on the fly without forcing the user to disconnect and reconnect it?
    Attachments:
    Capture.spy ‏47 KB

  • Usb-8451 i2c developement

    Generated a simple program to talk to i2c on NSE5310 using usb-8451.  I get the following error.
    Error -301742 occurred at NI-845x I2C Write Read.vi:1
    Possible reason(s):
    NI-845x:  The slave did not acknowledge an address+direction byte transmitted by the I2C master. Reasons include the incorrect address set in the I2C configuration or the incorrect use of the 7-bit address. When entering an address to access a 7-bit device, do not include the direction bit. The NI-845x Basic I2C API internally sets the direction bit to the correct value, depending on the function (write or read). If your datasheet specfies the 7-bit device address as a byte, discard the direction bit (bit 0) and right-shift the byte value by one to create the 7-bit address.
    I do have pullup resistors of 1.5k on both SDA and SCL.  I've attached the data sheet for the device and a sample program. 
    THANKS FOR YOUR TIME.   Happy Holidays.............................
    Attachments:
    NI-8451 Testing ver2.vi ‏13 KB
    NSE-5310_Datasheet_v1_0.pdf ‏1569 KB

    You are providing the wrong address. As the error message says, you must provide the 7-bit address, excluding the read/write bit. . You are providing the full value of the first byte, including the read/write bit. In other words, you are doing the exact opposite of what the error message tells you to do. If you've set the user-bits to 0 then the correct address is 0x40.
    Side-note: When you set a front panel numeric control to hex display you should also display the radix so that others know that it refers to "81" hex, and not "81" decimal, which are two different values.

  • USB 8451 - SMbus with labview: help please

    Dear all,
    I just purchased an USB 8451 and I need to interact with a smart battery using a labview interface. I really need a departure point to build up a VI read/write and finally interact with the battery, and the tutorial on NI website  ( http://www.ni.com/white-paper/5767/en/) seems not too exhaustive to me. I set the I2c configuration property node as specified, but I have some doubts on the adress to put, is it really 1010000 for the smart battery (it is my only slave)... Once this is solved, how to "ask questions" to the battery?
    Could anyone who had the same problem than me post a complete VI I can use as starting point?
    It seems like I must gather much more information about this topic, so, please, any suggestion on how to interact with the battery is welcome....

    Yep, the problem is definitively the adress of the slave (smart battery), which I set to 1010000 as specified in the NI tutorial, but that is not correct, because this is the error message I get when trying to read two bytes:
    Possible reason(s):
    NI-845x: The slave did not acknowledge an address+direction byte transmitted by the I2C master. If you are using ACK polling, consider increasing the timeout. Other reasons include the incorrect address set in the I2C configuration or the incorrect use of the 7-bit address. When entering an address to access a 7-bit device, do not include the direction bit. The NI-845x Basic I2C API internally sets the direction bit to the correct value, depending on the function (write or read). If your datasheet specifies the 7-bit device address as a byte, discard the direction bit (bit 0) and right-shift the byte value by one to create the 7-bit address.
    I also attach my VI 
    Attachments:
    SMbus reading.vi ‏12 KB

  • USB 8451: Is the timeout controllable when doing a I2CREAD I2CWRITE?

    Sorry if this isn't in the correct board.
    I am using the NI USB-8451 to do I2C communication to talk to multiple devices.  I would like to put some functionality into my program to build up a list of devices that are connected on the bus.  It will attempt to communicate all 112 available addresses.  I tried testing this out by connecting the  USB-8451 to no device and communicating to address 10. It took about 5 seconds for the USB-8451 to timeout.  So it would take a lengthy amount of time to do this to all 112 address.  So my questions are:
    Is there a way to shorten the length of the timeout?
    Is there a better way of doing this?
    Solved!
    Go to Solution.

    Hello,
    Although the timeout value is not adjustable, I was able to query all 112 address using the script API pretty rapidly.  Here is the VI I used.  Let me know if it helps.
    Have a great day!
    Message Edited by O_Proulx on 11-05-2008 01:12 PM
    O. Proulx
    National Instruments
    www.ni.com/support
    Attachments:
    Query all addess LV86.vi ‏20 KB
    Query all addess LV85.vi ‏25 KB

  • Integrating an NI-USB 8451 driver and Labview Run-Time Files in an installation package of a .vi application

    Hello,
    I've built a .vi which uses the NI-USB 8451 device (please see http://sine.ni.com/nips/cds/view/p/lang/en/nid/202368), and I would like to create an installation package to be used on a costumer's PC, which has no Labview installed on or a driver for this device.
    I would like to have this installation as a completely stand-alone setup, so that the user could take this file and run it, and have the driver to the 8451, the run-time files for the Labview application installed by themselves,  and have the .exe file working on a completely "clean" PC.
    How can I integrate it all in one package ?
    Thanks,
    Michael.

    Nice hearing from you again, Ipshita
    I do not call any dll's currently, but am using the driver of the USB device, NI-USB 845x, version 1.0.1
    Now, I would very like to make the use of my application, by another user, with no Labview or this driver on his PC, as simple as possible.
    I just thought that maybe I could create an .EXE file with some Labview created dll's, which this executable would use, and spare the need of the 845x Driver or Labview Run-Time library prior installation. I could be wrong.
    What should I do ?
    P.S.
    Meanwhile, I've been playing with the Application Builder and tried to create an installation with the Driver and the Labview Run-Time.
    It had started the compile, but stopped with the following pop-up window: "Locate the 'NI-845x Software 1.0.1' distribution. Labview needs to copy a component installed or updated by the distribution..."
    (Attaching the pop-up window below)
    What is it looking for and where can I find it ?
    Thanks,
    Michael.
    Attachments:
    Installation_pop-up.JPG ‏20 KB

  • What shall I put in the "device reference in" in the Read.vi?? for my USB-8451, where I found the name to be USB0::0x3923::0x7166::01349C20::RAW??

    as title
    what shall I put in the "device reference in" in the Read.vi?? for my USB-8451, where I found the name to be USB0::0x3923::0x7166::01349C20::RAW??
    i put the whole name in and it keep telling me
    Error -301706 occurred at NI-845x I2C Read.vi
    NI-845x:  The device reference is invalid. Verify that the supplied device reference contains a valid device name.
    Thanks!

    Chihway,
    I apologize for misreading your post the first time around.  Dennis is only half correct in this case.  The USB-8451 is supposed to show up as a USB-RAW device in MAX, but you do not have to run the driver wizard to create an interface to it.  In Measurement and Automation Explorer, select the USB-RAW device under USB Devices and create a VISA alias (I always use 8451) by typing it in the "VISA Alias on My System" box.  You should then be able to use that alias for all communication.  I hope this post helps a little more than the last one!
    Sincerely,
    Chris G in AE

  • USB 8451 I2C acknowledge bit problem

    Hello,
    I'm in the middle of developing a I2C interface for a Xilinx Vertex-5 evaluation board.  This is a standard Philips I2C interface and I'm able to view the SCL and SDA lines and everything looks like it should be working but I'm not getting the acknowledge returned on the SDA line. 
    We have flags output on other pins and the acknowledge is working but it seem the SDA line isn't releasing the line to allow the acknowledge to go low. 
    I have tired the write program examples that came with 8.6 but they are for a serial PROM and I don't believe serial PROM return an acknowledge during programming.  I have also tried the example from the "Using I2C with LabVIEW and the USB-8451" and even though all the clocks and data looks good at the proper pins the acknowledge bit stay high. 
    The Discussion Forum has a similar question about acknowledge on a "smbus_Read_Block" (11-9-06) where "newbieLBW" ask about this for a block read.  I have tried that example and created it for a write but I'm still not getting a acknowledge bit to go low.
    I have attached my I2C development vi that is just to prove functionality. And the write routine is in case loop 2.
    Solved!
    Go to Solution.
    Attachments:
    I2C PortCofig_3.vi ‏70 KB

    Matt,
    Yes we have verified that the Xilinx is getting the information it needs and it returning a acknowledge pulse on the 9th SCL clock pulse.  I see this because we brought out the signal to a extra pin on the connector along with start and stop flags to make sure things inside the Xilinx were seeing the input properly.  When I run this program in a debug mode and highlight the data path the only errors I received is from the 'run script' function when the 8451 tried to write the address.
    Quick question for you.  I had mention a discussion forum question about the acknowledge bit on a smbus which is quite like the I2C interface.  In that
    example the read multi-byte function starts with a create script, script clock rate,script issue start, address+write, script write, then another script issue
    start, then it go on to another address+write.  My question is, it seem to me that nothing happens on the I2C SDA line until your data enters the 'run script'
    and I'm not seeing why they have two starts without a run.  I have tried to duplicate the multi read front section to see what it does but mine doesn't seem
    to run in as much as the SDA line never starts unless I have the run script in the read path.  My understanding is that the 'script start and address+write are
    just setup for the run script and without the run script nothing executes.  Yes or No?
    I want to thank you for taking the time to view this question I have.  The purpose for this interface is a future chip we are designing and we are using the I2C for reading and writing control registers within the chip.  I need to get the development platform working before I move onto the full interface and all the registers are 32 bits wide so I'm going to have to do all multi-byte reads and writes.
    I hope I have answer some of your question and will be looking forward to any information you can pass along.  I'm going to be out of the office until the 28th but I'll keep and eye on this forum from home where I'll be working on the full interface design but without the read and writes for now.
    Merry Christmas and the Happiest of New Years to you and your family!
    Gary Tyrna
    Tahoe RF Semiconductor, Inc.

  • NI USB-8451 SPI clock release

    Is it possible to release the SPI clock signal so it reamins high immediately after sending data on the SDO line? Currently, SCLK is held low for a significant period of time after transmission of the final data bit before it is released to a logic high state. Is there a way to configure this? Is there also a way to configure DIO signals independent of the SPI using scripting?

    Hi John,
    I believe you are referring to the clock polarity and phase.
    Where Can I Find More Information About the SPI Clock in a USB-8451?
    http://digital.ni.com/public.nsf/allkb/4FB0A184E545AC1586257609007537EF?OpenDocument
    The information is found here in the NI-845x Hardware and Software Manual:
    http://www.ni.com/pdf/manuals/371746e.pdf#page=26
    Additionally, beyond using SPI scripting, we can use the basic SPI and basic DIO examples installed with the 845x driver in Help > Find Examples.
    Joey S.
    Software Product Manager
    National Instruments

  • Using USB-8451, and AD7747 from Analog Devices to measure capacitance and convert the capacitance to digital output

    Hello,
    I am new to LabView and data aqusition. I have LabView 8.5.1 installed on my laptop, and I studied the Getting Started document of LabView, except the data aqusition chapter.
    I have microfabricated a differential capacitive sensor, and now I want to test the capabilities of my sensor.
    After asking NI engineers, I have been suggested to use USB-8451 with AD7747 (24-Bit Capacitance-to-Digital Converter) from Analog Devices because AD7747 has I2C serial interface.
    I have ordered USB-8451, AD7747, and Evaluation Board for AD7747. And I am waiting for them.
    Are there any suggestions about how to connect my differential capacitive sensor to AD7747, and eventually to USB-8451?
    You may want to know some further information to answer my question:
    *The sensor is similar to the sensor on pages 501, 514, and 515 of "Microsystem Design" book from author Stephen D. Senturia.
    *The datasheet for AD7747 can be reached from this link: http://www.analog.com/static/imported-files/data_sheets/AD7747.pdf
    *My purpose is to make a very precise and accurate "displacement measurement micodevice" by using "the change in the capacitance" during the motion of the mobile fingers of the sensor.
    As an initial challenge for myself, I will feel satisfied if I can measure the capacitance change in my sensor when I apply an external mechanical disturbance to my sensor. For example, there must be a change in capacitance if I just swing my hand from top of the sensor region.
    I am looking forward for your reply,
    Thanks in advance,
    Sincerely,
    sriverfxtr

    Hi Aaron,
    Here you go, this is made with a USB-8452.
    When you run the code tick the power en dac enable box on.
    Maybe you can help me with my problem, I want to use a fiber to sense light from a led.
    Do you use any fiber hardware with the TCS3414?
    gr,
    Attachments:
    TCS3414.vi ‏63 KB

  • USB-8451 SPI interface with analog devices isensor

    Does anyone has example VI using USB-8451 with analog devices isensor? I am new to SPI interface and very slowly learning how to use labview in conjunction with USB-8451 to do SPI sensor reading.
    Any help would be appreciated. I'm using labview 8.5. 

    elpiar wrote:
    It's working!
    Well, I realized I made a small mistake in the example. The number of bytes in the array constant should be 4, not 2. The device is full duplex, meaning you can write and read from it at the same time. The NI-845x SPI Write Read VI returns the same number of bytes as the number of bytes that were written. Thus, with just 2 bytes you will not actually get the current value of the register. You would get the values from the previous command. See attached mod.
    Now if I read the data is burst mode, will the output be automatically be arranged in an array of 8-bit length words? You mention something about send out out 8 clock burst. I'm not sure how I do this. 
    For burst mode you have to send out more bytes so you get clocks generated for the read to occur. The burst mode command is 3E00. That needs to be followed by 12 16-bit numbers for the device to return all the registers from SUPPLY_OUT to AUX_ADC. The actual bytes after the 3E00 are irrelevant for a write. The NI-845x SPI Write Read VI should then return 26 bytes (2 bytes that line up with the 3E00 command, followed by 2 bytes per register, for 12 registers). You can convert this into an array of U16 values and do the conversions based on which register you're actually reading. I've attached a VI to get you started. The example converts the SUPPLY_OUT register and each of the GYRO_OUT registers. You can finish the VI. Note that you should make the 14-bit to 16-bit extension a subVI so you're not duplicating code. 
    NOTE: As with all example code that is provided you should verify that the numbers you get are correct. We don't have the hardware, so we can't verify correct operation. 
    Attachments:
    ADIS16400 XGYRO_OUT v2.vi ‏29 KB
    ADIS16400 Burst Read Example.vi ‏36 KB

Maybe you are looking for

  • How to setup once an Airport home network and keep it alive?

    Hello! I have the following hardware setup: 1 - A Macmini 2009, Ethernet wired to my router which allows the connection to the internet; 2 - An HP Deskjet printer, USB connected to the Macmini; 3 - My wife's laptop PC, WiFi connected to my Mac. My Ma

  • Trackpad woes

    I need some help. The trackpad on my Macbook isn't working properly. I can't drag and drop, and in order to highlight text I need to use the shift key to do so.

  • Why have I lost the up/down arrows on the right side of inbox page?

    The up/down arrows have disappeared. I haven't been able to recover them. Without them, I can't search my full list of inbox emails. I'm stuck. Is there a particular control to retrieve them?

  • 27" iMac superdrive scratching discs

    I have a 27" iMac which I bought about three years ago.  Most of my movie media I purchased through iTunes, so there was no problem.  Recently I purchased a BluRay movie which came with a "digital copy" which required a disc AND a redemption code on

  • How to find out what is preventing imac with os x 10.7.3 going to sleep?

    What does preventing my inac going to sleep? In the morning before i leave to work everything is sound,but at the lunch time its impossible to put it into sleep mode. Tried to quit all apps,but no success. And every single day same story. Any ideas?