Go Down

Topic: Reverse Coordinates DUE w/ CTE Shield on CTE 3.5" 480x320 R61581 LCD (Read 5749 times) previous topic - next topic

DanyHdez

I have a Cold Tears 3.5 inch 480x320 R61581 with a ADS7843 compatible touch controller running on a CTE Due LCD Shield connected to arduino DUE. I'm using Cold Tears modify version of the Hennings UTFT and UTouch Libraries.

Code: [Select]

#include "SPI.h"
#include <UTFT.h>
#include <UTouch.h>
#define FLASH_CS_PIN 52
#define SPI_RATE 2

//Font selection
//BVS= Bitstream vera sans, suffix = font size in pixel (height)
#define BVS_13 10
#define BVS_15 12
#define BVS_19 14
#define BVS_22 18
#define BVS_28 22
#define BVS_34 28
#define BVS_43 38
#define BVS_52 53
#define BVS_74 78
#define BVS_112 122


extern uint8_t SmallFont[];


UTFT myGLCD(CTE35);   // Remember to change the model parameter to suit your display module!
UTouch      myTouch(6,5,32,3,2);

void setup()
{
 delay(1000);
 myGLCD.SPI_Flash_init(FLASH_CS_PIN,SPI_RATE);
 Serial1.begin(38400);
 myGLCD.InitLCD();
 myTouch.InitTouch();
 myGLCD.setFont(SmallFont);
 myGLCD.clrScr();
 myGLCD.Swtich_LCD_TB_Bit(0);
 myGLCD.Load_image(0,0,664);
 myGLCD.setColor(0,0,0);
 myGLCD.setBackColor(130,192,229);
 myGLCD.Put_Text("Sonora Technical",320,5,BVS_22);
}
void loop()
{
  myGLCD.drawRect(10,10,50,50);
  long x, y;
  myTouch.read();
  x = myTouch.getX();
  y = myTouch.getY();
  while (true) {};
}

What I'm seeing are the coordinates are turn 180 degrees. My text is not upside down and is not reversed but my cordinates appear to start at the right hand corner. Ok, If I rotate the screen 180 degress...then my bitmap will be rotated 180deg, and the text will be upside down and backwards...however it will start at the correct coordinates.

feveran

i have same problem with same setup. the only difference is my lcd screen 3.2"

ODwyerPW

I am having the same problem on the 3.2".  Daniel and I are teaming up to work on this issue together.  We have the same shields, LCDs, DUEs...and unfortunately..the same exact issues...

Very frustrating to purchase products, download their demos, their libraries... then run them and the images are flipped, mirrored, rotated 180 deg. text is mirrored...bitmaps are not... etc.. etc... touchscreen counts down backwards, etc...

Is there anyone using these 3.2" and 3.5" ColdTears products where they just work?

Trying to determine if Daniel and I have a bad batch (we ordered them together).
Quiero una vida simple en Mexico...nada mas.

promacjoe

I have a similar problem with a 7" display from CTE,  "DUE shield  + CTE70". All the UTFT fonts and coordinates are mirrored.
However the 7" display came with custom fonts on rom and they display correctly. But they do not work with the set font functions. This means that the printnumI in the printnumF does not work or will not be readable if I use the UTFT fonts.
Does anyone else have this problem, And has anyone found a solution.

Any help will be greatly appreciated.

Joe

feveran


I am having the same problem on the 3.2".  Daniel and I are teaming up to work on this issue together.  We have the same shields, LCDs, DUEs...and unfortunately..the same exact issues...

Very frustrating to purchase products, download their demos, their libraries... then run them and the images are flipped, mirrored, rotated 180 deg. text is mirrored...bitmaps are not... etc.. etc... touchscreen counts down backwards, etc...

Is there anyone using these 3.2" and 3.5" ColdTears products where they just work?

Trying to determine if Daniel and I have a bad batch (we ordered them together).


coldtears didn't help. i solved the problem buy adding screen reverse code i found in utft_due libraly which coldtears gives. and for use touch panel in correct way, i use orginal utocuh libraly and upload calibration sketch. there is no problem now.

gyro3

Same problem and no help from coldtears.
Could you please post your working code?

Thanks
Gyro3

BMac099

I purchased hte 3.5" model from coldtears. I rewrote the library to get it all to work and to work in PORTRAIT mode.
I forwared the code to coldtears, they returned an email saying they rewrote there code and it all works now.
So I would hit them up again and see if they have updated librarys for your display.
Unfortunately the different sizes use different chip sets for the code isn't interchagable, the library has a huge case statement that looks thru all the displays.
I'm not really a fan of having all displays loaded when I only need one, also if you make a change you really should check the functionallity of all the other supported displays. Uh let's see I think I'll make a change to my universal driver that i'm using to add a feature to the display I'm using, ok the change is made ok now all i have to do is get out the 30 different displays download the new code and test all 50 functions on each 30 displays and make sure I test all possible orders of functions on each display hmmmmm( 30 displays * 50 functions * (modes (landscape and portrait) uh no thanks I'll keep the libraries seperate one for each display.
Thats the way we do it now when you load a library for a RTC it doesnt contain every sensor/gizmo possible, only the RTC.
Cold tears sent me a link that didn't work, when I get a good one I'll post it here, if needed I can post the code I have for my CTE 3.5.

BMac

ODwyerPW

We'd love to see that code. Daniel and I each have the DUEs, CTE Shields and CTE LCDs (the 3.5, the 5 and the 7).
We are working independently and sometimes together on these issues. (Lately, I've played more with the MiniPro and have enjoyed the simplicity very much, but eventually I will get back to DUE and these LCDs).
Daniel's been focused on the 3.5... hence this thread.

I have more interest in the 5", but will use the 3.5" in my application if it proves easier to use.

I agree with your assessment... Daniel and I have talked about eliminating ALL of the other stuff except the 3.5 and 5 that we are using just to decrease the size of the libraries....both for the LCD and the Touch.
Quiero una vida simple en Mexico...nada mas.

avenue33

I faced the same problem with the same screen.

Please find the library -take release 105 and then HI32_screen, part of the LCD_screen Library Suite- and some comments


Hey, can you give me your "Cold Tears modify version of the Hennings UTFT and UTouch Libraries" ? :)

Go Up