15.11.2012 Views

LPC2131/2132/2138 User Manual - mct.net

LPC2131/2132/2138 User Manual - mct.net

LPC2131/2132/2138 User Manual - mct.net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Philips Semiconductors Preliminary <strong>User</strong> <strong>Manual</strong><br />

ARM-based Microcontroller<br />

SCK (CPOL = 0)<br />

SCK (CPOL = 1)<br />

SSEL<br />

CPHA = 0<br />

Cycle # CPHA = 0<br />

MOSI (CPHA = 0)<br />

MISO (CPHA = 0)<br />

CPHA = 1<br />

Cycle # CPHA = 1<br />

MOSI (CPHA = 1)<br />

MISO (CPHA = 1)<br />

Bit 1<br />

Figure 36: SPI Data Transfer Format (CPHA = 0 and CPHA = 1)<br />

<strong>LPC2131</strong>/<strong>2132</strong>/<strong>2138</strong><br />

The data and clock phase relationships are summarized in Table 107. This table summarizes the following for each setting of<br />

CPOL and CPHA.<br />

When the first data bit is driven.<br />

When all other data bits are driven.<br />

When data is sampled.<br />

Table 107: SPI Data To Clock Phase Relationship<br />

1 2 3 4 5 6 7 8<br />

Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8<br />

Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8<br />

1 2 3 4 5 6 7 8<br />

Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8<br />

Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8<br />

CPOL And CPHA Settings First Data Driven Other Data Driven Data Sampled<br />

CPOL = 0, CPHA = 0 Prior to first SCK rising edge SCK falling edge SCK rising edge<br />

CPOL = 0, CPHA = 1 First SCK rising edge SCK rising edge SCK falling edge<br />

CPOL = 1, CPHA = 0 Prior to first SCK falling edge SCK rising edge SCK falling edge<br />

CPOL = 1, CPHA = 1 First SCK falling edge SCK falling edge SCK rising edge<br />

The definition of when an 8 bit transfer starts and stops is dependent on whether a device is a master or a slave, and the setting<br />

of the CPHA variable.<br />

SPI Interface (SPI0) 154 November 22, 2004

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!