SPI Bus Host Adapter - SPI-10


SPI Bus Host Adapter SPI-10 allows to connect different kinds of devices to your PC by using USB-SPI/IO Interface.




SPI Master Interface
  • SPI Master Interface Configuration
  • By using the SPI Interface you can operate with a single master device. The creation of a multi-master SPI system is also possible.

    To start a communication, the master device configures the serial clock (SCK), using a frequency less than or equal to the maximum frequency the slave device supports. SPI Bus Host Adapter supports SPI Interface frequencies as 12 MHz, 3 MHz, 1.5 MHz and less. The SCK logic signal always sent from master device and input to all slave devices. It means that the master device generates the clock signal while sending data. The master device is the active part in the system and always has to provide the clock signal a serial data transmission is based on. You can also configure the clock polarity (CPOL) and the clock phase (CPHA). To configure these parameters you can use DLN_SpiMasterSetCfg() function. To get SPI Bus Host Adapter configuration use DLN_SpiMasterGetCfg().

  • SPI Master Interface Data Transfer
  • The data is transmitted from master to slave device by MOSI (Master Output Slave Input) line. The MOSI logic signal is always generated by the master device and supplies the data from master to slave. When the data is transmitted from slave to master device the MISO (Master Input, Slave Output) line is used instead. The MISO logic signal is always sent by the slave device. MISO is the SPI data coming from the slave device back to the master device. MISO changes state at SCK edges. In SPI Master Interface mode to transmit data you can use the following functions: DLN_SpiMasterRead(), DLN_SpiMasterWrite() and DLN_SpiMasterReadWrite().

    For multiple slave devices system the master device generates a separate slave select (SS) signal for each slave device. In the independent slave configuration, there is an independent SS line for each slave device. A slave device is selected when the master device asserts its SS signal.

    The SS pin plays a main part in the SPI configuration. In master mode, the SS pin must be held high to ensure master SPI operation if this pin is configured as an input pin (or vice-versa in the Active High mode). The master device must select only one slave device at a time. To use Slave Select with SPI Bus Host Adapter use DLN_SpiMasterReadSS(), DLN_SpiMasterWriteSS() and DLN_SpiMasterReadWriteSS() functions. This functions use GPIO Pins with connected SS pins to select slave device to work with.

    Use spi_master application to control your SPI Bus Host Adapter device. When several master devices are connected you can use set_id application to set ID number of specified master device. This application simplifies the ability of calling your master devices. To get ID number of specified master device use get_id application.