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.

  • Yes,

    If you want to measure the time/duration between each pulse, you should use the TIMER peripheral in Timer mode. If you only need to count and keep track of the number of pulses, then use the LowPowerCounter mode.

Reply Children
No Data
Related