This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Revolution count

Target application
1: Data acquisition is carried out for a 0-1khz high-low level signal. The low level is effective. The count is increased by 1 for each trigger.
2: Use the above counting data to calculate the length and speed; Length = count data * perimeter. Speed = current length / time.
3: Point 1: each time it is triggered, the current count quantity, calculated length and calculated speed are output through Bluetooth.

  • I would like to add that the problem may be that my program is interrupted. When I interrupt, I will calculate other data. The calculation was not completed, and the interrupt was triggered again. Interrupt my last calculation, and so on. I need this interrupt data every time to monitor the condition of my equipment.。

    In addition to giving time to the main function calculation. There is no other way. Or I did it wrong.

  • Not sure if I understand 100% what you are trying to do here, but using PPI+TIMER+GPIOTE to count pulses could be what you are looking for here.

    Here is a link to a post where there are some examples attached: https://devzone.nordicsemi.com/f/nordic-q-a/34547/ppi-configuration-to-count-pulses

  • I have a project that uses 52832 to do the counting function. The counting signal is generated by the hall sensor with a frequency ranging from 0-1khz. The software obtains the current speed through interruption. When the interruption is generated, the current obtained speed is used to count the motion length, length = number of turns * wheel diameter, speed = length / timing time. At present, the software can accurately capture the speed signal on the motor Hall under the condition of separate counting. When adding length, speed is calculated. A Hall signal captured by the software (effective at low level) is used to measure the length and speed

Related