adafruit / TFTLCD-Library

Arduino library for 8-bit TFT LCDs such as ILI9325, ILI9328, etc
http://www.ladyada.net/products/tfttouchbreakout/ and http://www.ladyada.net/products/tfttouchshield
327 stars 262 forks source link

Fixing issue with read8 not reading in the proper low value #9

Closed adam-singer closed 10 years ago

adam-singer commented 11 years ago

I dont think the read8() functions properly on the touch shield. This solution fixes readID() to identify the display correctly.

PaintYourDragon commented 11 years ago

I've been doing some heavy datasheet reading and making some adjustments to the code that might fix both the ID issue and the pixel-reading issues (still possibly a bum shield though, esp. with the SD card thing going, so let's keep that ball rolling regardless). If you'd be willing to give it a trial run, that code is currently located here:

https://github.com/PaintYourDragon/TFTLCD-Library-testing

adam-singer commented 11 years ago

I'll take this for a spin tomorrow

adam-singer commented 11 years ago

readID() seems to be working now. readPixel still does not work.

The following arduino code

void loop(void) {
  Serial.println(RED, HEX);
  tft.fillScreen(RED);
  delay(2000);
  Serial.println(tft.readPixel(10, 10), HEX);
  Serial.println("---");
}

prints out

TFT LCD test
Using Adafruit 2.8" TFT Arduino Shield Pinout
Found ILI9328 LCD driver
Done!
F800
1F
---
F800
1F
---
F800
1F
---
adam-singer commented 11 years ago

Check out what this person is doing to read the value, looks like a hack :+1: https://code.google.com/p/lpc1343codebase/source/browse/trunk/drivers/lcd/tft/hw/ILI9328.c?r=178#493

adam-singer commented 11 years ago

nm that comment, I noticed your doing that also

PaintYourDragon commented 11 years ago

Frustrating. I don't have exactly the same hardware here, but it's working with two different displays: one shield (7575 driver), one breakout (9325 driver). Could try adding a few extra RJMPs to DELAY7 in pin_magic.h, but that really strikes me as just shotgun debugging...the code is already following the datasheet spec. Still think it's worth swapping the shield. I might also need to pick up one of the current 9328 shields for testing this. Blargh.

adam-singer commented 11 years ago

Tried adding the extra RJMPs, same results as before. Must say I do enjoy this comment the last line is a radioactive mutant emoticon.

PaintYourDragon commented 11 years ago

Bugger. Did you make that request for a replacement? Because I'm stumped at the moment and can't think of any other games to try in the code.

adam-singer commented 11 years ago

Yep, Thanks! Looks like the request has been shipped.

tdicola commented 10 years ago

Cleaning up issues in this library and it looks like this one isn't active anymore--closing the issue for now.