Welcome, Guest

TOPIC: How to create a high speed counter:

How to create a high speed counter: 10 years 8 months ago #13

  • Animaticsv15
  • Animaticsv15's Avatar
  • Administrator
  • Posts: 44
  • Thank you received: 3
  • Karma: 0
Port A and B can be configures as either quadrature encoder
input or step and direction input. When used as Step and Direction, you can use port A as a high speed counter
Simply issue "MS0" (stands for Mode-Step-Zero).

This will clear out the external encoder counter register
(CTR) and set it to zero.hen for each incoming pulse on port A, CTR will increment (or decrement) it's value depending on the logic level of port B.

You can also set Port B as an output and control the
direction of count.his method can be sued to reliably count at rates up to 2megahertz.
The administrator has disabled public write access.
Time to create page: 0.165 seconds
Powered by Kunena Forum