m
m
Line 13: Line 13:
 
|P0.16 || 48 || GPIO || RXD1 || SSEL0  || <b>SSEL</b>  
 
|P0.16 || 48 || GPIO || RXD1 || SSEL0  || <b>SSEL</b>  
 
|-
 
|-
|P0.17 || 46 || GPIO || CTS1 || MISO0|| <b>MISO<b>
+
|P0.17 || 46 || GPIO || CTS1 || MISO0|| <b>MISO</b>
 
|-
 
|-
|P0.18 || 45 || GPIO || DCD1 || MOSI0 || <b>MOSI<b>
+
|P0.18 || 45 || GPIO || DCD1 || MOSI0 || <b>MOSI</b>
 
|}
 
|}
  

Revision as of 19:01, 16 June 2015


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 47 GPIO TXD1 SCK0 SCK
P0.16 48 GPIO RXD1 SSEL0 SSEL
P0.17 46 GPIO CTS1 MISO0 MISO
P0.18 45 GPIO DCD1 MOSI0 MOSI

SPI Registers

SPI Register Configuration

Steps for using SPI

Initialize SPI

Send Data

Receive Data

Code

Example 1

Using Explore Embedded Libraries