How can i integrate 4.3 inch resistive touch in A20

Started by tintu, October 25, 2014, 12:57:35 PM

Previous topic - Next topic

tintu

Hello everyone... ,

I am trying to build an android image. Now i want to integrate a 4.3 inch resistive touch LCD to it. I just try to Configure the fex file and init.sun7i.rc file. But when turn on, the device displays "Unfortunately system UI has stopped".
Can any one tell me about the configurations ?

dave-at-axon

Hi Tintu,

From a Google search I found this comment.

QuoteThis is a symptom of a programming or integration error in the custom ROM. System UI is the name of the process that draws things like the soft home/back/recent buttons and the notification tray. When this process crashes, the soft keys and notification tray, along with anything else it's responsible for, will stop working.

I would take a guess that your LCD resolution is the issue here and possibly the fact that all of the ICONS needed to be shown don't fit.

From what I can tell, Android apps will auto-resize to the resolution of the system but the it appears that the system has to be build to support the resolution you want to use. In your case, you are trying to force an  800x480 into 480x272 and it's failing to fit a number if items. On the 800x480 the lower task bar is pretty much filled up and I don't think it can fit into a 480 wide.

I've even found that changing the DPI settings causes the system to crash because things "don't fit" anymore.

You may need to go into the UI and change some settings to make things fit.

tintu

Hello dave,
Thank you very much for your reply.
I think your guess is correct. Bcz, when i try 800*480 there is no error. Also softkeys and notification tray are present.
In 480 *272 both softkeys abd notification tray were absent.

Now can you tell me how can I goto UI and change settings ..?

JohnS

I think you will need to change the source code and recompile.

Going so small resolution may not be possible.

It will be much less trouble to stick to a standard LCD / resolution.  Much less.  And it will work.

John

dave-at-axon

As John indicated, you need to dig into the UI source and rebuild the OS. Not a trivial task if you have no experience of the Android OS of Java/Dalvik programming

I'd suggest you look at an alternative display if you need to go with a smaller display than 7".

The Newhaven 5" CAP touch display will work with the Olimex boards but you need to create your own interface PCB for it.

http://www.newhavendisplay.com/nhd50800480tfatxlctp-p-6062.html

tintu

Hi John and Dave ... Thank you for your suggestion...

But i have a doubt. I changed resolution to 800*480 and viewed display in hdmi tv. Four lines of touch screen connected to the board. But unfortunately it is not working. Touch is detected. But it always displayed on top line only. what will be the reason?

dave-at-axon

Did you run the calibration. Calibration won't complete unless the readings make sense.

Delete the calibration data from the system and restart it. It will start the calibration when it boots.

If you don't know what to delete, use a mouse to access the applications and run the calibration app.

tintu

Hello Dave..,
I have done calibration. But i couldn't touch the circle by the touch input. It cannot touch any point other than the top most line. So I complete the calibration using a mouse and check dmesg. It shows like this,

# dmesg | grep sunxi-ts

sunxi-ts: rtp_screen_size is 5 inch
sunxi-ts: rtp_regidity_level is 5
sunxi-ts: rtp_press_threshold_enable is 0
sunxi-ts: rtp_sensitive_level is 15
sunxi-ts: rtp_exchange_x_y_flag is 0
input: sunxi-ts as /devices/platform/sunxi-ts/input/input4
dbs_input_connect: connect to sunxi-ts


dave-at-axon

This has to a be a connection issue or the signal is possibly grounded.

Do you have a scope and can check the X1, X2, Y1, Y2 connections to see what happens when you touch the panel.

How is the touch panel mounted to the LCD? Is it mounted in a frame of some sort?

tintu

#9
I had checked that too. At X1 and Y1 we can see a square pulse (top around 3 to 3.3v and bottom greater than 0v). Both X2 and Y2 shows some ground and noise.

If we touch anywhere ,
For X1 the bottom portion of square pulse increases atmost to top portion(3 to 3.3v) depends on the position of touch.
For Y1, it increases ,but not upto top. It almost reaches half of top voltage.

I will check again.

tintu

Hello...
I don't know how to debug properly.
But I added a printk() below the dprintk() and observed the changes using "dmesg | grep sunxi-ts"

It is as follows...

#dmesg | grep sunxi-ts
<4> 9.081029] sunxi-ts.c: sunxi_ts_init: start ...
<4> 9.093267] sunxi-ts: tp_screen_size is 5 inch.
<4> 9.106077] sunxi-ts: tp_regidity_level is 5.
<4> 9.110982] sunxi-ts: tp_press_threshold_enable is 0.
<4> 9.123718] sunxi-ts: rtp_sensitive_level is 15.
<4> 9.135760] sunxi-ts: rtp_exchange_x_y_flag is 0.
<4> 9.145424] sunxi-ts.c: sunxi_ts_probe: start...
<6> 9.166308] input: sunxi-ts as /devices/platform/sunxi-ts/input/input2
<4> 9.178781] sunxi-ts.c: sunxi_ts_probe: end
<6> 25.683296] dbs_input_connect: connect to sunxi-ts

any idea?

dave-at-axon

Which lines are your printk()?

What did you try to print out. I suggest you put print options in the functions that read the touch and see what those output to the debug.

tintu

Hello dave..,
I just added printk("sunxi-ts: <identification>") in many functions and observed as...

sunxi-ts: sunxi_isr_tp: start...
sunxi-ts: sunxi_isr_tp: end
sunxi-ts: tp_do_tasklet: start...
sunxi-ts: process data: start...
sunxi-ts: report_single_point: start... 
sunxi-ts: report_single_point_implement: start... 
sunxi-ts: report_single_point: x=0,sample_data->y=0.
sunxi-ts: report_single_point_implement: end
sunxi-ts: report_single_point:end



These lines are repeating a number of times... 

dave-at-axon

The data is 0 for x and y. That doesn't seem right if you where touching it.

You are trying to use Android and Olimex state that the 4.3 is not configured for it. I suggest you find an alternative OS or a bigger LCD.

https://www.olimex.com/Products/OLinuXino/A13/A13-LCD43TS/open-source-hardware

tintu

#14
Hello dave...
I have a doubt. What is the significance of these two lines...

ctp_int_port        = port:PH21<6><default><default><default>
ctp_wakeup          = port:PB13<1><default><default><1>

I have no connection on these pins.
But when I comment these lines, it cannot boot .
Is it really a needed one for resistive touch.


can you give me a link to download any other OS suitable for 4.3" ?