Arduino Reference - SPISetClockDivider

Arduino

Reference Language | Libraries | Comparison | Changes

SPI

## setClockDivider()

#### Description

Sets the SPI clock divider relative to the system clock. The dividers available are 2, 4, 8, 16, 32, 64, or 128. The default setting is SPI_CLOCK_DIV4, which sets the SPI clock to one-quarter the frequency of the system clock.

#### Syntax

SPI.setClockDivider(divider)

#### Parameters

divider:

- SPI_CLOCK_DIV2
- SPI_CLOCK_DIV4
- SPI_CLOCK_DIV8
- SPI_CLOCK_DIV16
- SPI_CLOCK_DIV32
- SPI_CLOCK_DIV64 or
- SPI_CLOCK_DIV128

#### Returns

None

#### Example

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

©Arduino | Edit Page | Page History | Printable View | All Recent Site Changes