USB 8451 SPI Communicat​ion

Hi All,
I am tring to write SPI 16 bits command to TI TLV5638 DAC.
Labview examples are for 8 bits only. can anyone help me?
Thanks,
Eliran. 
Message Edited by Eliran11 on 06-29-2008 02:44 AM

Hi Eliran,
The USB 8451 supports only 8 bit communication.
This KB has a suggestion on how to implement 16 bit commands. "The approach you would take when writing or reading a 16 bit number is
to write or read a byte array of length 2. You can use a Type Cast to
convert back and forth between arrays of 8 bit integers and arrays of
16 bit integers."
Hope this helps!
Warm regards,
Karunya R
National Instruments
Applications Engineer

Similar Messages

  • USB-8451 SPI

    I have a an ADC chip want to control/acquire data using USB-8451 SPI/I2C module.
    I have setupped initial SPI settings (clock edge, polarity, speed etc).
    If i passed SPI command 3F; the ADC will output data continously...
    How can i read this data continously in LV8.5?
    how does the program looks like?
    I tried while loop. but in while loop I am continuously sending commands isnt it?.
    what is the best way to do?
    can some one help me on this?
    naushica

    Bonjour Jerome,
    Malheureusement, cette carte ne peut pas être utilisé en mode esclave.
    Concernant l'utilisation des signaux MISO et MOSI je pense que vous possédez déjà la doc de la carte. Sinon la voici :
    http://www.ni.com/pdf/manuals/371709b.pdf
    Par ailleurs, je vous invite à consulter cette article qui pourrait peut-être vous aider :
    http://zone.ni.com/devzone/cda/tut/p/id/8359
    N'hésitez pas à nous répondre si vous avez encore des questions en précisant quel logiciel vous utilisez (LabVIEW...) et avec quel microcontroleur vous souhaitez dialoguer.
    Cordialement
    Jean-Philippe
    Jean-Philippe C.
    National Instruments France

  • SPI communicat​ion protocol with LabVIEW and 6062E PCMCIA Card. Is it possible?

    Hey people. I'd like to know if it's possible to get SPI communication with 6062E card, and if there is any example of that use.
    Thank you!

    Good afternoon,
    With this hardware NI DAQCard-6062E (for PCMCIA) has inputs / outputs digital and analog, but has hardware that makes USB-8451 communication with SPI. Below is the link to the Hardware. Any questions please contact us.
    NI USB-8451
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/202​368
    graciously
    Mauro Vera
    Applications Engineer
    National Instruments

  • 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

  • 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

  • Looking for USB-8451 SPI example

    Does anyone have a typical SPI example VI for the USB-8451 Interface. I want to program a VI for a SPI device, but I don't know how. This example should include DIO Line programming as well, if possible.

    Hello thmsfrst,
    http://zone.ni.com/devzone/conceptd.nsf/webmain/B380E99DAAD898B38625710F007003C5?OpenDocument
    This link shows an example how to the USB8451 and the SPI  Interace to evaluate a TI  ADC
    The example download does not work so i have attached an example for LV8.0 and one for 7.1.
    If you have further questions don't hasitate to ask
    Stefan
    Attachments:
    example.7z ‏92 KB

  • USB-8451 SPI Read/Write MOSI

    I have a USB-8451 that I am using for SPI communications. The USB-8451 is the master device, and I have no problem sending and recieving data. The problem is that I cannot send what I want to with the USB-8451. When I execute a read command for 16 bit data, the USB-8451 sends 0x0300. I need to send certain commands over SPI in order to get the correct response; ie - send 0x1000, 0x2000, 0x3000, etc. I have not found a way to do this, and it is very critical that I am able to for this project to work correctly. Any suggestions?  

    Hello Johu,
    The SPI Read Write vi has a data write input which takes in an array of bytes.  If you want to ONLY read 16 bit, you have to put an array of 2 bytes which are 0.  Since SPI is a full duplex protocol, it will send 0x00 0x00 and receive 16 bits at the same time.  
    Usually, you send a command before reading.  So, you would send a total of three bytes, the first one being your command.  The first byte returned would not contain any data, since your device is reading the command.  The 2 last bytes would contain your data.  So:
    Bytes Sent         Bytes Read
    CMD                           0 (or should be 0)
    0                                 Data1
    0                                 Data2
    You can download these test panels and try to using them to send your commands and read your data.  
    Please let me know if any of this is not clear or if you need more help with this.  Have a great day.   
    O. Proulx
    National Instruments
    www.ni.com/support

  • Usb 8451 SPI slave mode

    Bonjour,
    peux t on configurer le module USB 8451 en mode Slave.
    comment utiliser les sorties MISO et MOSI
    je cherche a recuper les informations d'un microcontroleur en mode maitre qui envoie des donnees 8 bits ( il fournit la clock , le cs et les donnees )
    merci pour votre aide
    salutation

    Bonjour Jerome,
    Malheureusement, cette carte ne peut pas être utilisé en mode esclave.
    Concernant l'utilisation des signaux MISO et MOSI je pense que vous possédez déjà la doc de la carte. Sinon la voici :
    http://www.ni.com/pdf/manuals/371709b.pdf
    Par ailleurs, je vous invite à consulter cette article qui pourrait peut-être vous aider :
    http://zone.ni.com/devzone/cda/tut/p/id/8359
    N'hésitez pas à nous répondre si vous avez encore des questions en précisant quel logiciel vous utilisez (LabVIEW...) et avec quel microcontroleur vous souhaitez dialoguer.
    Cordialement
    Jean-Philippe
    Jean-Philippe C.
    National Instruments France

  • USB 8451-SPI AD7904

    Hi,
    I am using SPI 8451 Module to send commands to AD7904 (4 input multiplexer ADC).  
    I have set up the VI to read/write from 1 channel only. I have a constant voltage on my input but the read data is constantly varying. 
    i think the problem I am facing is that SPI 8541 can only write 8 bit word and I am writing 16 bit word to my AD7904.
    If someone knows how to make the usb spi 8541 to write/read 16 bit word, then my issue is resolved.
    Thanks
    Allan

    Hi,
      for 16 bit, it should be a case of writing / reading 8 bits twice so using the array of data itself..
    You may need to re-order the either the bit order, or the byte order to match you device though. You can split and join two 8 bit numbers from/to a 16 bit one using the inbuilt vi's on the data manipulation palette.
    For the AD7904 I believe the MSB is the first one in the stream, so you may need to re-order the data to match correctly and since the AD7904 is only actually expecting 12 bits of data, but requires 16 clocks, then you need to make sure you've pushed the data to the correct end of the two 8 bit numbers.
    The timing performing this however might not match to the AD7904 if it introduces a SCLK setup time delay in between each byte (hence an array of them shouldn't generate the delay).
    Have a look at the shipping Atmel AT25080A Read.vi (and the matching write one) under the example finder - search for SPI.
    You should find that there's a 16 bit number split into 2 8 bits for transmission before going into a build array with the 0x3 read command on the front.
    Hope that helps
    Thanks
    Sacha Emery
    National Instruments (UK)
    // it takes almost no time to rate an answer

  • USB RAW Control Communicat​ion in LabVIEW

    Iam trying to open the zipped file by NI "USB RAW Control Communication in LabVIEW".The VI is attached below.It recognized my raw device in VISA Resource Name.Iam using a pendrive.But while running it shows an error 'VISA:  (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it.'I learned this problem from some discussion forums in labview,but can't find a solution.Plz help.Post your valuable suggestions........Also in that example how we will give the request,request type,value,index etc:-.What does it indicates?
    Thanks as kudos only
    Attachments:
    USBRawControl.vi ‏152 KB

    STOP creating multiple posts for your question!
    http://forums.ni.com/t5/LabVIEW/Requirements-to-re​ad-from-a-USB-port/td-p/1959445

  • USB-8451 + EEPROM

    Hi There,
    I trying to replace my standard interface PCB (with MicroChip) with USB-8451 to communicate with EEPROM.
    As I'm quite new to this device, may I know which line should I use to connect to the EEPROM & how to write & read from the EEPROM?
    Thank you in advance.
    Best Regards,
    Norman

    Hi Norman,
    Are you using I2C or SPI to communicate with your EEPROM? Here is a link to the USB-8451 User Guide and Specifications that has pin information. See pages 4 and 5 for pin-out descriptions of the USB-8451. I hope this helps!
    Regards,
    Missy S.
    Calibration Engineer
    National Instruments

  • 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

  • Different voltage levels damaging USB-8451?

    We just started using I2C communications in our product so I am not very familiar with it.  We are using the USB-8451 to communicate with a HCS08 device. The SDA and SCL lines are pulled up to 3.3V on the unit under test with 5.11K. The NI USB-8451 appears to be damaged if the +5V and the +3.3V from the UUT are shorted. The +5V from the USB-8451 is not used. The manufacturing issues have been addressed. We want to keep the device from harm if this mistake happens again.  
    We are not seeing any reason the different voltage level should affect the 8451, but we have a dead device. Any ideas on how this is happening or how to mitigate this in the future?
    Thanks, 
    Larry

    Hi Larry,
    There is information on how to wire the USB-8451 without damaging it on page 3-10 of this manual.  Also take a look at the specifications section in Appendix A.
    Best,
    Jeff S.
    National Instruments

  • 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

  • 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

Maybe you are looking for

  • How do I install an ssd drive in a iMac?

    I have 2 iMacs.  One is 21" 2007 the other is 27" 2009.  Can either accept a 120GB SSD drive?  How do I intstall it and make it my primary drive?

  • User exit in Delivery after the SAVE button is pressed.

    When the Delivery gets picked and Post Goods issued , the Delivery quantity for example instead of 48,000 LBS may be little less say 47,345 LB. We need to update this number in the order quantity which will originally have 48,000 LBS. I need to updat

  • Adobe Acrobat x Pro 10.0

    We are going to use the Digital signature feature of Adobe Acrobat x pro 10.0 for students' assignment. Once student done their assignments they send their work to their supervisors (internal and external) to comment and sign. If we are going to use

  • How long is the mini coax line?

    HHow long is mini coax extender?

  • Migrating Files via Network

    I am trying to transfer my files from my PC to my mac. They are both on the same wireless network. I have tried to connect to my pc via IP, with no success. How to I transfer my files wirelessly? Also, could I do it via bluetooth? Yes, I have read th