iMXRT1064 ADC inputs

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMXRT1064 ADC inputs

Jump to solution
1,186 Views
anujtanksali
Contributor II

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

Labels (1)
0 Kudos
1 Solution
1,031 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
5 Replies
1,031 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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:

pastedImage_1.png

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.
-------------------------------------------------------------------------------

0 Kudos
1,031 Views
anujtanksali
Contributor II

Hello kerryzhou

Thank you for the reply. I too thought so these pins cannot be used.

Regards,

Anuj

0 Kudos
1,032 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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.
-------------------------------------------------------------------------------

0 Kudos
1,031 Views
anujtanksali
Contributor II

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

0 Kudos
1,031 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Anuj Tanksali

  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.
-------------------------------------------------------------------------------

0 Kudos