MIKROE I2C to SPI Click

I2C to SPI Click is an all-in-one solution which allows serving as an interface between a standard I2C-bus of a microcontroller and an SPI bus, which allows the microcontroller to communicate directly with SPI devices through its I2C-bus. It is equipped with the stacking headers, so it can be easily connected. By offering an I2C-bus peripheral-transmitter or peripheral-receiver and an SPI controller, this Click board™ controls all the SPI bus-specific sequences, protocol, and timing. It also has its own internal oscillator, and it supports the SPI chip select output that may be configured as GPIO when not used.

I2C to SPI Click is supported by a mikroSDK compliant library, which includes functions that simplify software development.

When it comes to communicating between chips on a printed circuit board, two protocols are extremely popular: Serial Peripheral Interface (SPI) and Inter-Integrated Circuit (IIC or I2C). They are both serial protocols with a shared bus supporting multiple devices, but they multiplex their lines very differently. However, both of them are extremely popular, as they are easy to implement, requiring few components and little code, over the other communication protocols. Both rely on serial communication to pass data and support multiple devices on one bus. Many microcontrollers, sensors, and peripherals rely on SPI and I2C to talk to each other. This Click board™ is a perfect solution for numerous needs, such as hand-held and portable equipment, PDAs, palmtops, digital cameras, and other devices that support I2C interface, offering the ability to communicate directly with SPI devices through its I2C-bus.

The design of the I2C to SPI Click is based around two SC18IS602B, an I2C-bus to SPI bridge from NXP. This IC bridges the data communication between the two interfaces, offering many additional features, such as the programmable I/O, internal oscillator option, active low interrupt output, low power mode, and more. The SC18IS602B operates as an I2C-bus peripheral-transmitter or peripheral-receiver and an SPI controller. The SC18IS602B controls all the SPI bus-specific sequences, protocol, and timing. It also has its own internal oscillator, and it supports SPI chip select output that may be configured as GPIO when not used. This allows the software to be easily written or ported from another platform.

The I2C to SPI Click provides a byte-oriented I2C-bus interface that supports data transfers up to 400 kHz. When the I2C-bus controller is reading data from the Click board™, the device will be a peripheral-transmitter. It also can be a peripheral-receiver when the I2C-bus controller is sending data. The SC18IS602B acts as an I2C-bus controller at no time. However, it does have the ability to hold the SCL line LOW between bytes to complete its internal processes.

A peripheral address of the SC18IS602B is comprised of a fixed and a programmable part. The programmable part of the peripheral address enables the maximum possible number of such devices to be connected to the I2C-bus. Since the SC18IS602B has three programmable address bits (defined by the A2, A1, and A0 pins), it is possible to have eight of these devices on the same bus. Therefore, this Click board™ is equipped with three SMD jumpers, grouped under the ADDR SEL label, used to select the I2C peripheral address. By moving the jumpers at the desired position, the user can select the address used for the communication with the host MCU.

The #RESET pin performs the hardware reset of the SC18IS602B IC. The #RESET pin is routed to the mikroBUS™ RST pin and it is active LOW. The #INT allows the host MCU to receive an interrupt from the SC18IS602B IC. An interrupt is generated by the SC18IS602B after any SPI transmission has been completed. Therefore, the #INT of the SC18IS602B is routed to the INT pin of the mikroBUS™ socket. The interrupt can be cleared (INT pin HIGH) by sending a ‘Clear Interrupt’ command, although It is not necessary. This allows more optimized software (firmware) to be written, as the host MCU does not have to continuously poll the LSR register to see if any interrupt needs to be serviced.

The datasheet of the SC18IS602B offers more information about using and configuring the SC18IS602B IC. However, the Click board™ is supported by a mikroSDK library, offering functions that simplify the prototyping and firmware development.

This Click board™ is operated by 3.3V only. To be able to use it with MCUs that use 5V logic level on their communication lines, a proper level-translation circuit should be used.

  • Interface: I2C, SPI, UART
  • Compatibility: mikroBUS™
  • Dimensions: 28.6 x 25.4mm
  • Input Voltage: 3.3V

MIKROE I2C to SPI Click Product Help and Resources

Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

Customer Reviews

No reviews yet.