mini 2440 touchscreen problem

gilang
hello guys
I have problems with touch screen on mini2440 lcd 3.5 ". calibrations that
one makes the touchscreen shifting a few pixels to the side.
anyone can help me?
thanks

gil

davef
Only by suggesting searching <shifted screen> or keywords like that. 
First, you have to know which 3.5" screen you have.  There have been a
number of posts about this issue.

Good luck.

gilang
thkz dav..

santhosh
Hi gil
recently i faced the same problem .
the solution for that is u should re compile the kernal.in make menuconfig
goto touch screen setup .in that once remove the * .and place again *.and
recompile it u will get an image .now ur problem will be solved....

sagor
hey guys
the 3.5" touch screen of my arm mini2440 is not responding with the touch
pen. operating system: linux. plz anyone help me plz.

vijay
hello guys,

i am having ubuntu-12.04.
i have successfully installed tslib and qt-everywhere-opensource-4.6.2
and installed tslib in /home/tslib/ and qt in /usr/local/Qt/ and i have
loaded there libraries into target board mini2440 friendlyarm /usr/local/Qt
and /usr/local/tslib/ libraries when i run the program like "./push -qws 
the screen appears but the it ll not sense after touching.....and if run
through hyper terminal by commenting the last 3 lines of etc/init.d/"rcS
file" and after running the file through hyper-terminal by giving command
"./push -qws"
the error appears "/lib/libts-0.0.so.0;ELF file version does not match
current one"for every demo program also........i follwed this link


http://mini2440vietnam.blogspot.co.nz/2011/04/upgrade-qt462-in-mini2440....

and in qtcreator if i rebuild the program the error appears in this way

:-1: error: skipping incompatible /home/tslib/lib//libts.so when searching
for -lts
:-1: error: skipping incompatible /home/tslib/lib//libts.a when searching
for -lts
:-1: error: skipping incompatible /home/tslib/lib//libts.so when searching
for -lts
:-1: error: skipping incompatible /home/tslib/lib//libts.a when searching
for -lts

and if run any how it will give this error

:-1: error: Could not connect to host: Server rejected password.
Is the device connected and set up for network access?


if i use kernel file zimage_T35 instead of zimage_x35 is that also give
some compatibility issue can anybody help me please i am solving this for
three weeks..............please

some body give me answer 


thanks in advance ....
if i have committed any mistake let me know and i am new to unix
environment......

vijay
i have used this qmake.conf file

#
# qmake configuration for building with arm-linux-g++
#


include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)


# modifications to g++.conf
QMAKE_CC                =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lts
QMAKE_CXX               =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lts
QMAKE_LINK              =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lts
QMAKE_LINK_SHLIB        =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-g++ -msoft-float
-D__GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lts


# modifications to linux.conf
QMAKE_AR                =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-ar cqs 
QMAKE_OBJCOPY           =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-objcopy
QMAKE_STRIP             =
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-strip


QMAKE_INCDIR   += /home/tslib/include/
QMAKE_LIBDIR += /home/tslib/lib/


QMAKE_CFLAGS_RELEASE += -march=armv4 -mtune=arm920t
QMAKE_CFLAGS_DEBUG += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_MT += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_MT_DBG += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_MT_DLL += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_MT_DLLDBG += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_SHLIB += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_THREAD += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_WARN_OFF += -march=armv4t -mtune=arm920t
QMAKE_CFLAGS_WARN_ON += -march=armv4t -mtune=arm920t


QMAKE_CXXFLAGS_DEBUG += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_MT += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_MT_DBG += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_MT_DLL += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_MT_DLLDBG += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_RELEASE += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_SHLIB += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_THREAD += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_WARN_OFF += -march=armv4t -mtune=arm920t
QMAKE_CXXFLAGS_WARN_ON += -march=armv4t -mtune=arm920t


load(qt_config)

Maksim
Hello guys!

My English is not good enough, but I'll try to explain. I'm now doing a
project on the basis of mini2440. I'm currently working with registers. I
need to ensure that when I touch the stylus of the screen, stylus down
interrupt occurs. I registered in the register ADCTSC 0 << 8, which by
datasheet means that the touchscreen will respond to the touch with the
stylus of the screen. Instead, the touchscreen does not feel this, but
issues a permanent stylus up interrupt. How do I cancel stylus up interrupt
and get stylus down interrupt using control registers in datasheet?

Yours faithfully,

Maksim, 41 year

davef
I can only suggest the following:

search for the StartOS thread on this site. He seems to have good
experience at the "bare-metal" level.  Post a question on that thread.

Normally an interrupt is cleared by writing a 1 to another interrupt
register.  I am only basing this comment on my ATmega 8bit experience.

Good luck!

