username 198 Posted August 8, 2013 Share Posted August 8, 2013 Quick update, new version of this board coming in about 3 weeks. W00t! looking forward to it. Quote Link to post Share on other sites
RobG 1,892 Posted August 30, 2013 Author Share Posted August 30, 2013 I will have new batch of touch LCDs in about 3 weeks (have to redo PCBs due to a small mistake.) bluehash 1 Quote Link to post Share on other sites
bluehash 1,581 Posted August 31, 2013 Share Posted August 31, 2013 I will have new batch of touch LCDs in about 3 weeks (have to redo PCBs due to a small mistake.) photo-nt.jpg hmm Quote Link to post Share on other sites
luke 9 Posted September 20, 2013 Share Posted September 20, 2013 Hi Rob What's the status of the new batch? Also, could you release the new schematic? Cheers Luke Quote Link to post Share on other sites
RobG 1,892 Posted September 20, 2013 Author Share Posted September 20, 2013 I have 20 LCDs sitting on my desk, but there was a problem with my PCBs. New PCBs should be here in few days. Quote Link to post Share on other sites
RobG 1,892 Posted October 21, 2013 Author Share Posted October 21, 2013 After weeks of delays, they are finally here! Available on Tindie PTB and bluehash 2 Quote Link to post Share on other sites
RobG 1,892 Posted October 30, 2013 Author Share Posted October 30, 2013 Here are schematics 2.2 Touch LCD v1.pdf2.2 Touch LCD v2v3.pdf This is the latest board 2.2 LCD Touch v4.pdf luke 1 Quote Link to post Share on other sites
luke 9 Posted October 30, 2013 Share Posted October 30, 2013 Thanks for the schematics! The build quality of these boards is first rate. Beautiful product Rob. RobG 1 Quote Link to post Share on other sites
kodi 16 Posted November 27, 2013 Share Posted November 27, 2013 Rob, do you have any of them left? Quote Link to post Share on other sites
RobG 1,892 Posted November 27, 2013 Author Share Posted November 27, 2013 Yes, I do. Quote Link to post Share on other sites
StupidPig 10 Posted March 29, 2014 Share Posted March 29, 2014 Looking for some help..... I just brought two 2.2 Touch LCD (marked was v4) from Tindie, and the display is great, but somehow the touch part is not quite working right. I tried the CCS hrd_spi_max posted by username, and the energia LCD22_Touch by RobG. X axis reading seems ok, but both got the Y axis reading screwed up. The Energia one seems got the Y upside down, and the hrd_spi_max just keep saying the Y is 7, with some random reading occasionally. Did I do something wrong? And I'm using 2553 Launchpad. Quote Link to post Share on other sites
RobG 1,892 Posted March 29, 2014 Author Share Posted March 29, 2014 v4 BoosterPacks use new display type, which has Y axis inverted when compared to the old one. @@username, @@Rei Vilo, could you suggest changes to make this work? Quote Link to post Share on other sites
StupidPig 10 Posted March 29, 2014 Share Posted March 29, 2014 v4 BoosterPacks use new display type, which has Y axis inverted when compared to the old one. @@username, @@Rei Vilo, could you suggest changes to make this work? So the Inverted Y is by design? If so I think I can just change the program to invert the Y value and make it work. Thanks. Edit: Yup, the touch work wonderful after I changed the Y axis mapping from (y0, 195, 1859, LCD_HEIGHT, 0) to (y0, 195, 1859, 0, LCD_HEIGHT); BTW, the X mapping seems a little bit off with the (311, 1632) input, but changed it to (195, 1859) sames as the values used for Y and it work perfectly. So, the touch input actually is a square instead of a rectangle? That's strange. Quote Link to post Share on other sites
RobG 1,892 Posted March 30, 2014 Author Share Posted March 30, 2014 The original touch panel came with questionable documentation and I think the Y axis was marked incorrectly. As for the X values, yes, I have noticed that too. Quote Link to post Share on other sites
StupidPig 10 Posted March 30, 2014 Share Posted March 30, 2014 OK, I made some change to the Energia lib to get my v4 board work as what I want. Not sure what's the best way to get the lib updated, but here is what I changed, and may be someone more experienced on make lib can include that to the lib. LCD22_Touch.h add the following: // orientation #define ORIENTATION_VERTICAL 0 #define ORIENTATION_HORIZONTAL 1 #define ORIENTATION_VERTICAL_ROTATED 2 #define ORIENTATION_HORIZONTAL_ROTATED 3 class LCD22_Touch { public: void clear(uint8_t x1, uint8_t y1, uint8_t w, uint8_t h); } LCD22_Touch.cpp add/change the following void LCD22_Touch::setArea(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2) { if(_orientation == 0 || _orientation == 2) { writeRegister(ILIGRAMHEA, x2 + LCD_OFFSET_WIDTH); writeRegister(ILIGRAMHSA, x1 + LCD_OFFSET_WIDTH); writeRegister(ILIGRAMVEA, y2 + LCD_OFFSET_HEIGHT); writeRegister(ILIGRAMVSA, y1 + LCD_OFFSET_HEIGHT); writeRegister(ILIGRAMADDRX, x1 + LCD_OFFSET_WIDTH); writeRegister(ILIGRAMADDRY, y1 + LCD_OFFSET_HEIGHT); write(_commandLCD, ILIWRDATA); } else { writeRegister(ILIGRAMHEA, y2 + LCD_OFFSET_WIDTH); writeRegister(ILIGRAMHSA, y1 + LCD_OFFSET_WIDTH); writeRegister(ILIGRAMVEA, x2 + LCD_OFFSET_HEIGHT); writeRegister(ILIGRAMVSA, x1 + LCD_OFFSET_HEIGHT); writeRegister(ILIGRAMADDRX, y1 + LCD_OFFSET_WIDTH); writeRegister(ILIGRAMADDRY, x1 + LCD_OFFSET_HEIGHT); write(_commandLCD, ILIWRDATA); } } void LCD22_Touch::clear() { if(_orientation == 0 || _orientation == 2) clear(0, 0, LCD_WIDTH, LCD_HEIGHT); else clear(0, 0, LCD_HEIGHT, LCD_WIDTH); } void LCD22_Touch::clear(uint8_t x, uint8_t y, uint8_t w, uint8_t h) { setArea(x, y, x+w-1, y+h-1); uint16_t total = w * h; for (uint16_t k = 0; k < total; k++) { write(_dataLCD, 0x00); write(_dataLCD, 0x00); } } bool LCD22_Touch::getTouch(uint16_t &x, uint16_t &y, uint16_t &z) { uint16_t x0, y0, z0, z1, z2; uint8_t a, b; // Need for cleaning screen SPI communication for LM4F #if defined(__LM4F120H5QR__) point(0, 0); #endif delay(10); digitalWrite(_pinTouchChipSelect, LOW); #ifdef HARDWARE_SPI SPI.transfer(TOUCH_Z1 + 0x08); // 8-bit a = SPI.transfer(0x00); b = SPI.transfer(0x00); #else shiftOut(_pinSerialData, _pinSerialClock, MSBFIRST, TOUCH_Z1 + 0x08); a = shiftIn(_pinSerialData, _pinSerialClock, MSBFIRST); b = shiftIn(_pinSerialData, _pinSerialClock, MSBFIRST); #endif z1 = a; #ifdef HARDWARE_SPI SPI.transfer(TOUCH_Z2 + 0x08); // 8-bit a = SPI.transfer(0x00); b = SPI.transfer(0x00); #else shiftOut(_pinSerialData, _pinSerialClock, MSBFIRST, TOUCH_Z2 + 0x08); a = shiftIn(_pinSerialData, _pinSerialClock, MSBFIRST); b = shiftIn(_pinSerialData, _pinSerialClock, MSBFIRST); #endif z2 = 0x7f - a; z0 = z1 + z2; z = z0; #ifdef HARDWARE_SPI SPI.transfer(TOUCH_X + 0x00); // 12-bit a = SPI.transfer(0x00) ; b = SPI.transfer(0x00); #else shiftOut(_pinSerialData, _pinSerialClock, MSBFIRST, TOUCH_X + 0x00); a = shiftIn(_pinSerialData, _pinSerialClock, MSBFIRST); b = shiftIn(_pinSerialData, _pinSerialClock, MSBFIRST); #endif x0 = (a << 8 | >> 4; #ifdef HARDWARE_SPI SPI.transfer(TOUCH_Y + 0x00); // 12-bit a = SPI.transfer(0x00) ; b = SPI.transfer(0x00); #else shiftOut(_pinSerialData, _pinSerialClock, MSBFIRST, TOUCH_Y + 0x00); a = shiftIn(_pinSerialData, _pinSerialClock, MSBFIRST); b = shiftIn(_pinSerialData, _pinSerialClock, MSBFIRST); #endif y0 = 2047 - ((a << 8 | >> 4); digitalWrite(_pinTouchChipSelect, HIGH); if (z>TOUCH_TRIM) { //x0 = check(x0, 311, 1632); x0 = check(x0, 195, 1859); y0 = check(y0, 195, 1859); switch (_orientation) { case 1: { y = map(x0, 195, 1859, LCD_WIDTH, 0); x = map(y0, 195, 1859, 0, LCD_HEIGHT); break; } case 2: { x = map(x0, 195, 1859, LCD_WIDTH, 0); y = map(y0, 195, 1859, LCD_HEIGHT, 0); break; } case 3: { y = map(x0, 195, 1859, LCD_WIDTH, 0); x = map(y0, 195, 1859, 0, LCD_HEIGHT); break; } default: { //x = map(x0, 311, 1632, 0, LCD_WIDTH); x = map(x0, 195, 1859, 0, LCD_WIDTH); y = map(y0, 195, 1859, 0, LCD_HEIGHT); break; } } return true; } else { return false; } } void LCD22_Touch::setOrientation(uint8_t orientation) { switch (orientation) { case 1: writeRegister(0x01, 0x031C); _orientation = 1; break; case 2: writeRegister(0x01, 0x021C); _orientation = 2; break; case 3: writeRegister(0x01, 0x001C); _orientation = 3; break; default: writeRegister(0x01, 0x011C); _orientation = 0; break; } writeRegister(0x02, 0x0100); switch (orientation) { case 1: writeRegister(0x03, 0x1038); _orientation = 1; break; case 2: writeRegister(0x03, 0x1040); _orientation = 2; break; case 3: writeRegister(0x03, 0x1048); _orientation = 3; break; default: writeRegister(0x03, 0x1030); _orientation = 0; break; } } RobG 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.