Jump to content
43oh

2.2" Color LCD Booster Pack with Touch


Recommended Posts

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?

 

I'm not sure to understand what "Y axis inverted" means.

 

The library supports all the four orientations with (0,0) always on the top left corner of the screen for each of the 4 orientations.

Link to post
Share on other sites
  • Replies 128
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I am working on a new color LCD booster pack featuring 2.2" display. The board will work with two types of displays, one with touch screen and one without. TSC2046/ADS7846 controller or MCU's analog

Another test, this time some simple on/off buttons. Once I polish this a little, I will add it to GitHub so that users can contribute.  

If you're tight on budget, a cheap solution to using SD cards is soldering a  7 pin male header directly to the pins of a microSD-to-SD adapter. You can insert microSD cards just as you'd do normally.

Posted Images

I'm not sure to understand what "Y axis inverted" means.

 

The library supports all the four orientations with (0,0) always on the top left corner of the screen for each of the 4 orientations.

May be the energia lib I got is an order version, as it doesn't include the setOrientation function, and that's why I added myself, plus making the getTouch() function aware of the orientation setting.

 

For the "Y axis inverted", it just means when you touch the top, the Y result from getTouch() call is LCD_HEIGHT, and 0 when you touch the bottom (0,0 at bottom left corner). I tried both the energia lib, and the CCS one from Username, and both yield the same result. So it is very likely the v4 board got that part changed.

Link to post
Share on other sites

The earlier versions of Robs board have the opposite direction for the touch panel.

 

I had to change some code to flip the y direction and tweak the calibration.

The old code works great with the old screens.

But the new screens need a few lines changed.

 

I'll dig out what i did just to throw it into the mix.

 

These are fantastic boosterpacks. Absolutely love 'em.

 

Cheers

 

PTB

Link to post
Share on other sites
    if (z>TOUCH_TRIM) {
//        x0 = check(x0, 311, 1632);//Old Style Screens from RobG (Green PCB)
//        y0 = check(y0, 195, 1859);//Old Style Screens from RobG (Green PCB)
//        
//        x = map(x0, 311, 1632, 0, LCD_WIDTH);//Old Style Screens from RobG (Green PCB)
//        y = map(y0, 195, 1859, LCD_HEIGHT, 0);//Old Style Screens from RobG (Green PCB)


        x0 = check(x0, 156, 1874);              //Edited by PTB New Style Screens from RobG (Red PCB)
        y0 = check(y0, 120, 1859);              //Edited by PTB New Style Screens from RobG (Red PCB)
        x = map(x0, 156, 1874, 0, LCD_WIDTH);   //Edited by PTB New Style Screens from RobG (Red PCB)
        y = map(y0, 120, 1859, 0, LCD_HEIGHT);  //Edited by PTB New Style Screens from RobG (Red PCB)

        
        return true;
    }
    else {
        return false;
    }
}

Here's the 4 lines of code change (to the old code) at the bottom of LCD_Touch.cpp I did to get touch working for me on the newer screens

Link to post
Share on other sites

@@PTB, Yeah this screen is great. It is strange that I just use the same (195,1859) range as the original lib y axis range for the x axis, and it works great, let me try the (156,1874) range tonight. And I think I just take it one step further by supporting the touch with all 4 screen orientation.

 

BTW, here is what I used the screen with...... So many threads about making the MSP430 reflow oven kit, but almost none of them available for purchase, so I just got to make my own. :)

 

1623345_765546480131143_917271151_n.jpg

Link to post
Share on other sites
  • 2 years later...

Ah. Ok. I have one of your non-touch 2.2" displays (with ?SD & no onboard SRAM); it's nicely built & does the job very well. A little slow, but that's because it's serial (and we really can't afford parallel with most MSP430s, we just can't spare enough pins).

 

If I could find a decent 2.2" resistive sensor overlay that I knew would fit my display, I'd add it to what I have & be done with it.

 

BTW... good to meet you, Rob.

Link to post
Share on other sites
  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...