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 ???
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 ???
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
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