NHD-7.0-800480FT-CSXV-CTP - touch screen not responding
We have integrated the NHD-7.0-800480FT-CSXV-CTP onto a custom board based on an i.MX RT1064. The graphics have been working fine, but once we started working with touch, no touches are registering. The calibration command has been executed and the display is showing the animated dot at the upper left. The firmware is in a loop waiting for the FT813 command read register to catch up to command write. This issue has been observed on multiple boards.
Before running the calibration command, the CPU Reset register shows that the touch controller is not in a reset state. The CTouch Mode register shows that touch screen sampling is on.
We have not yet started probing I2C interface lines or other connections.
Are there special initialization steps for this display that might not be included in the FT813 documentation?
-
Hi Tony,
Have you included the timing characteristics in your display initialization? This can be found on page 7 of the display's specification document.
Additionally we have a helpful article on our blog for using our EVE displays with the Gameduino2 library, I recommend checking this article out if you have yet to do so. There you will find the required timing values for the NHD-7.0-800480FT-CSXV-CTP alongside our other EVE models.
0 -
All the timing settings in the firmware match those listed in the document except for REG_CSPREAD. Changing that from 0 to 1 did not affect touchscreen behavior - still no response.
The referenced article does not include info specific to the touch engine/controller, so I did not see anything to latch onto there.
0 -
Probing the interrupt line from the touch controller and I2C clock line shows no activity when the screen is touched. The reset line is not active, so it is not being held in reset.
We tried a third display, and it is behaving the same way, so this looks like an issue with the application firmware driving the display.
Is it necessary for the application firmware to toggle the touch engine bit in the FT813's CPU Reset register in order for the touch controller to operate? If so, at what point during initialization should this be done? I saw earlier that the bit is set before going through initialization, then it is cleared after initialization is complete, immediately before issuing the calibration command. There is currently no firmware to manipulate touch engine reset, so it appears the FT813 is handling this.
0 -
Hi Tony,
I will look into this a bit further for you. However, in the meantime, the programmers guide for the FTDI chipset will have all the necessary commands for the display and the touch drivers.
0 -
Hi Tony,
Thank you for your patience, because the controller for the touch engines stores up to 5 touches in its register, a flag needs to be set for the touch engine to track any inputs. Can you confirm how you are trying to use the touch engine?
For reference, section 5.62 of the programmers guide describes the CMD_TRACK function with examples for implementation. Additionally, the code examples from the Gameduino2 library are a helpful resource for execution of the touch drivers.
0 -
There are two ways we have been trying to get touch input. I had first tried to set tag mask to enable tagging, setting a tag value for a button, and then disabling tagging. That did not register any touches, so, thinking it might be related to calibration not being run first, I added the calibration function. This code follows the example in section 5.52. The calibration screen displays with the animated dot, but no touch is detected, and it does not move to the second dot.
The 5-touch capability pertains to extended mode? We are using compatibility mode, which is the default, so I'm expecting only one touch. I have not looked at REG_CTOUCH_EXTENDED to verify its value, but the reset value is specified as 1, which is compatibility mode, and there is no firmware to modify that.
I have not seen a flag setting set in the examples I have reviewed in order to get the touch engine to detect and report touches. I have not initialized the values affecting touch sensitivity, but since these default to the highest sensitivity, I would expect to get spurious touches vs. no activity at all. Besides verifying that the touch engine is not in reset as shown in the CPU reset register, and that touch mode is set to continuous as shown in REG_TOUCH_MODE, I have not come across other values or flags to set to enable touch input. REG_TOUCH_CONFIG also appears to be correct.
With regard to the calibration command, I looked closer at this command and the example code on the Newhaven site and saw that I am not doing anything with the result. The calibrate command is sent, but not the 4-byte result. This is confusing since the calibration has not completed at the point the result is written, but maybe this is intended to place 4 bytes in the command buffer to be populated by the coprocessor after calibration is complete? I can see this being a potential problem, but not until after the 3 dots have been touched.
0 -
Hi Tony,
Capacitive touch functionality is not dependent on the calibration function for startup, so the setting of this function should not affect the functionality of the touch engine.
Can you confirm that Bit 15 of the REG_TOUCH_CONFIG is set to 0, for capacitive working mode of the touch engine? Additionally, can you confirm if you are setting the registers for the capacitive touch engine as well (i.e. REG_CTOUCH_MODE, REG_CTOUCH_TAG).
0 -
REG_TOUCH_CONFIG shows the reset value of 0x0381, matching the documentation for capacitive touch, so there is no code to explicitly set this. Same for REG_CTOUCH_MODE - the sampling mode bits are both set to 1, indicating continuous mode. This is also the reset value, and there is no code to write this value since it is already correct.
According to the documentation, REG_CTOUCH_TAG is read-only. It's my understanding that this register will contain the tag of the touched element on the screen, so we don't try to write to that register.
0 -
Some notes from our hardware engineer:
Multiple resistors and their designators do not match up to the schematic. R18 and R22 seem to be reversed on the back of the display and instead of 100k; R22 is reading 4.7k but looks to be on the wrong place on the circuit board. R22 on the board is reading 33 ohms, but on the schematic it should be 100k. R22 is in the place where R18 should be on the circuit board. R18 is measuring 4.7k, but should be 33 ohms.
R19 according to the schematic should be 4.7k but is only 1k. R21 is reading 100k but schematic says 1k. R17 is correct. R15 and R16 are reading 33 ohms, which is correct. R14 is not shown on the schematic, but shows 33 ohms.
So I'm not sure if the schematic is current, but he's trying to debug this at a hardware level. He has sent me the datasheet for the FT5426, but since application firmware does not have access to that interface, there is not much I can do with it.
0 -
Hi Tony,
I am currently looking into why you are not receiving any functionality from the touch screen. As from the information you have provided, it appears that your settings are correct. I will review the component discrepancies that you have mentioned, as the schematic for this display is current. In the meantime can you provide us with an image of the date code on the back of your display to our support email: nhtech@newhavendisplay.com.
Additionally, if you have access to an Arduino Uno, can you confirm the display's functionality with using the example code from Gameduino2 libraries which I had referenced earlier. If needed we can provide you with a wiring diagram.
0 -
I have emailed a picture of the back of the display. I'll see if I can get access to an Uno, but have had to back off of this to implement the screens that will be used by the application, even if I can't yet transition between them. I will go back over the library code you reference to see if there are additional steps I can try in order to get touch activity.
0 -
Our hardware engineer identified a problem with the power supplied to the display from our custom board. He made a mod to the board and calibration completed, so it looks like this has been resolved.
0 -
Hi Tony,
I'm glad to hear your issue has been resolved. Feel free to reach out with any future questions or inquiries.
0
Please sign in to leave a comment.
Comments
13 comments