| Electronic Components Datasheet Search |
|
AD5940 Datasheet(PDF) 96 Page - Analog Devices |
|
|
|||||||||||||||||||||||||||||
AD5940 Datasheet(HTML) 96 Page - Analog Devices |
|
96 / 130 page ![]() AD5940 Data Sheet Rev. 0 | Page 96 of 130 SPI INTERFACE OVERVIEW The AD5940 provides an SPI interface to facilitate configuration and control by a host microcontroller. The host controller uses the SPI to read from and write to memory, registers, and FIFOs. The AD5940 operate as a slave SPI device. SPI PINS The SPI connections between the host and the AD5940 are CS, SCLK, MOSI, and MISO. Chip Select Enable The host must connect the SPI slave enable signal to the CS input of the AD5940. To initiate an SPI transaction, the host drives the CS signal low before the first SCLK rising edge and drives it high again after the last SCLK falling edge. The AD5940 ignores the SCLK and MOSI signals of the SPI when the CS input is high. SCLK SCLK is the serial clock driven by the host to the AD5940. The maximum clock speed is 16 MHz. MOSI and MISO MOSI is the data input line driven from the host to the AD5940, and MISO is the data output from the AD5940 to the host. The MOSI signal and MISO signal are launched on the falling edge of the SCLK signal and sampled on the rising edge of the SCLK signal by the host and the AD5940, respectively. The MOSI signal carries the data from the host to the AD5940. The MISO signal carries the returning read data fields from the AD5940 to the host during a read transaction. SPI OPERATION The host is the master of the SPI. The features and requirements of SPI operation are as follows: • SCLK is always slower than the system clock on the AD5940, which is 16 MHz. • When the CS signal is brought low, a multiple of eight clock cycles must be generated by the host. • Transfers over the SPI slave are always byte aligned. • In every octet, the most significant bit (Bit 7) is transmitted and received first. • If the CS signal is brought high at any time by the host, the AD5940 is ready to accept new SPI transactions when the CS signal is brought low again by the host. The minimum time between CS going high and going low again is t10 (see Table 4). COMMAND BYTE The first byte sent from the host to the AD5940 in an SPI transaction is the command byte. The command byte specifies the SPI protocol used for the SPI transaction. The available commands are detailed in Table 125. Table 125. SPI Commands Command Value Description SPICMD_SETADDR 0x20 Set register address for SPI transaction SPICMD_READREG 0x6D Specifies SPI transaction is a read transaction SPICMD_WRITEREG 0x2D Specifies SPI transaction is a write transaction SPICMD_READFIFO 0x5F Command to read FIFO Two main SPI transaction protocols are available on the AD5940: writing to and reading from registers and reading data from the data FIFO. WRITING TO AND READING FROM REGISTERS Writing to and reading from a register requires two SPI transactions. The first transaction sets the register address. The second transaction is the actual read or write to the required register. The following are the steps to write to a register: 1. Write the command byte and configure the register address. a. Drive CS low. b. Send 8-bit command byte: SPICMD_SETADDR. c. Send 16-bit address of register to read to or write from. d. Pull CS high. 2. Write the data to the register. a. Drive CS low. b. Send 8-bit command byte: SPICMD_WRITEREG. c. Write either 16-bit or 32-bit data to the register. d. Bring CS high. 3. Read the data from the register. a. Drive CS low. b. Send 8-bit command byte: SPICMD_READREG. c. Transmit a dummy byte on the SPI bus to initiate a read. d. Read returning 16-bit or 32-bit data. e. Bring CS high. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |