I am working on making the Adafruit GFX Library (
https://github.com/adafruit/Adafruit-GFX-Library) work with a TFT display using the ILI9613C controller.
I used a logic analyzer to grab the various codes. It all seems to be working except for one last thing. When I go to draw a pixel with
Code: Select all
tft.drawPixel(tft.width()/2, tft.height()/2, 0x07E0);
It sends the column and page info correctly from the "setAddrWindow" which I implemented. The last thing I do in the setAddrWindow method is to send the "Memory Write" command using "writeCommand". The problem is that the CS line is never going low. I inspected what the Adafruit lib is using (which works when using "sendCommand"). Then tried calling it myself in the overridden method. Then tried just using "digitalWrite" to set the pin state. None of them will drop the CS line low. I'm running out of ideas.
Code: Select all
void AdaGFX_ILI9163C::startWrite(void) {
Serial.println("start write");
Adafruit_SPITFT::startWrite();
digitalWrite(4, LOW);
SPI_CS_LOW();
}
void AdaGFX_ILI9163C::endWrite(void) {
Serial.println("end write");
Adafruit_SPITFT::endWrite();
SPI_CS_HIGH();
digitalWrite(4, HIGH);
}
See a screen grab of the logic analyzer attached.
- Screen Shot 2021-08-20 at 12.04.00 PM.png (44.36 KiB) Viewed 249 times