@sheng, there is a reference to a needing a 10K ohm resistor between the MISO pin and GND in the Digole documentation for newer displays. I found the ONLY way I could use SPI was with software SPI. On older displays, the resistor was not needed and hardware SPI worked but only in SPI MODE 1. Is this a newer display? Which model?
The issue I am having is during compiling the DigoleGeoDemo after uncomment #defineDigole_Serial_SPI and DigoleSerialDisp mydisp(A1, A3, A2);
Below is the compiling error:
In file included from ../hal/inc/gpio_hal.h:31:0,
from ../hal/src/stm32f2xx/platform_headers.h:16,
from ./inc/application.h:36,
from digoleGeoDemo.cpp:1:
../hal/inc/pinmap_hal.h:142:14: error: expected ',' or '...' before numeric constant
#define SS 12
^
DigoleGeo.h:125:67: note: in expansion of macro 'SS'
DigoleSerialDisp(uint8_t pin_data, uint8_t pin_clock, uint8_t SS, uint8_t SI = 0) //spi set up
^
In file included from digoleGeoDemo.ino:14:0:
DigoleGeo.h: In constructor 'DigoleSerialDisp::DigoleSerialDisp(uint8_t, uint8_t, uint8_t)':
DigoleGeo.h:130:18: error: 'SI' was not declared in this scope
_SIpin = SI;
^
In the library, there is no #defineDigole_Serial_SoftSPI mode. I could be using an old library.
I have verified UART mode compiles and screen works, just in SPI mode the demo file have compile errors above.
@sheng, this library needs updating. I will try and get to that this weekend. Also, you need to look at page 10 of the programming manual which describes the need for a resistor in SPI mode.