Main Site Documentation

Pulse counter on STM32F4 discovery (~Cerberus board) w/ .net Microframework 4.2 || 4.3


#1

Hello,

I am working on a robotics project in my engineering course and I need some guidance from the community. My team has adjusted our Discovery board with tinyclr and .net microframe work 4.2.

At present we are having an issue in creating a pulse counter from the motor quadrature. The .net polling is not realtime so I sought other solutions and found the ability to write and set registers directly as well as a simple tutorial that we have been adapting to.
Tutorial here: https://www.ghielectronics.com/community/codeshare/entry/753

However, my team needs to take the pulse counter a step forward so that it can flag four pins to false/0 when it reaches a certain value. This is for a motor control and we are counting a xor input from the quadrature. Direction is set with two control pins and speed is set via pwm.

Ideally what we’d like to accomplish is this:

  1. Specify a value for the pulse counter to count to then stop. This can be a value from max if there is an overload bit available or count from 0 to a specific value.
  2. Once the specific value is reached, two pins need to set to false/0.

If someone would be willing to hold my hand through this process I’d appreciate it. We have additional items yet to complete and I believe this will help us better understand how to resolve them.


#2

Have you looked into the community firmware that has support for the quadrature encoder input?