Read the value of Potentiometer and print the value .

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Read the value of Potentiometer and print the value .

788件の閲覧回数
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 返答(返信)

765件の閲覧回数
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 件の賞賛
返信

758件の閲覧回数
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 件の賞賛
返信

744件の閲覧回数
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 件の賞賛
返信

727件の閲覧回数
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 件の賞賛
返信

724件の閲覧回数
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 件の賞賛
返信

730件の閲覧回数
chandanmohanty
Contributor I
yes I use this SDK . Can I have the code without using LPUART .
0 件の賞賛
返信