Hi,
I am using IMXRT1050-EVKB.
Processor: MIMXRT1052xxxxB
Package_id: MIMXRT1052DVL6B
I want to configure pin on the board so that it can receive analogue input. Can u please let me know which pin to configure and how to configure it. Is there any sdk example available which can be modified.
Note: Actual Input which I wanna provide is value of resistance connected to circuit.
Thanks
解決済! 解決策の投稿を見る。
Thanks @kerryzhou
It makes sense about the noisy data.
But when i provide input voltage to the pin, the converted out displayed in the terminal is not consistent with the supply. For example when I increase the input voltage, the output increases sometimes and but other times it decreases. Not sure why.
Hi @ranjay_shandilya ,
To the analog input pin, you don't need to configure the pinmux, as the pin is fixed to the analog module, you just need to configure the anlog module directy.
Take an example:
ADC, you don't need to configure the pinmux, then just configure the ADC module.
The reference code is:
SDK_2_11_1_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\adc
ACMP is the same, just refer to the related SDK is OK.
Wish it helps you!
Best Regards,
Kerry
Hi @kerryzhou
Thanks for the response.
I am using adc polling example and need a bit of clarification.
When I flash the polling example to the board.
I get output as in above screenshot.
The problem is this conversion is happening even without me adding any sample input. As I understand, I should be providing a sample input to the pin and output will be the converted value. Is there something I am missing?
Could u please help me understand this.
Thanks
Hi @ranjay_shandilya ,
Please check the project readme.txt:
Board settings
==============
ADC1_IN0 is ADC input. Please sample voltage by J23-2 pin
So, if you don't input the voltage to the J23-2 pin, it is the noisy data that you get.
So, to get the correct data, you need input the voltage to J23-2 pin.
Wish it helps you!
Best Regards,
Kerry
Thanks @kerryzhou
It makes sense about the noisy data.
But when i provide input voltage to the pin, the converted out displayed in the terminal is not consistent with the supply. For example when I increase the input voltage, the output increases sometimes and but other times it decreases. Not sure why.
Hi @ranjay_shandilya ,
Please tell me your input voltage and the related printf result.
Please note, your input voltage should be the same GND as the board's GND.
Then I will help you to check it in detail.
Best Regards
Kerry
Hi @kerryzhou
My Observation is as below:
Input voltage ADC Value (Output)
No I/p volt 144
3.30V 223
3.30V 138
3.30V 155
3.30V 152
3.30V 146
5.35V 159
5.35V 174
5.35V 37
5.35V 157
1.9V 131
1.9V 146
1.9V 149
Note: For the same input voltage everytime I press any key to get user channel's data
I get different ADC value ( why? )
Hi @ranjay_shandilya ,
Your input voltage is wrong, the input voltage can be higher than VREFH, please refer to the datasheet:
I find you mark the correct answer, do you still have issues about it?
If yes, how do you input the different voltage, it is cut down from the VREFH or VDDA from the same board and share with the same GND?
This is my test result when I input the 3.3V:
3.3V is from here
You can try it like me.
When you want to use lower voltage, you can divide the voltage from J24_8.
Best Regards,
Kerry