Objective

LPC1768 SPI Block

The below block diagram shows the SPI input pins multiplexed with other GPIO pins.
The SPI pin can be enabled by configuring the corresponding PINSEL register to select SPI function.
When the SPI function is selected for that pin in the Pin Select register, other Digital signals are disconnected from the SPI input pins.

Port Pin Pin Number PINSEL_FUNC_0 PINSEL_FUNC_1 PINSEL_FUNC_2 PINSEL_FUNC_3
P0.15 62 GPIO TXD1 SCK0 SCK
P0.16 63 GPIO RXD1 SSEL0 SSEL
P0.17 48 GPIO CTS1 MISO0 MISO<b>
P0.18 49 GPIO DCD1 MOSI0 <b>MOSI<b>

SPI Registers

SPI Register Configuration

Steps for using SPI

Initialize SPI

Send Data

Receive Data

Code

Example 1

Using Explore Embedded Libraries