09-06-2012 02:01 PM
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
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-11-2012 09:30 PM
The Chip Select Signals, SPI CS <0..7>, are specifically designed outputs to select other SPI peripheral devices. The P0.<0..7> lines are regular input or output digital lines that you can individually configure. I have included a link to the NI-845x manual which outlines more specifics and all the available line on your NI 8451 device. Hope this helps!
NI 845x Hardware and Software Manual
http://www.ni.com/pdf/manuals/371746c.pdf
Paul-B
09-12-2012 07:36 AM
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
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-12-2012 08:38 AM
From just a communication perspective, the difference is that if you use the "chip select" lines, then the lines are set automatically for you. If you use a digital line, then you have to make sure to set the digital line state yourself.
09-12-2012 12:50 PM
If you use the scripting API, you can use the DIO lines like a CS line. The basic API cannot automatically assert/deassert the DIO lines.