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

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

  • 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

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

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

  • 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 to SPI

    Hi
    Can we read USB device using Labview 8. Our application can be better explain with the help of attached block diagram. Please find the attached Document. In this application , we are using a sensor having SPI interface.Then with the help of National Instruments USB to SPI converter we are interfacing it with the PC.
    My question is can we read the data from a sensor which is connected to PC using NI USB to SPI converter.
    Please reply as soon as possible since it is very urgent.
    Thanks & Regards
    R
    Attachments:
    Document.doc ‏19 KB

    Hi
    In one of our application I have to read the internal register values of the sensors. I am using NI 8451 card.
    Pin Details of the sensors are-
    SDIO – Serial Port Data Input & Output
    XY_LED – Led Control
    NRESET – Reset Pin (active low input)
    NCS – Chip select (active low input)
    VDD5 – Supply voltage
    GND – Ground
    REG0- Regulator Output
    SCLK – Serial Clock Input
    My question is NI 8451 is having separate pins for SDO & SDI But sensor is having one pin for SDIO. How to connect them  ,I have to read the register values & some registers are read/writable.??
    Please reply as soon as possible, it is very urgent
    Regards
    R

  • 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

    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 

  • NI USB 8451 with Sigma Delta ADC interface

    Hello everybody,
    I really apreciate it if you could let me know how can I record online SPI stream from ADS1278 Sigma Delta ADC without any delay.
    Is it possible to use NI USB 8451 card to receive non-interruptable SPI data stream ?
    Thanks a lot,

    Should be possible, as long as your data rate is within the spec of the 8451.   Can't remember it offhand.  What's the clock rate on your data?
    -Matt Bradley
    ************ kudos always appreciated, but only when deserved **************************

  • 8451 I2C clock setting error

    If you attempt to configure the I2C clock on the USB-8451 over the maximum of 250kHz (e.g. 400kHz) you get the error -301702: 'NI-845x:  The supplied clock rate is too low. Refer to your hardware documentation for supported clock rates'. Any value up to 399 kHz is accepted by the configuration property. Trying to communicate afterwards with a clock setting between 250 and 399 kHz results in Warning  301700: 'NI-845x:  The passed-in clock rate was lowered to a clock rate value that the hardware supports. Refer to your hardware documentation for supported clock rates.'
    On the other hand the configuration property accepts an clock rate setting of 1kHz without errors. The manual lists a minimum of 32 kHz. If you try to communicate afterwards, the same error number as above (-301702) shows up.
    Should be corrected in driver software!

    Hi - your statement is correct and the error is fixed in next version 1.2 of NI-845x driver
    So please download it under www.ni.com/support (drivers and updates - search for 8451) when released in future
    Thanks for request
    Best Regards
    AE Munich (Germany)

Maybe you are looking for

  • How can I burn all of my iPhoto videos onto a DVD?

    I record many many live events with my iPhone! I of course back them up onto my Macbook Air's iPhoto, which is also backed up onto an external hard drive. I was wondering how I can just locate all of the video files in my library, put those onto a fl

  • Automatically create ODBC DSN connection with special port and password. Add-OdbcDsn cmdlet

    Hi, I first posted a question in the SQL forum but I'm posting it here instead because its a Powershell question. In a non-persitent VDI enviroment we are trying to automatically create a ODBC DSN connection to a SQL server. We are using Windows 8.1

  • Mail not getting new mail without a rebuild

    I recently changed to an imap server and its working fine on my iphone 4 but my iMac 27" desktop won't get mail unless I rebuild on the mailbox dropdown. It works everytime but its a pain. Apologies if someone else has posted this but I can't find it

  • Can Apple please listen to the users, here's my IPhone 3G Wish List :(

    Wish apple could incorporate these... General - Copy & Paste SMS - need forwarding feature MMS - it's not even there Video Recorder - it's not even there Bluetooth - why can't it support fileshare?

  • Crystal 8.5 compiler

    I am new to this so I apologise if I am posting in the wrong area.  Recently my machine crashed and had to be reloaded.  During the process I lost the ability to compile Crystal 8.5 reports. Does anybody know, where can I get a copy of the compiler?