clock speed SPI

Hello there,

I´ve got a very very simple question XD
Actually I´m using the arduino pro mini (3.3 V / 8MHz) to read some data of an acceleration-sensor.
Via SPI the arduino pro mini comunicates with the sensor.

Right now everything is fine (CSB, MOSI), the only problem I´ve got is the clock-speed of SCK.
According to Sensor-data-sheet the clock-speed has to be 8 MHz.
I only found the code:

 SPI.setClockDivider(SPI_CLOCK_DIV2);

How can I use the max. clock speed of 8 MHz -no devider or something else. The Default-value is 2 MHz.

Thank you very much for your help,
Michael

arduino pro mini (3.3 V / 8MHz)
can only have SPI at 4 MHz as fastest speed, 1/2 the system clock speed:
SPI.setClockDivider(SPI_CLOCK_DIV2);
(and 8 MHz with 16 MHz boards)

You can make it slower: DIV4 (default), DIV8, DIV16 I think are all valid.
Check the SPI library page. 4 MHz will be top speed with 8 MHz clock.

SPI.setClockDivider(SPI_CLOCK_DIV2);

How can I use the max. clock speed of 8 MHz -no devider or something else. The Default-value is 2 MHz.

Not possible.Since you micro is running at 8Mhz the max rate the SPI interface can work is Fosc/2 so you can configure it at a maximum speed 4Mhz clock.
You could change the crystal to 16Mhz and then you will be able to achieve 8Mhz in SPI clock
For more info check the datasheet here in page 174

Thank you guys.

I try it with the arduino pro mini 5V/16 MHz.