From b229812d298443c1203dd5abe14c7ad159740dfa Mon Sep 17 00:00:00 2001 From: Phillip Burgess Date: Sun, 17 Mar 2013 21:10:48 -0700 Subject: [PATCH] Fix(?) for readID returning 0 --- Adafruit_TFTLCD.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Adafruit_TFTLCD.cpp b/Adafruit_TFTLCD.cpp index 223a816..d0aad2c 100644 --- a/Adafruit_TFTLCD.cpp +++ b/Adafruit_TFTLCD.cpp @@ -737,13 +737,14 @@ uint16_t Adafruit_TFTLCD::readID(void) { CS_ACTIVE; CD_COMMAND; write8(0x00); - WR_STROBE; // Extra strobe because high, low bytes are the same + write8(0x00); setReadDir(); // Set up LCD data port(s) for READ operations CD_DATA; - id = read8(); // Do not merge or otherwise simplify - id <<= 8; // these lines. It's an unfortunate - delayMicroseconds(1); // artifact of the macro substitution - id |= read8(); // shenanigans that are going on. + delayMicroseconds(10); + id = read8(); // Do not merge or otherwise simplify + id <<= 8; // these lines. It's an unfortunate + delayMicroseconds(10); // artifact of the macro substitution + id |= read8(); // shenanigans that are going on. CS_IDLE; setWriteDir(); // Restore LCD data port(s) to WRITE configuration