In the codewarrior did not find the Quadrature Decoder

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

In the codewarrior did not find the Quadrature Decoder

1,729 Views
jikehe
Contributor II

     In the CodeWarrior Components Library did not find the Quadrature Decoder component,but find it in the help documentation。

Quadrature Decoder.JPG

Labels (1)
Tags (1)
0 Kudos
8 Replies

1,123 Views
BlackNight
NXP Employee
NXP Employee

Hello,

I think that component only shows up if your microcontroller actually has a quadrature encoder implemented.

You would need to disable the filter:

4422_4422.png

0 Kudos

1,123 Views
jikehe
Contributor II

Thank you,but show “Target processor does not contain peripheral of this type”,I use MK10DX256ZVLQ10 MCU

Quadrature Decoder.JPG

0 Kudos

1,123 Views
dieterteuchert
Contributor IV

I am using a MK10DX128VLH7 and it has two quadrature counters (in FTM1 and FTM2). There are so many variants, sometimes it's difficult to find the proper reference manual and data sheet and to select the right part. There is a systematic nomenclature for manuals, maybe someone could explain a little.

Apparently DX is kind of a revision, 128 is a size, VLH is a package and 7 is the speed.

My reference manual is named: K10P64M72SF1RM.pdf and it is for three devices, all with 64 pins, so P64. Here 72 could be the speed and RM is "reference manual".

It took me an hour or so to find it on the Freescale website.

0 Kudos

1,123 Views
BlackNight
NXP Employee
NXP Employee

Well, that means that your MK10DX256ZVLQ10 does not seem to have a hardware quadrature decoder.

What you could use instead the is a software encoder.

I'm using the 'QuadCounter' shown here: PID with Processor Expert

0 Kudos

1,123 Views
dianel_cheng
Contributor I

Hi

     I input the QuadCounter package, but it seems not implemented. Is there any problem in my Codewarior ?  Our Codewarior version is10.3 beta.

321.bmp

And do you have any samplesfor the component in PE?

Looking forward to your help, many thanks!

0 Kudos

1,123 Views
BlackNight
NXP Employee
NXP Employee

Hello,

Using MCU10.3 beta indeed could be your problem, as this was a beta a year ago, and there is already 10.4 available. I recommend that you use 10.4.

Use the latest version of the encoder from GitHub:

Home · mcuoneclipse Wiki · GitHub

This project described here Pololu Line Following Robot with Freedom Board | MCU on Eclipse

is using the two quadrature encoder. The link to the project sources are the end of that article.

I hope this helps.

0 Kudos

1,123 Views
jikehe
Contributor II

How to use Quadcounter components?

4455_4455.png

do you have examples, like a Serial_LDD Typical Usage



Block reception/transmission, with interrupt service

The most of applications use a serial communication in the interrupt mode when an application is asynchronously notified by a driver about transmission/reception events.

The following example demonstrates a simple "Hello world" application. The program waits until 'e' character is received and then sends text "Hello world".

Required component setup :

Content of ProcessorExpert.c:

volatile bool DataReceivedFlg = FALSE; char OutData[] = "Hello world"; char InpData[10]; LDD_TError Error; LDD_TDeviceData *MySerialPtr;  void main(void) { . . . MySerialPtr = AS1_Init(NULL);                                     /* Initialization of AS1 component */ for(;;) { Error = AS1_ReceiveBlock(MySerialPtr, InpData, 1U);             /* Start reception of one character */ while (!DataReceivedFlg) {                                      /* Wait until 'e' character is received */ } if (InpData[0] == 'e') { Error = AS1_SendBlock(MySerialPtr, OutData, sizeof(OutData)); /* Send block of characters */ } DataReceivedFlg = FALSE; } } 

Content of Event.c:

extern volatile bool DataReceivedFlg;  void AS1_OnBlockReceived(LDD_TUserData *UserDataPtr) { DataReceivedFlg = TRUE; /* Set DataReceivedFlg flag */ } 


0 Kudos

1,123 Views
jikehe
Contributor II

Do you have skype, please tell me your account.

0 Kudos