This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

single phase QDEC ?

is it possible configure the QDEC to single phase, i am using one omnipolar hall effect sensor i am wondering if i can configure only phase A ande use it, is it possible ???

Parents
  • Hi,

    The QDEC peripheral is designed for two-phase inputs. You could in theory use it count a single phase by assigning the same GPIO pin where your phase is to both Phase A and Phase B inputs. You will then get what’s called a double transition (invalid sample), and you can read the count result from the ACCDBL register. Note that the ACCDBL is just a 4 bit register, while the normal(valid samples) ACC register is 32 bit.

    Since this is just a single phase, a more suited approach might be to just simply use the TIMER and GPIOTE. The GPIOTE can be configured to generate an event on a pin change, and using the PPI you can connect that event to the TIMER running in LowPowerCounter mode.

  • so you suggestion is use falling edge or rising edge , use PPI event to start and stop the timer, get the duration, this duration will be the time for one rotation.

    OR

    anyway i can use any counter to count pulse in the pin

Reply Children
No Data
Related