goodmanrs / u8glib

Automatically exported from code.google.com/p/u8glib
Other
0 stars 0 forks source link

arduino hw spi2x error #287

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
use spi2x with atmega328p@8Mhz and sd1306 sh1106 128*64oled
set spi2x and fclk/4 with u8glib but it run as fclk/4 ,in fact.
spi2x not work.

What version of the product are you using? On what operating system?
u8glib v1.16 for arduino
arduino ide v1.0.5r2
win7 x64

Please provide any additional information below.
copy
"
void SPIClass::setClockDivider(uint8_t rate)
{
  SPCR = (SPCR & ~SPI_CLOCK_MASK) | (rate & SPI_CLOCK_MASK);
  SPSR = (SPSR & ~SPI_2XCLOCK_MASK) | ((rate >> 2) & SPI_2XCLOCK_MASK);
}
"
copy this from spi.h into u8g_com_atmega_hw_spi.c can work at spi2x.
or just use setClockDivider() in my project.
sorry for my poor english.

Original issue reported on code.google.com by gtsyncwo...@gmail.com on 28 Sep 2014 at 4:34

GoogleCodeExporter commented 8 years ago
The problem is not clear to me, how did you enable spi2x with u8glib?

Original comment by olikr...@gmail.com on 29 Sep 2014 at 4:53

GoogleCodeExporter commented 8 years ago
closing...

Original comment by olikr...@gmail.com on 13 Dec 2014 at 5:19