4D SYSTEMS FORUM

Register New Posts
 
 
 


Reply
 
Author Comment
 
VoiceOfRageAndRuin

Registered: 12/10/11
Posts: 56
Reply with quote #1 
I am trying to alter the touch calibration values in a uLCD-43. I think the constants for these words are incorrect. I know the constants for the origin X and Y are incorrect. If i call gfx_Origin(x, y), and then print(peekW(GFX_X_ORG), peekW(GFX_Y_ORG)) I only see '00'. The x and y origin values get put in system word addresses 30 and 31 but GFX_X_ORG and GFX_Y_ORG are defined as 56 and 57. Is there a corrected list of system word addresses?
meldavia

Registered: 18/03/07
Posts: 900
Reply with quote #2 

The smaller displays use a direct analogue method for reading the touch screen and calibration values are modified / held internally.
The 4.3" scrrens use a Microchip AR1020 Touch Screen Controller device,
and needs to be calibrated using the AR102 internal calibration procedure.

Touch cal for 4.3" display - program is here:-

http://4d.websitetoolbox.com/post/show_single_post?pid=1274328420&postcount=38


The 4.3" touch calibration can also be found in the latest PmmC release package:-
http://4d.websitetoolbox.com/post/4DGL-PmmC-Release-%28R30%29-PICASOGFX2-5909300


__________________
Regards,
Dave
VoiceOfRageAndRuin

Registered: 12/10/11
Posts: 56
Reply with quote #3 
Yes, I know about the microchip controller. As of PMMC 2.8, The values held in system words TOUCH_XMINCAL, TOUCH_YMINCAL, TOUCH_XMAXCAL, and TOUCH_YMAXCAL would screw up the calibrated data coming from the controller. The mins needed to be set to zero and the maxes needed to be set to 4096 at the start of every program because the values wouldn't save through a power cycle. In PMMC 3.0, after doing a calibration routine, I'm still getting an offset and I thought it was because the values in these system words were transforming the coordinates returned from the controller. Do these values still affect the touch coordinates in any way? Also, as another issue, the origin coordinate system word addresses are wrong. Dox say they are dec. 56 and 57 but they are in fact dec. 30 and 31. I am wondering if any other system words are incorrectly listed in the dox.
meldavia

Registered: 18/03/07
Posts: 900
Reply with quote #4 
TOUCH_XMINCAL, TOUCH_YMINCAL, TOUCH_XMAXCAL, and TOUCH_YMAXCAL
are no longer involved in the scaling process (for the 4.3" RT) so will not affect operation.

I have noticed a small offset here and there too, still investigating that.

Thanks for the heads up on the doc, we'll have a closer check of the values in general.


__________________
Regards,
Dave
VoiceOfRageAndRuin

Registered: 12/10/11
Posts: 56
Reply with quote #5 
As to the offset, the problem manifests like so: I have a program to draw a bullet point at touch coordinates and my uLCD-43 is mounted in landscape position with the ribbon cables pointing down. If I place a stylus in the upper right corner, a point is drawn under the stylus. If I drag the stylus diagonally toward the lower left corner, the bullet begins to lead the stylus until, when the stylus is about 1/4" from the lower left corner, the bullet is already in the corner of the screen.

I think I've managed to correct this. Before running the calibration routine, I set the slow and fast sample averaging to 64 (0x20). Then run the calibration. Afterwards, I set the averaging back to default because I've got so much going on in my main program that there isn't enough time to read a touch if the averaging takes too long. This seems to eliminate the offset. I guess the internal calibration routine uses whatever sample averaging parameters are currently loaded and the greater the average, the more accurate the calibration points are.

Also, as a heads up, Microchip says the 1020 is no longer recommended for new designs and is recommending the 1021. I don't see a significant difference in the datasheets though.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Powered by Website Toolbox - Create a Website Forum Hosting, Guestbook Hosting, or Website Chat Room for your website.