4.1 Overview
The multi-protocol translator is implemented using the 8-bit PIC microcontroller with I3C Target, I2C, SPI and UART peripherals. The PIC MCU acts like a bridge between the pure I3C and the I2C/SPI/UART bus. Therefore, the MCU is configured as an I3C Target, I2C Host, and SPI Host. The UART ports of the PIC MCU are also configured. Figure 4-1 shows the block diagram of the implementation using an 8-bit PIC MCU.
In this implementation, the multi-protocol translator transfers the data between the I3C bus and I2C/SPI/UART devices and does not process any data received. As the I3C bus supports high-speed data transfer rates up to 12.5 MHz, the PIC MCU uses DMA channels to read and write from the I3C Transmit and Receive buffers. This ensures the protocol translator keeps up with the high-speed I3C bus frequency. The protocol translator has one software buffer that stores data received in a Private Write transaction from the controller and another buffer to store the payload of the In-Band Interrupt (IBI) transaction, which Target sends to the Controller. The multi-protocol translator consolidates the interrupt signals from I2C/SPI devices and sends them to the I3C Controller through an IBI transaction without using additional pins. Similarly, the controller can reset any I2C/SPI client devices by sending a Target Reset Pattern in the I3C SCL and SDA pins. The number of interrupts and the reset signal on the client devices that the protocol translator can support is based on the availability of the GPIO pins in the PIC microcontroller.
The number of SPI client devices that can be supported depends on the availability of the I/O pins for Client Select (CS) signals. The number of I2C clients connected to the I2C bus is based on the supported addressing mode. The number of UART devices that can be interfaced depends on the availability of UART peripherals in the microcontroller.
The MVIO (Multi-Voltage I/O) peripheral on the PIC MCU allows the I3C and I2C/SPI/UART buses to operate at different bus voltages. For instance, the I3C bus can operate at lower voltages as low as 1V, whereas the I2C/SPI/UART interfaces can continue to operate at up to 5V to be compatible with the I2C/SPI/UART devices.
The table below describes all the pin connections required for this multi-protocol translator. This is based on the latest firmware implementation provided in this Discover example.
Name | Description |
---|---|
I3C2SCL | I3C bus serial clock input |
I3C2SDA | I3C bus serial data input/output |
TX1 | UART1 transmit output pin |
RX1 | UART1 receive input pin |
TX2 | UART2 transmit output pin 1 |
SCK1 | SPI serial clock output |
SDO1 | SPI serial data out |
SDI1 | SPI serial data in |
CS1 | SPI client select 1 output (Active low) |
CS2 | SPI client select 2 output (Active low) |
CS3 | SPI client select 3 output (Active low) |
SCL1 | I2C bus serial clock output |
SDA1 | I2C bus serial data input/output |
INT_PIN1 | Interrupt pin 1 (Active high input). Interrupt occurs when there is a positive edge. |
RST_PIN1 | Reset pin 1 (Active low output). Resets the client device by setting pin low. |
- UART2 TX pin is also used to print debugging messages. Connect a UART-USB converter to print the messages. Note that the receive functionality is disabled for UART2.