8451 SPI Chip Select

I have a USB-8451 which I plan on using for SPI communication to several SPI devices.  I understand how to use the chip select to talk to one device at a time, but my issue is that I need to talk to 9 devices and I only have 8 chip selects.  I could buy a second one just to talk to one device, but is there something special about the chip select outputs on this device?  Or are they just normal digital lines, and I can use the P0.0 as my 9th chip select?  Thanks.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

I appreciate the link, and I'm aware that there is a difference between a chip select pin, and a normal digital in/out line, but it is not clear to me what the difference is.  I guess my question was if I could use a digital out line, as another chip select line?  What makes a chip select line different from a digital out line?  
When I was looking up how a chip select line worked, it looks like it just turns on before the transmission starts, and then off after the transmission is over, so why can't I just use a digital line, and turn it on, then send the output then turn it off?  One thing I did notice is the voltage logic for SPI seems to be selectable but 3.3V is the most common, so I would need a external circuit (zener diode), to limit my 5V digital out to the 3.3 that a chip select line uses.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

Similar Messages

  • SPI Chip Select Issue

    I am using cRIO-9023 and Chassis 9112 with NI-9401 Digital I/O card for the SPI. I want to integrate the SPI GYRO sensor module but unable to make the Chip Select LOW. I am using the SPI_SINGLE_PORT_EXAMPLE have changed the RT controller to my desired controller and added the FPGA modules too. To start the SPI interface it is mandatory to make the CHIP SELECT  ACTIVE LOW so that the SCLK may be generated then a 8 bit data is written and then wait for the READ data, when communication is finished the Chip Select may go HIGH to end communciation.
    I have read the document at URL: https://decibel.ni.com/content/docs/DOC-7945
    but unable to make the chip select low, can somebody make me correction where I am making a mistake .
    Thanks
    Ather Iqbal
    Attachments:
    FPGA_Top_Level_cRIO_Main.vi ‏77 KB
    Example_Host_cRIO.vi ‏165 KB

    Its Pmod Digilent GYRO L3g4200d 
    Attachments:
    27911-GyroscopeL3G4200DDatasheet(1).pdf ‏1280 KB
    spi_timing diagram_gyro.pdf ‏406 KB

  • 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

  • What is the pin map for chip select on LM3S8962 for "ARM SPI Create Configuration Reference.vi" ? (0 through n)

    Hello All,
    When the LM3S8962 is the master, what pin is used when chip
    select is the default (0), or another value ?
    Despite this question being asked a few ways in the forums,
    NI's "ARM SPI Create Configuration Reference.vi" documentation
    for chip select is unclear.
    TI's manual is no help for NI's implementation of chip select.
    NI's help for the above subvi seems not only too generic (perhaps
    written for the SDK ?),  but erroneous in that it reads:
    "chip select specifies the chip select line to assert during the
    SPI transfer. The chip select line must connect to the EEPROM
    on the
    microcontroller. Refer to the documentation for the SPI
    device for information
    about chip select lines."
    This is useless as the ARM microcontroller has no EEPROM and 
    the SPI slave device documentation only covers its own pins.
    The hope is to have more than one slave on the LM3S8962's single SPI bus,
    without chewing up a additional pin using elemental I/O like the splendid forum
    examples for ADC's and DAC's.  This would save diagram real estate compared
    with two sequence frames that are typically shown toggling a elemental I/O digital
    output before and after writing and/or reading from the slave.   It also would clarify
    what on chip resource trade offs there are for each chip select number chosen.
    (as most pins have multiple possible functions)
    Thanks in advance for any light on this.   Please don't post info on other processors
    to this thread as this taints future searches on this issue with this tier 1 target.
    Best,
    Davy

    Hi Davy,
    While doing research on this question, I was informed that you have been working with a colleague of mine, Joel, via email for this same question. So that we do not have multiple engineers working on the same issue, Joel will be your point of contact for this issue. I ask that when you have come to a resolution, that you post that resolution here so that other customers can reference this information.
    Thanks!
    Aaron P
    National Instruments
    Applications Engineer
    http://www.ni.com/support

  • 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

  • Chip select arm

    Hello,
    Sorry for my bad english (i'm french).
    I have a problem, i use a ARM LM3S8962 and i would like know how can i program the chip select value on the Labview software?
    For example: I use the the port PB3 so the CS value must be ....
    Thank's.
    Florian

    Bonjour,
    Et merci d'avoir posté sur ce fourm.
    Bien qu'il semblerait que vous ayez déjà installé le module NI LabVIEW Embedded for ARM Microcontrollers, voici plusieurs liens qui pourraient être utiles, que ce soit à vous ou à d'autres:
    Présentation générale du module
    Lien de téléchargement du module
    "Getting Started"
    Créer un projet pour un microcontroleur ARM
    Désirez-vous savoir comment on saisit l'adresse pour le Chip Select sous LabVIEW ou souhaitez-vous l'adresse du PIOB pour accéder au PB3 de votre ARM LM3S8962?
    Cordialement,
    Jérémy C.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • 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

  • 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

  • SPI Converter Selection

    Hi All,
    We are developing an application in LabVIEW to test the DUT through the SPI interface.
    The DUT has the two SPI interface.
    One SPI interface is used for sending the request command from LabVIEW application (PC COM port or USB) to DUT (SPI BUS). By this time LabVIEW act as Master and DUT act as a Slave. For the request communication clock is generated from the Master. Slave use that clock for data transmission to DUT.
      Another SPI interface is used for sending the response command from DUT (SPI Bus) to LabVIEW application (PC COM or USB). By this time DUT act as Master and LabVIEW application act as a Slave. For the response communication clock is generated from the Master (Clock rate is 18 MHz). Slave use that clock for data reception.
    Here I need a converter for converting the COM or USB signals to SPI signals. Please let me know which converter is best suitable for this application.
    Thanks and Regards,
    Bharathi Thiruppathi
    Attachments:
    Test Setup.JPG ‏20 KB

    talk to sukesh once...
    Regards
    Guru (CLA)

  • 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

  • I am trying to use the RS232 to control a circuit board. It would have to simultaneously output SerialClock, DataIn, and Chip Select signals, while also receiving DataOut signals; therefore 4 signals total. Does anyone know if it this is possible?

    I am trying to splice 4 wires out of the RS232 serial cable (the 9-pin type) and wire them to a circuit board. The 4 wires would control 4 signals: DataIn, DataOut, SerialClock, and ChipSelect. The serial clock would synchronize the DataIn and the ChipSelect is asynchronous. DataOut must coincide with SerialClock also; therefore there are 3 signals that must be able to switch concurrently. All the handshaking enabled by RS232 is thus unnecessary in my opinion. Does anyone know of how this can be done?

    I am trying to splice 4 wires out of the RS232 serial cable (the 9-pin type) and wire them to a circuit board. The 4 wires would control 4 signals: DataIn, DataOut, SerialClock, and ChipSelect. The serial clock would synchronize the DataIn and the ChipSelect is asynchronous. DataOut must coincide with SerialClock also; therefore there are 3 signals that must be able to switch concurrently. All the handshaking enabled by RS232 is thus unnecessary in my opinion. Does anyone know of how this can be done?

Maybe you are looking for

  • How to completely reset iMessage on MacBook Pro

    I have tried literally every single thing, including scheduling an appointment with AppleCare... to which I got disconnected and never received a callback.  My iMessages on my Mac is not sending messages to any iphone.  I would just like to simply RE

  • I lost my iphone. How can I get my saved data from back up on my new laptop?

    Dear Friends, I did a mistake as when selling my iphone I did not get my saved data from my iphone back up. Now I have a new laptop and I want to get my backed up data. Is there any way I could get or as Apples traditional greed ... more money more m

  • Select columns from table for display in alvgrid.

    Hi all, i have the following: i do select a tablename and pass it as a parameter. then this table is loaded into an internal table and displayed in an alv-grid. what i now want to do is a step  between the both: after the internal table with its stru

  • How to do Analysis in  ST03? Any sample documents or explanation?

    Hi experts, Can anybody explain me how to analyze the parameters and take respective actions in ST03 Tx code..i.e BW technical content.. I would really appreciate if you have a document related to analysis on ST03.. thank you kishore karnati

  • How check the number range buffers in bw..

    can any one tell me the procedure... how to  check the number range buffers in sap bw,,,,can any one help me on this??? regards