Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

SAMD51 Adruino Quadrature Hardware Support?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

SAMD51 Adruino Quadrature Hardware Support?

by larrylindsey on Tue Mar 17, 2020 6:12 pm

Hello, there. I'm using either a Metro M4 Express or ItsyBitsy M4 Express for a project, and the SAMD51 in these boards apparently have hardware support for quadrature encoders (for example [1]). Is there Arduino library support for this feature?

Cheers,

Larry

1: https://learn.adafruit.com/how-to-choose-a-microcontroller?view=all

larrylindsey
 
Posts: 1
Joined: Tue Mar 17, 2020 6:05 pm

Re: SAMD51 Adruino Quadrature Hardware Support?

by User_UMjT7KxnxP8YN8 on Wed Mar 18, 2020 1:23 am

Is this for class or a job?

I'm not aware of such a library, but rolling your own may not be difficult.

The SAMD51 feature is documented in
53. PDEC – Position Decoder
in the Microchip SAMD-D5x/E5x Family Data Sheet, freely availble online. Read that, and look at existing code such as https://github.com/SapientHetero/Real-t ... unctions.c to see typical hardware peripheral register address nomenclature. Then look at
C:\Users\[your username here]\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0\CMSIS\Device\ATMEL\samd51\include\component\pdec.h
to get the predefined contstants and registers you can use to do the things you read about in "Section 53 PDEC"

If you have specific questions after reviewing that, post them here.

User_UMjT7KxnxP8YN8
 
Posts: 170
Joined: Tue Jul 17, 2018 1:28 pm

Please be positive and constructive with your questions and comments.