LPC4088 QuickStart Board - How to Expand

How to interact with the surrounding/outside world?

There are multiple interfaces for the LPC4088 QuickStart Board to connect to the surrounding world, as listed below.

Single wire

  • GPIO pins - General Purpose Input/output pins, which are digital signals that can be either outputs or inputs. The logic level is 3.3V but the pins are +5V tolerant.
  • PWM pins - Pulse Width Modulation pins, which are output digital signals with variable duty cycle and frequency. The logic level is 3.3V but the pins are +5V tolerant.
  • Ain - Analog input signals with 0-3.3V input range and 10 bits resolution.
  • Aout - Analog output signal with 0-3.3V output range and 10 bits resolution.

Serial communication

  • I2C bus - Inter-Integrated Circuit bus, which is a relatively low-speed interface (100/400 kbps). It is a 2-wire, multi-master communication channel for short distances (typically less than a meter).
  • SPI bus - Serial Peripheral Interface bus, which is a 4-wire full-duplex, point-to-point serial bus that supports high bit rates (at least several MHz clock frequency) but over short distances.
  • UART - Universal Asynchronous Receiver Transmitter, which is a 2-wire, point-to-point serial bus that supports medium bit rates (up to about 500kbps).
  • CAN bus - Control Area Network bus, which is a 2-wire, point-to-multipoint serial bus that supports bit rates up to 1Mbps. Note that an external CAN transceiver is needed to implement a full CAN interface.
  • USB - Universal Serial Bus, which is a 2+2-wire (2 data, 2 power), point-to-point serial bus that supports high bit rates, up to 12Mbps (USB2.0 full speed - note that 480Mbps hi-speed is not supported by the LPC4088).
  • Ethernet bus - The Ethernet versions supported on the LPC4088 QuickStart Board is the 10BASE-T and 100BASE-TX, which are 4-wire busses over twisted-pair (TP) wire. It is a point-to-multipoint bus that supports bit rates of 10Mbps and 100Mbps.
  • Wireless - there is provision for wireless modules on the LPC4088 QuickStart Board via the Xbee-compatible interface connector. Most commonly used wireless standards are supported by modules in the Xbee form factor, which makes it simple to support the standard that is needed in the project. Note that a wireless module is not included, it must be purchased separately.

Parallel

  • Display interface, which can drive a display with up to 1024x768 pixels with up to 24-bit color information for each pixel.
  • Memory card interface, which can interface an SD / uSD / Transflash memory card.

Local board expansion

The LPC4088 QuickStart Board does not likely have all the interfaces, pins or functionality needed for your specific project. It is however very simple and easy to expand the module to get the needed interfaces. The most common cases are:

  • need more digital I/O
  • need analog inputs or outputs with specific performance when it comes to input voltage range, resolution and sampling speed.

The solution is to expand via the SPI or I2C bus. Which solution to select needs a little analysis of the system requirements:

  1. If the data transfer need is above 0.5Mbps then SPI should be selected in most cases.
  2. Below this rate, either SPI or I2C can be selected.
  3. Consider number of available pins. With I2C, only two pins (SCL and SDA) are needed while an SPI interface needs three common signals (SCK, MISO, MOSI) and one slave select per connected device. When selecting I2C, the addresses of each device must be checked so there is no collision.
  4. Besides analyzing the needed data rates for transferring the bits to and from the expansion interfaces (more GPIO and/or ADC/DACs) and the available number of pins, it is also good to analyze how transfer operations will happen over time and if there are any real-time requirements.
    • For example, a system might need to sample three analog signals with a high and constant rate of 100kHz. The external ADC has 12 bit precision. That will generate a data flow of 3x12x100.000 = 3.6Mbps. Clearly the SPI interface should be used in this case.
    • Further assume that ten other analog signals are sampled 100 times per second with 16 bit resolution. Every time a sample shall be taken 5 bytes of control data must be written. This means that every 10 ms, 10x16 + 5x8 = 200 bits must be transferred. The total data flow from this sampling is only 100x200 = 20Kbps.
      This may, or may not, be a problem depending on how critical the 100kHz sampling of the three signals above is. Sometimes it is possible to schedule the sampling so that non-critical sampling is done in the idle periods between critical sampling. Sometimes the idle periods in-between critical sampling are too short and cannot be used. If this is the case the solution is to have multiple SPI channels for communication. Critical sampling on one channel and non-critical on another channel.
    • The same reasoning can be done when using I2C channels. It can be better to have multiple, parallel SPI and/or I2C interfaces in order to not disrupt a data flow with real-time requirements.

External expansion (beyond the board)

The LPC4088 QuickStart Board has multiple interfaces for expanding over long physical distance. Often the used expansion interface is dictated by the application, for example if USB or Ethernet shall be used. Sometimes it is a system architecture decision.

The interfaces can be classified into different categories.

Communication distanceInterfaces
Local expansion (mostly) restricted to a pcbI2C, SPI, UART-logic level, GPIO, PWM, ADC, DAC
Communication beyond the pcbEthernet, USB, Wireless, CAN, UART-RS232, UART-RS422/485
ConnectionInterfaces
Point-to-pointSPI, UART-logic level, UART-RS232, USB
Point-to-multipoint (bus)I2C, CAN, UART-RS422/485, Ethernet, Wireless

The ultimate expansion is connecting the LPC4088 QuickStart Board to the Internet, which makes it possible to communicate with virtually any other Internet-connected device. The mbed framework provides the needed middleware software for making the communication a reality.


Usage Examples

See the following sections for a description and usage examples of each interface.
There is an extensive example interface design schematic that accompanies the different How to expand... sections.


Report

Please log in to post comments.