How to create a hig...
 
Notifications
Clear all

How to create a high speed counter:

1 Posts
1 Users
0 Reactions
23.4 K Views
(@Animatics)
Posts: 26
Eminent Member Guest
Topic starter
 

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.

 
Posted : 13/01/2010 12:02 am
Share: