Using a rotary encoder with AVR Micro controller

后端 未结 5 1228
小鲜肉
小鲜肉 2021-02-10 06:48

I\'m having trouble getting a rotary encoder to work properly with AVR micro controllers. The encoder is a mechanical ALPS encoder, and I\'m using Atmega168.

Cla

5条回答
  •  温柔的废话
    2021-02-10 06:57

    Speed should not be a problem. Mostly all mechanical switches need debounce routines. If you wanna do this with interrupts turn off the interrupt when it triggers, start a timer that will turn it back on after a couple of ms. Will keep your program polling-free >:)

提交回复
热议问题