Rotary encoder and MIMXRT1020

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

Rotary encoder and MIMXRT1020

ソリューションへジャンプ
1,995件の閲覧回数
Irv95G
Contributor II

Hi, im new to embeded systmes, im trying to interface a mechanical rotary encoder with the MIMXRT 1020 EVK,  can anyone tell me if there are speciphic module/peripherals to do this ? i'm currently trying with interrups pins.

 

thanks 

0 件の賞賛
返信
1 解決策
1,989件の閲覧回数
ErichStyger
Specialist I

It depends on your usage and the frequency of your rotary encoder: Because mechanical, you will need to debounce the signals imho. And the signal frequency is probably so low that using interrupts does not make much sense. What I use for such things are normal GPIO pins (polled) with a debounce state machine. That has the advantage that you don't need precious interrupts and you don't run into a 'death-by-interrupt' situation.

 

I hope this helps,

Erich

元の投稿で解決策を見る

4 返答(返信)
1,972件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @Irv95G ,

RT1020 has QTMR and ENC. QTMR can deal with quadrature mode and increase/decrease mode. ENC is enhanced quadrature encoder/decoder module.

 

Regards,

Jing 

0 件の賞賛
返信
1,990件の閲覧回数
ErichStyger
Specialist I

It depends on your usage and the frequency of your rotary encoder: Because mechanical, you will need to debounce the signals imho. And the signal frequency is probably so low that using interrupts does not make much sense. What I use for such things are normal GPIO pins (polled) with a debounce state machine. That has the advantage that you don't need precious interrupts and you don't run into a 'death-by-interrupt' situation.

 

I hope this helps,

Erich

1,967件の閲覧回数
FormalMeerkat
Contributor I

Thank you for such a wonderful post and sharing. God bless you.! 

 

prepaidcardstatus

0 件の賞賛
返信
1,973件の閲覧回数
Irv95G
Contributor II

Thanks for the information ErichS

0 件の賞賛
返信