AMY-6M - Hardware Integration Manual
UBX-17021971 – R07
Appendix
Page 52 of 57
Are there spikes or noise on SDA, SCL or even Vdd? They may result from interferences from other
components or because the capacitances Cp and/or Cc are too high. The effects can often be reduced by
using shorter interconnections.
For more information about DDC implementation refer to the
u-blox 5/6 Receiver Description including
Protocol Specification
C.2
SPI Interface
C.2.1
SPI basics
Devices communicate in master/slave mode where the master device provides the clock signal (SCK) and
determines the state of the chip select (SCS/SS_N) lines, i.e. it activates the slave it wants to communicate with.
The slave device receives the clock and chip select from the master. Multiple slave devices are allowed with
individual slave select (chip select) lines. This means that there is one master, while the number of slaves is only
limited by the number of chip selects. In addition to reliability and relatively high speed (with respect to the
conventional UART), the SPI interface is easy to use and requires no special handling or complex communication
stack implementation in the software.
The standard configuration for a slave device (see Figure 39) uses two control and two data lines. These are
identified as follows:
SCS — Slave Chip Select (control: output from master, usually active low)
SCK — Serial Clock (control: output from master)
MOSI — Master Output, Slave Input (data: output from master)
MISO — Master Input, Slave Output (data: output from slave)
Alternative naming conventions are also widely used. Confirm the pin/signal naming with specific
components used.
S P I S la v e
M IS O
M OS I
S CK
S CS
Figure 39: SPI slave
SPI always follows the basic principle of a shift register. During an SPI transfer, command codes and data values
are simultaneously transmitted (shifted out serially) and received (shifted in serially). The data is entered into a
shift register and then internally available for parallel processing. The length of the shift registers is not fixed, but
can vary from device to device. Normally the shift registers are 8Bit or integral multiples thereof. However, they
can also have an odd number of bits. For example two cascaded 9Bit EEPROMs can store 18Bit data.
When an SPI transfer occurs, an 8-bit character is shifted out one data pin while a different 8-bit character is
simultaneously shifted in a second data pin. Another way to view this transfer is that an 8-bit shift register in the
master and another 8-bit shift register in the slave are connected as a circular 16-bit shift register. When a
transfer occurs, this distributed shift register is shifted eight bit positions; thus, the characters in the master and
slave are effectively exchanged.
The serial clock (SCK) line synchronizes shifting and sampling of the information on the two serial data lines
(MOSI and MISO). The chip select (SCS/SS_N) line allows individual selection of a slave SPI device. If an SPI slave
device is not selected (i.e. its chip select is not activated), its data output enters a high-impedance state (hi-Z) and
does not interfere with SPI bus activities.