Before you can access your device from LabVIEW, you should configure an alias name within Measurement & Automation Explorer (MAX). Copy and Paste this Alias name to your Device Resource Control. If you do not create an alias, Copy and Paste the Resource Name from MAX to your Device Resource Control.
Refer to the specification for your chip. Below is an example of how the Atmel AT25080A EEPROM is connected:
Table 1. Comparison of pinouts between the NI 8451 and the Atmel AT25080A
* Must be connected to a 3.3V external source.
SPI supported clock rates are: 48 kHz, 50 kHz, 60 kHz, 75 kHz, 80 kHz, 96 kHz, 100 kHz, 120 kHz, 125 kHz, 150 kHz, 160 kHz, 200 kHz, 240 kHz, 250 kHz, 300 kHz, 375 kHz, 400 kHz, 480 kHz, 500 kHz, 600 kHz, 750 kHz, 800 kHz, 1 MHz, 1.2 MHz, 1.5 MHz, 2 MHz, 2.4 MHz, 3 MHz, 4 MHz, 6 MHz, 12 MHz
I2C supported clock rates are: 32 kHz, 40 kHz, 50 kHz, 64 kHz, 80 kHz, 100 kHz, 125 kHz, 160 kHz, 200 kHz, 250 kHz
You can also refer to the USB-8451 Hardware and Software Manual.
Use the advanced API to add a delay or change the clock rate between two sent bytes. These VIs are shown below:
Figure 2. Two VIs used to add delay or change the clock rate
Examples for the 845x ship with the driver. They are installed within the Example Folder of your current version of LabVIEW.
All documentation for the 845x interface is installed to Program Files\National Instruments\NI-845x\Documentation or to the custom path you specified during installation. There are links to these documents from Start»Programs»National Instruments»NI-845x.
The NI USB-8451 and the NI 845x only supports the 4 wire mode.
Streaming 16 Bit Transfers Using the NI-USB-8451
The USB-8451 only supports 8 bit transfers. You can still write a 16 bit number, but there is be a small delay between the 2 bytes (approximately 10-20 us). This is a small delay and is typically not a limiting factor in your program.
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.
The USB-8451 follows the SPI standard, which is to transmit and receive MSB first. We do not provide an option to reverse the bits in software before writing to or reading the SPI data register.