Closed amyspark closed 5 years ago
Hello,
Did you try this display with other mcu and ssd1306 library? Could you please check it with Arduino nano, if you have one. First, I need to understand if the issue relates to Atmega2560 only. I have some st7735 (128x160, don't know the manufacturer exactly), and it works with Arduino Nano and Esp32 Dev boards. For now, I can only compare to Adafruit source code, and try to understand, what works differently.
Nothing with 1.7_dev.
As for other MCUs-- my only other is an Arduino Uno (which is still AVR). I should have a STM32 blue pill in a few weeks, I could try then.
If something of above works for you, I would like to ask you to help with debugging.
Here are my comments
Please, check latest changes. At least on my st7735 128x160 led display, both Adafruit_ST7735 and ssd1306 (1.7_dev) works (with Arduino Nano).
@amyspark Hello Are there any updates?
Hey @lexus2k , I've been busy this week. I'll be able to test again in the weekend.
(As for testing in other mcu's -- I think they'll arrive by the end of the month.)
@amyspark
Thank you. Hope to see feedback soon.
Hey @lexus2k, it works now! I had to disable CONFIG_AVR_SPI_ENABLE
and use Arduino's SPI implementation.
EDIT, in case my earlier comment wasn't clear: the proposed fix works if (and only if) I do not use the provided SPI implementation, and stick to Arduino's. Previous commits do not work in Arduino Mega.
Thank you very much. I appreciate your help. I will prepare official fix soon
It seems that I fixed built-in SPI issue for Atmega2560. But by default, I switch library to use Arduino's SPI implementation by default, since I don't have Atmega2560 by hand. You can check internal SPI implementation by commenting out CONFIG_PLATFORM_SPI_AVAILABLE.
@lexus2k, I can confirm your SPI implementation works now (uncommented CONFIG_AVR_SPI_AVAILABLE
and kept UserSettings.h as is). Thanks for the fix!
ok. Thank you.
Describe the bug The library refuses to run on Arduino Mega 2560, it fails to initialize at all when using a ST7735-based TFT controller.
To Reproduce Employ any of the provided examples. Point
rstPin
to pin 8,cesPin
to pin 10, anddcPin
to pin 9 in the relevantst7735_128x160_spi_init
call, and wire SCK to 52 and SDA to 51.Expected behavior I expected anything (even garbage) to appear on the screen.
Screenshots I don't have any, as the bug doesn't output any information.
Please complete the following information:
Additional context I've been able to reproduce this as far as 1.6.0 (first release to support st7735). The Adafruit ST7735 examples also work with exactly the same wiring.