Anatoly
Hi!
Thanks Davef for still remembering StartOS (in case you don't know it's a
version for Mini210s, named RT-210).
Maksim, nice meet bare metal man here, it seems to me you have resistive TS
connected to SoC's ADC. (New boards have 1-wire TS w/ separate MCU serving
TS&LCD). Anyway you may switch between them by re-soldering some wires.
Be ready to come across errors in Samsung 2440A pdf (exactly regarding
touch screen :) Learn test2440 sources (as reference, because TS routine
works vice versa, as I remember, when you press the stylus down, it falls
in continuous interrupt that only ends when you up stylus or so.
If texts below are complex, just use StartOS - it's free.

Some routines for TS (hope useful):


#define ADCPRS 7  // prescaler
void  Init_TouchScreen (void)
{  rADCDLY=50000;  // Normal conversion mode delay about
(1/3.6864M)*50000=13.56ms
  rADCCON=(1<<14)+(ADCPRS<<6);  // ADCPRS En, ADCPRS Value
  pISR_ADC = (int)AdcTsAuto;
  rADCTSC=0xD3;    //Wait,XP_PU,XP_Dis,XM_Dis,YP_Dis,YM_En
  rINTMSK=~BIT_ADC;  // Enable Interrupt ADC Touch Screen Mask bit clear
  rINTSUBMSK=~(BIT_SUB_TC);// Clr
}



void __irq  AdcTsAuto(void)
{  ClearPending(BIT_ADC);
  ClearSubPending(BIT_SUB_TC);  // rSUBSRCPND|=BIT_SUB_TC; // + Clears Int

  rADCTSC=(1<<3)|(1<<2);      // Pull-up disable, Seq. X,Y position
measure.
  rADCCON|=0x1;        // start ADC
  while(!(rADCCON & 0x8000));    // check if EC(End of Conversion :[15])
flag is high, This line is necessary!
  
  Stylus=1;              // flag On
  Pen_Buffer[0]=1;

  xdata=(rADCDAT0&0x3ff);
  ydata=(rADCDAT1&0x3ff);
    x=(xdata-xl)*LCD_X/(xr-xl);
    y=(ydata-yu)*LCD_Y/(yd-yu);

      if  (x<0)  x=0;  if  (x>LCD_X-1)  x=LCD_X-1;
      if  (y<0)  y=0;  if  (y>LCD_Y-1)  y=LCD_Y-1;
    
  Pen_Buffer[1] = x;
  Pen_Buffer[2] = y;

// Maksim, apply delay 5 ms here by any means
  if    (OS)    Beep(7000,5);
  else    Delay  (5);

    rADCTSC=0xD3; 
//Wait,XP_PU,XP_Dis,XM_Dis,YP_Dis,YM_En//////////////////////////
}



int    Read_TS(U32 *x, U32 *y)
{  int  save_rADCTSC;
  
    if (rADCDAT0&0x8000)
    {  // Pen Up
      return  0;
    }
    else  // Pen Down
    {  save_rADCTSC=rADCTSC;
      rADCTSC=0xD4;          // [7] 1 = YM Output Driver Enable
                      // [6] 1 = YP Output Driver Disable
                      // [5] 0 = XM Output Driver Disable
                      // [4] 1 = XP Output Driver Disable
                      // [3] 0 = XP Pull-up Enable
                      // [2] 1 = Auto Sequential measurement of X,Y
                      // [1:0] 00 = No operation mode
      rADCCON|=0x1;  //start ADC
      
      while(!(rADCCON & 0x8000));  //check (End of Conversion :[15]) flag
is high
      
      xdata=(rADCDAT0&0x3ff);
      ydata=(rADCDAT1&0x3ff);

      x0=(xdata-xl)*LCD_X/(xr-xl);
      y0=(ydata-yu)*LCD_Y/(yd-yu);
      // y0=y0-(x0>>4);
        if  (x0<0)  x0=0;  if  (x0>LCD_X-1)  x0=LCD_X-1;
        if  (y0<0)  y0=0;  if  (y0>LCD_Y-1)  y0=LCD_Y-1;
      x[0]= x0;
      y[0]= y0;
      Delay(5);
         rADCTSC=save_rADCTSC;  // rADCTSC=0xD3; 
//Wait,XP_PU,XP_Dis,XM_Dis,YP_Dis,YM_En//////////////////////////
      return 1;
    }
}

Good luck!

Maksim
Davef and Anatoly, thank you very much for the answers. My Mini2440 works
fine when I transfer it to NAND mode, then Linux boots and the touchscreen
responds perfectly to the stylus. So it's not a ragged wiring.
    I'll deal with the code you gave me, Anatoly. Once again many thanks
for fast response.

Maksim

Maksim
Anatoly, tell me please, where did you get the C code you gave me? I would
like more information. If this is from test2440, then tell me where to get
the C code? There are only bin-files given.

Yours faithfully,
Maksim

Maksim
At the moment I see that the Init_TouchScreen function is linked to the
AdcTsAuto interrupt handling function. But I do not understand how they
relate to the function Read_TS.
There must be at least one more function linking them. Main function, for
example.

Anatoly
Many of us learned mini2440 bare metal programming with test2440 sources.
Some ideas are from there. Next, I've rewritted it using and according the
S32440A Datasheet.
Pieces are just pieces, they're for example. Read_TS is not necessary, it's
for user's interface in StartOS.
For mini210s there where no any sources, so my mind was broken reading the
S5PV210 Datasheet and some Linux codes. Most difficult was to relocate the
interrupt addresses for installation SVC vector.
1-wire TS I've cracked w/ help of Arduino Uno as datalogger.
Then implemented it's protocol without any hash tables/timers.

So, if interested, try to download entire DVD for mini2440 on this site.
Test2440 sources are much clear in last DVDs.
Regards.
P.S. StartOS you can find also at physicalcomputing.ru

Reply

Name
eMail (not visible)
Subject (no text only in upper case; no HELP, URGENT...)
Text
HTML tags are not supported and links are generated automatically if they start with http or ftp.
Please submit long source code or log files as attachment (only registered users).
Please enter the number: 8 3 7 0