пїЅ 3. Resistive touchscreen with controller on
Arduino Pro Micro or
Arduino Nano Ver.4. Pros:
- On this touchscreen controller there are sources for the controller
- The topic for this controller is there:
http://pccar.ru/showthread.php?t=18943Cons for firmware from the site pccar.ru:
- there is a twitching of the touchscreen touch point due to the not quite correct algorithm for calculating the touch point
- touchscreen calibration runs from under Windows and the connection with the controller for calibration is not always correct
- when connecting to Windows, a driver is required
My modification of the firmware for this controller corrects some of the disadvantages of the original firmware: Because of these drawbacks, I decided to modify the firmware:
- on LED "1" (see photo) indication of touch of touch is displayed (there is a touch - it is lit)
- removed from the firmware all the code associated with the virtual port, which was needed for
calibration from under Windows, now the Windows driver does not ask
- added the calibration code to the firmware. Initially, made a calibration at the touch of a button
on the controller board, but then I thought and came to the conclusion that it would not be very
convenient because there will be a need to disassemble the PG in order to press the button for calibrating ...
so did without an extra button.
Pro Micro firmware only16 MHz: Firmware for Android: HID_Resistive_A_TouchController.zip (439.06 KB)
Firmware for Windows:
TouchController_HID_Resistive_Windows.rar(400.79 KB)
Here I am posting the resulting firmware and something accompanying ...
in the archive:
- TouchController_HID_Resistive_A.hex - my controller firmware for working under Android
- 800_480.jpg - file with the location of calibration points
- TC_REZ_01.jpg - appearance on what was tested
- Boot32u4.zip - archive with a programmer for the controller board
Calibration.
Calibration has turned out maybe not very good, but for me it's normal ...
Touchscreen calibration is carried out by two points located in the upper left
and in the lower right corner see 800_480.jpg. Calibration points are located on
a distance of 10% of the length and height (respectively) of the display. Shift points
Calibration by 10% was due to the touchscreen design ... my corner does not work.
For the first calibration, it seems to me that it is better to make a pattern to fit your display.
from a transparent film (tracing paper) with two points for calibration.
Calibration:
1. To impose a calibration pattern on the display screen (display in full screen in Android
calibration picture for example 800_480.jpg).
2. Press and hold with any stylus or other object anywhere on the screen with
touchscreen. LED 1 on the controller board (TC_REZ_01.jpg) will be constantly lit.
3. Monitor LED 2 on the controller board, after about 13 seconds. LED 2
blink 1 time, then release the stylus.
4. Press the stylus to point 1 (upper left corner) and hold for a couple of seconds. until blink
LED 2, then release the stylus.
5. Press the stylus to point 2 (lower right corner) and hold for a couple of seconds. until blink
LED 2, then release the stylus.
6. Press the stylus anywhere on the screen for a couple of seconds.
Calibration is finished, check the work of the touchscreen ...
LED monitoring is in principle required to determine whether calibration is working properly.
and determine the hold time of the stylus during calibration, to subsequently conduct
just calibrating by time ...
Post has been editedPows - 11.09.18, 09:37