SPI-to-UART Expander

Related Products

Reference Design LogoSPI and UART are among the most commonly-used protocols in today’s embedded applications. Often, there is a requirement to expand a single SPI master to several UART interfaces or to have a bridge between SPI and UART interfaces due to peripheral limitations in processors interacting with each other. The SPI-to-UART Expander provides a cost-effective solution for communicating from a host processor’s SPI bus to multiple UART devices. This reference design acts as a SPI port expander, multiplexing and demultiplexing read/write data through the SPI slave to multiple UARTs using iCE40™ FPGAs.

The SPI-to-UART Expander interfaces the host processor/microcontroller’s SPI master to a number of UARTs through a SPI slave.

Features

  • SPI slave which interfaces with the SPI master in the host processor and acts as a port expander
  • Multiplexer/Demultiplexer to write/read data from UARTs. This interface module selects the appropriate UART device based on address and mode bits on the MOSI frame and performs the following operations:
    • Writes the configuration register and configures baud rate, data length, enables/disables parity and parity type (even/odd)
    • Writes data to the UART write register/FIFO
    • Reads data from the UART status register
    • Reads data from the UART’s read FIFO. This data is communicated to host processor through the MISO line. The SPI slave operates in CPOL = 0 and CPHA = 0 mode, MSB first read/write and is configured for a 16-bit SPI data frame.

Jump to

Block Diagram

Performance and Size

Device Family Utilization (LUTs) Language fMAX (MHz) I/O Pins Architectural
Resources
iCE40™ 245 VHDL 755.28 172 PLB

Performance and resource utilization characteristics are generated using iCE-40HX8K-CT256 with iCEcube2 design software.

Note: The performance and design sizes shown above are estimates only. The actual results may vary depending upon the chosen parameters, timing constraints, and device implementation. See the design's documentation for details. All coding and design work was done on a PC platform unless noted otherwise.

Documentation

Technical Resources
TITLE NUMBER VERSION DATE FORMAT SIZE
SPI-to-UART Expander - Documentation
RD1143 1.0 10/12/2012
SPI-to-UART Expander - Source Code
RD1143 1.0 10/12/2012


Like most websites, we use cookies and similar technologies to enhance your user experience. We also allow third parties to place cookies on our website. By continuing to use this website you consent to the use of cookies as described in our Cookie Policy.