Hello,
My device is iMXRT1064. I am working on a touch screen which is 4 wire resistive. Its has analog outputs which need to be read. On my prototype board the following pins are used.
GPIO_AD_B0_00 TOUCH_XR_IN CMP1, IN4
GPIO_AD_B0_01 TOUCH_YD CMP2, IN4
GPIO_AD_B0_02 TOUCH_XL CMP3, IN4
GPIO_AD_B0_03 TOUCH_YU_IN CMP4, IN4
As per iMXRT1064 reference manual these pins are Analog comparator pins.
I only want to read the voltages on these pins. Is it possible to do that? I don't need the comparator.
If yes then please let me know if any reference code is available.
Regards,
Anuj
Solved! Go to Solution.
Hi Anuj Tanksali,
Yes, you are right.
It is totally related to the hardware design to select the proper and correct pins for the correct usage.
If you still have questions about it, please kindly let me know.
If your question is solved, please help me to mark the correct answer, just to close this case, thank you!
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Anuj Tanksali ,
It's related to the hardware.
I checked all your 4 pins:
GPIO_AD_B0_00 TOUCH_XR_IN CMP1, IN4
GPIO_AD_B0_01 TOUCH_YD CMP2, IN4
GPIO_AD_B0_02 TOUCH_XL CMP3, IN4
GPIO_AD_B0_03 TOUCH_YU_IN CMP4, IN4
No one is the ADC pins, these are the CMP pins.
But CMP is used to compare function:
So, if you want to get the detail pin voltage, you need to change the hardware, and connect your touch pin to the ADC interface instead of the CMP interface.
About the ADC pin, you can check the RT1064 RM Table 9-1. Muxing Options.
I don't think you can use the CMP to realize the ADC function.
Wish it helps you!
If you still have questions about it, please kindly let me know.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Anuj Tanksali,
Yes, you are right.
It is totally related to the hardware design to select the proper and correct pins for the correct usage.
If you still have questions about it, please kindly let me know.
If your question is solved, please help me to mark the correct answer, just to close this case, thank you!
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hello kerryzhou
I just want to confirm, Can we configure these pins through MCU config tool so that these can be used to read pin voltages?
In the above discussions i have mentioned that i have configured these as CMP pins.
GPIO_AD_B0_00 TOUCH_XR_IN
GPIO_AD_B0_01 TOUCH_YD
GPIO_AD_B0_02 TOUCH_XL
GPIO_AD_B0_03 TOUCH_YU_IN
Regards,
Anuj
Unfortunately, these pins are totally not the ADC pins.
Even it is CMP pins, but it used to compare, not read the detail voltage.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------