Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset issue #18

Open
russli opened this issue Sep 20, 2015 · 0 comments
Open

reset issue #18

russli opened this issue Sep 20, 2015 · 0 comments

Comments

@russli
Copy link

russli commented Sep 20, 2015

I encountered an issue using the graphicstest sketch with an ILI9341 controller.

If readID() is called directly after reset() ( as the graphicstest sketch does )
the ILI9341 does not have enough time to properly reset before readID() is called.
In my case this caused an erroneous id of: 0xC0C0 to be reported.
Adding a delay of 2 ms. between readID() and reset() resolves this issue.

Rather than modifying each sketch, a better solution would of course be to add the
delay to the reset() function within Adafruit_TFTLCD.cpp as follows:

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void Adafruit_TFTLCD::reset(void) {

CS_IDLE;
// CD_DATA;
WR_IDLE;
RD_IDLE;

ifdef USE_ADAFRUIT_SHIELD_PINOUT

digitalWrite(5, LOW);
delay(2);
digitalWrite(5, HIGH);

else

if(_reset) {
digitalWrite(_reset, LOW);
delay(2);
digitalWrite(_reset, HIGH);
}

endif

delay(2);       // add delay here

// Data transfer sync
CS_ACTIVE;
CD_COMMAND;
write8(0x00);
for(uint8_t i=0; i<3; i++) WR_STROBE; // Three extra 0x00s
CS_IDLE;
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Cheers,
Russ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant