Read the value of Potentiometer and print the value .

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Read the value of Potentiometer and print the value .

1,221 次查看
chandanmohanty
Contributor I

I am new to nxp s32k144 . I have successfully tested the read and write functions but now i want to use ADC module and write code for reading the value from potentiometer and then displaying it on semihosting console . 
please provide me the code and also give me step by step instructions to run that code and view the output also give me the photos of the step by step process

#potentiometer #s32k144 #nxp

 

0 项奖励
回复
6 回复数

1,198 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @chandanmohanty 

Check the ADC - SW Trigger example provided in the S32K1xx Series Cookbook. In this example, the ADC is initialized to convert two channels using software triggers. One channel connects to
the potentiometer on the S32K144 evaluation board and the other to VREFSH. 

Regarding displaying data in the semihosting console. This can be done by using the printf function. Check the following community post. It has information related to the topic you might find useful. 

Printf in S32DS

 

B.R.

VaneB

0 项奖励
回复

1,191 次查看
chandanmohanty
Contributor I

Hi @VaneB ,

I appreciate your response , but for displaying the value of potentiometer i.e if i vary the potentiometer the changing value should printed .
The code in the cookbook for sw trigger is not for arm i guess . 
I want to write the code for ADC potentiometer using header files such as :
#include "pin_mux.h"
#include "adConv1.h"
#include "clockMan1.h".

Regards ,
Chandan 

0 项奖励
回复

1,177 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @chandanmohanty 

Could you confirm if the software is the S32 Software Development Kit for S32K1? If yes, this also comes with some ADC examples that read the EVB potentiometer value, and when the conversion is complete the data is sent to the host PC using LPUART.

0 项奖励
回复

1,160 次查看
chandanmohanty
Contributor I
Also if there is no other way to print the value like printf function then give me the steps to run the uart example thoroughly .
0 项奖励
回复

1,157 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @chandanmohanty 

As I previously said, displaying data in the semihosting console can be done by using the printf function. Check the following community post. It has information related to the topic you might find useful. 

Printf in S32DS

0 项奖励
回复

1,163 次查看
chandanmohanty
Contributor I
yes I use this SDK . Can I have the code without using LPUART .
0 项奖励
回复