user50597: I am using MightyCore and platformio. My config file looks like this
My fuses are set as:
E:FD 
H:D6 
L:8F

I have controller running at 16 MHz and SCK frequency is 8 MHz.
My display is showing white color and that is it. I know to make it function properly I have to use 1 MHz SPI clocking.
If I program CKDIV8 fuse my controller doesn't start. I dunno why, kind of black magic going on there for me. My lack of knowledge is not helpful there.
I tried to use the following tricks:
Setting SPI speed using TFT library
// earlier in main.cpp
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
// later in setup()
tft.setSPISpeed(1000000); // has no effect on SCK

Trying to set it directly via SPI class instance:
// in setup()
SPI.setClockDivider(SPI_CLOCK_DIV128); // no effect

Or statically:
// in setup()
SPIClass::setClockDivider(SPI_CLOCK_DIV128); // still no effect

Also I tried to pass DEFAULT_SPI_FREQ build flag with frequency preset.
I ran out of ideas.
Schematic is here:


user50597: Per this issue setSPISpeed has to be made after initR like this:
tft.initR(INITR_BLACKTAB);
tft.setSPISpeed(1000000);


50597: <p>I am using MightyCore and platformio. My config file looks like <a href="https://github.com/zoonman/nanodds/blob/master/platformio.ini" rel="nofollow noreferrer">this</a></p>
<p>My fuses are set as:</p>
<pre><code>E:FD 
H:D6 
L:8F
</code></pre>
<p>I have controller running at 16 MHz and SCK frequency is 8 MHz.
My display is showing white color and that is it. I know to make it function properly I have to use 1 MHz SPI clocking.
If I program CKDIV8 fuse my controller doesn't start. I dunno why, kind of black magic going on there for me. My lack of knowledge is not helpful there.</p>
<p>I tried to use the following tricks:</p>
<p>Setting SPI speed using TFT library</p>
<pre class="lang-cpp prettyprint-override"><code>// earlier in main.cpp
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
// later in setup()
tft.setSPISpeed(1000000); // has no effect on SCK
</code></pre>
<p>Trying to set it directly via SPI class instance:</p>
<pre class="lang-cpp prettyprint-override"><code>// in setup()
SPI.setClockDivider(SPI_CLOCK_DIV128); // no effect
</code></pre>
<p>Or statically:</p>
<pre class="lang-cpp prettyprint-override"><code>// in setup()
SPIClass::setClockDivider(SPI_CLOCK_DIV128); // still no effect
</code></pre>
<p>Also I tried to pass <code>DEFAULT_SPI_FREQ</code> build flag with frequency preset.</p>
<p>I ran out of ideas.</p>
<p>Schematic is here:
<a href="https://i.stack.imgur.com/fBNKi.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fBNKi.jpg" alt="Schematic" /></a></p>
 50597: <p>Per <a href="https://github.com/adafruit/Adafruit-ST7735-Library/issues/107" rel="nofollow noreferrer">this issue</a> setSPISpeed has to be made after initR like this:</p>
<pre class="lang-cpp prettyprint-override"><code>tft.initR(INITR_BLACKTAB);
tft.setSPISpeed(1000000);
</code></pre>
