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.

Similar Messages

  • Usb 8451 I2C

    Hi,
    I am using LabView 8.0 with an NI USB 8451 I2C device. The problem I'm
    having is once a DUT fails it causes the next DUT to fail also. Very
    repeatable. Its as if there is a buffer that still has some data in it
    from the first failure or an error flag has been set. I have to restart
    the program to clear up the problem. I'm not sure if its a LabView
    error flag or an I2C "buffer" problem. Also, is there a way to
    initialize the 8451 so I can always start from a known good status? I
    have the same problem with the GPIB driver and the HP meter buffer but
    I've done a workaround by reading the meter twice. The first read is
    garbage but it clears the HP buffer so the second read is valid.
    Thanks in advance for your help.
    Larry Clifford
    Precision Linear Systems

    I had the same problem in 8.2 that I was never able to resolve.  Is the 8451 the only master on the bus or are you tapping into a line that already has a master?  I found the 8451 worked very well when it was the only master but problems popped up on a multi-master setup.  I contacted NI tech support and they assured me the 8451 adheres to the I2C multi-master specs.  Scope traces I took seemed to verify that.  I believe the problem was that the native master on the bus didn't handle multi-master mode correctly.
    Link to thread

  • USB 8451 I2C error 301740 during a write

    I have this USB-8451 I2C device and I do not see any clock activity on the scope on the SCL line (always high). The SDA line is always low when I power-up the device which is an indication of a Start Condition if SCL is high. I have 2K pull-ups on both; the SCL and SDA lines. Without connecting any slave device to it, I do not see any activity on the SCL when I do a write. With the slave device attached, I still get the same error message and on the scope I do not see any activity on the SCL line.
    Any ideas?  The basic vi I wrote is attached.
    Thanks,
    Norberto Collado
    Attachments:
    I2C_NI_driver.zip ‏11 KB

    Noberto,
    I have spoken with Austin, the AE who you were speaking to on Service Request 1728007, and he has indicated that you have sent this device in for an RMA.  Is this correct?
    Is there any other way I can help you in this?
    Drew T.
    NIC AE Specialist

  • 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.

  • How to isolate USB-8451, I2C/SPI Interface

    How can I protect the SCL & SDA lines on a USB-8451 from overvoltage?  The User Guide says:
    Caution Take special care with respect to the I2C SDA and SCL lines. To allow for external
    pull-ups, the circuit protection has been removed. Do not exceed the specified voltages for
    these signals. 
    I've had several instances where my UUT applied 28 volts to one/both of these lines and destroyed my I2C interface.  What can I do to protect these lines?
    Jim 
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

    There are several ways to this. I often use this simple circuit is based on zener diodes and the basic idea is quite similar to some commercial circuits also. The zener diode react quite fast to the surges. Zener diodes also have Low capacitance, so they are suited for high speed data lines. Unfortunately the surge capacity of those zener diodes is not very high, so that they can't handle the large spikes by themselves. That's why I have added 10 ohm resistors in series with data line before the zener diodes. This resistor limits the surge current to safer value for zener diode. The resistor must be always be between the data line and zener diode, so you must plug this circuit in the way where the computer goes to the connector on the right and the data line to the connector on the left. It is possible to make this circuit "bidirectional" just by adding also resistors to the computer side of the zener diodes, but this increased the series resistance in the data line.
    As mentioned there are more advanced circuits. Like active circuits. As an example the ADG467BR. Another option is Zener Transient voltage suppressors like the P6KE11CA. The P6KE11CA is bipolar so you only need 1 diode. But for a low voltage system like yours the zener solution may work fine. Remember to select a zener which can handle the current. If you 28 volt and use a 10 ohm resistor the current will not be higher than  28/10 ampere as a thumb rule. Probably lower.
    Message Edited by t06afre on 01-23-2009 03:41 PM
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    sample.PNG ‏2 KB

  • USB-8451 I2C bus 5V tolerant

    Hello,
    Trying to use the NI-USB-8451 and Labview 2010.
    The 8451 device has option for pull-up resistors (I2C bus) up to 3.3V.
     Are the I2C SCL and SDA pins 5V tolerant?
    Thank you

    the appendix at the end of the manual states
    "Absolute voltage range ...........................–0.5 to +5.8 V with respect to
    GND"  pg A3
    http://www.ni.com/pdf/manuals/371746d.pdf
    Jeff

  • Time-out limit of the 8451-I2C interface for hold-master condition

    I am working with Windows XP, Labview 8 and the USB-8451 I2C to USB interface-box.
    We intend to incorporate the USB-8451 into our product evaluation kits for a new sensor product.
    This evaluation kits should be used by our customers when they start working with our sensor products.
    The I2C-device is a digital sensor which generates a hold-master condition with difference length, depending on the sensor configuration.
    The hold-master is produced by the sensor after full transmassion of  start-bit, address, read-bit and ACK.
    After the hold master is suspended three bytes can be read by the master.
    If the hold-master is kept by the sensor for 25 ms or less I have no problems. When keeping it significantly longer the interface seems not to work properly anymore. I don't get a LabView Error-Message but the PC (Windows?) creates a 'ding-dong' sound very similar to disconnecting and connection a USB device. (the 8451???). My LabView-Program does not show sensor data after this.
    I can imagine that the hold-master is somehow too long for one element in the system.
    Is there any time-out period for hold-master defined for the USB-8451?
    How can I change it to higher values?
    Thank you very much for your support!
    Message Edited by UnexpectedLifeForm on 02-19-2007 09:48 AM

    Dear Member,
    That's right. If somebody encounter this problem again.
    You should contact your local NI branch that will install the new firmware
    version (that works with the last driver version)
    Best regards,
    Nick_CH

  • How can i find 8451 & I2C example code.(Labview 7.1)

    How can i find 8451 & I2C example code.(Labview 7.1)
    ! will have to commuicate Data Read and Write
    (USB-8451 &  I2C(ST24C16) direct connection status)
    I want to Detail text and VI Example.
    Thank you.
    [ps] [email protected]

    If you installed the NI-845x driver, it should have installed in LabVIEW examples in the Example Finder. These will be configured for the 8451 but not necessarily your specific I2C device. The examples are located in the Hardware Input and Output»I2C and SPI folder in the Browse view of the Example Finder. I hope this helps!
    Regards,
    Missy S.
    Calibration Engineer
    National Instruments

  • USB 8451 and PXI-2530B

    Hi All,
    I currently purchased the USB-8451 to use for the SMBus on a circuit board. The USB-8451 has only one port for I2C (SDA, SCL) needed for SMBus and my Board has two SMBus connectors for the Smart Battery control (Batt1(SCL1 and SDA1) and Batt2(SCL2 and SDA2)). I also have a PXI-2530B (Mux) and I would like to use this MUX(2530B) to switch either Batt1 or Batt2 to the I2C of the USB-8451. What wire topology will be the best to use and  how should my connection look like. Any suggestion will be appreciated.
    Thanks for your anticipated response.
    Regards,
    Stan.

    Hi All,
    I am using the USB 8451 I2C/SMBus to communication with my LTC1760 but have all kinds of issues. First, I added an external pull resistor of 4.3kOhms but still have commucation issue. What I am trying to do is simulate a smart battery charging. I set my clock to about 80kHz and my slave address is 0x14 (LTC1760). These are the few errors that I get:
    1.  NI-845x: The I2C master lost arbitration and dailed to seize the bus during transmission of an address+direction byte. This error occurs at the NI-845x I2C Write vi.
    I will appreciate suggestions that will help me resolve this and be able to communicate with the LTC1760. Attached is the manual for the LTC1760.
    Much appreciated.
    Stan
    Attachments:
    LTC1760-SmartBatterySystem-using SMBus.pdf ‏371 KB

  • 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 simultaneo​us I2C and IO

    Hi, 
    I am using the NI USB8451 to communicate with a TI BQ77910A by I2C. The I2C communication works for reading right now but in order to write in the EEPROM registers I need to provide 3.3V using the IO signals. 
    I've tested the IO and generated a signal successfully. My question is: is it possible to simultaneously run I2C and IO on the USB8451. Do they need to be on the same VI in order to operate?
    Thanks,
    Vid
    Solved!
    Go to Solution.

    Yes it works with the NI USB 8451. Though it is worth mentioning only ports P.04 to P.06 are capable of delivering a true steady output voltage of 3.3V.  The other ports seem to struggle in my experience but it is not a bad thing considering that the NI8451 is supposedly only capable of delivering 3.3V. 
    Thanks,
    Vid

  • I2C communication with USB 8451

    I am measuring capacitance using AD7746. I have 10 such CDC's connected through two PCA9547 multiplexers(to avoid address conflict). Can I use USB8451 to collect data instead of a microcontroller. Also Is there is another DAQ with 2 wire I2C communication or is this the only one with I2C.  Also is there some part with 10 I2C channels so I can collect data without using the multiplexer which adds complexity to code.

    hello krtiruth,
    If I understand your question correctly, you would like to know if the USB-8451 is a good choice for your particular chip( AD7746). As long as your chips allowing for different addressing, for you 10 different addresses, the 8451 can be connected to all the chips at once, an address each one individually through their particular address.This should allow you to not need the multiplexers to distribute communication to your various chips. As of right now the USB-8451 is the only I^2C device that National Instruments sells.  Thanks again and have a great day!
    Regards,
    Nicholas K
    National Instruments
    Applications Engineer

  • USB 8451 for I2C

    Hello,
    I am looking for a starting point.
    My problem is I need to communicate with the PCA9555 (http://focus.ti.com/lit/ds/symlink/pca9555.pdf). I have searched the NI website and have come across a USB-8451 that seems to be the answer to my problem.  However, I need to also measure current and this device seems to lack that ability.
    First off, would this be the device I would want to use to communicate via I2C? The only reason I question this is because I cannot access the examples that would give me a good sense that I found what I was looking for.
    Secondly, is there a device like this offered by NI that would be able to communicate via I2C and be able to measure current? Or do I have to purchase 2 separate devices?
    Thirdly, is there anybody out there who has encountered the same problem (possibly with the same PCA9555)? 
    Thank you,
    Gerardo Hernandez 
    Solved!
    Go to Solution.

    Hello,
    I have a USB-8451 on my desk in use, and for ease of use in LabVIEW, you cannot beat it; some example code from one of my apps:
    Here I am just transmitting an constant sequence (an initialisation sequence for my hardware) to a Slave with address 112 (actually an I2C bus all-call address for my devices).
    If you want to keep things easy, I would suggest 2 seperate devices, one being a USB-8451. You can bit-bang I2C, etc at the cost of complexity and dev time.
    Mark B
    ===If this fixes your problem, mark as solution!===

  • I2C Gyro NI USB-8451

    Hi,
    I have finally gotten my Gyro to work with NI USB-8451, but for some reason i get lot of noise out of my signal outputs. I am guessing that i am doing some bit-operation wrong somewhere, attached i have my VI, can one you experts out there take a look and see if i am doing things right?
    ( You can look at my previous thread for reference)
    Thanks in advance
    Solved!
    Go to Solution.
    Attachments:
    I2C Read-INDIVIDUAL.vi ‏28 KB

    Never mind got it right it was just unsigned bit instead of signed.

  • Using USB-8451 device to drive two i2c busses

    Is it possible to use a single USB-8451 device to drive two seperate i2c busses at the same time or do I need to get a second 8451

    I believe these devices act as single bus controller and if you want to control two separate buses, get two devices. An alternative (depending on the scope of your application) would be to use an FPGA device to implement as many controllers as you require.
    Hope this helps.
    StuartR

Maybe you are looking for

  • Payables Interface tables

    Hi all, EBS 11i How do I load my historical data or legacy data to the following tables: AP_INVOICE_DISTRIBUTIONS_ALL AP_INVOICE_PAYMENTS_ALL AP_CHECKS_ALL Thansk a lot

  • Associations and extended objects

    Hi, I'm just beginning to look at bc4j so bear with me if I ask a stupid question :-) The thing is that I'm experimenting with simple inheritance and I cant seem to get the associations to work like I would expect. I have 3 classes (business componen

  • Select max date from a group of columns of type date

    hi , my requirement is i have 5 columns ID, date1,date2,date3,date4. first column is integer type and is primary key and remaining all columns are type DATE the values in the table are for example: ID date1 date2 date3 date4 100 8/19/2007 4:29:44 PM

  • Weird Firefox Issue

    For the last few weeks I've had a strange problem with Firefox.  I usually leave it open for extended periods of time and after awhile when trying to click on a link it'll show a page loading and load the information, but it won't show the new page. 

  • Vbrk and Vbrp tables performance problem

    Hi all, The below query is taking lot of time in QAS i need to decrease the time without affecting the logic.....   SELECT vbrk~kunag        vbkd~bstkd        vbkd~bstdk        INTO TABLE c_tab_po FROM vbrp        INNER JOIN vbrk ON vbrkmandt = vbrpm