C programming

Thread Starter

mdsaad

Joined Nov 2, 2005
8
hi all..

Here i've attached my project description. I don't know how to program 4051 using c.i need to calculate the speed of the rotary encoder to give the actual speed to the motor. Could anyone help me, please..the rotary encode gives a digital output. 101010....the time for each cycle depends on the speed of the encoder
 

beenthere

Joined Apr 20, 2004
15,819
Hi,

While you can measure the interval between the 1's and 0's, there is usually a spot on the encoder that will have a different output - the indexer, used to establish the shaft position at some absolute orientation.

If that is the case, the interval between indexer codes is less work to measure.

As a hint, count up and internal register at some rate. The number of counts in the register between encoder pulses will measure the rotational speed. The faster the counter increments, the finer the speed determination.
 

Papabravo

Joined Feb 24, 2006
21,227
Originally posted by chaisi@Mar 11 2006, 05:25 AM
tell me how plzzzzzzzz
[post=14864]Quoted post[/post]​
We would like to respond but there simply is not enough information here. When will it sink in that, in order to construct a meaningful response there must be some minimal amount of information, and a little less whining.

For Example:
The maximum speed of the shaft is 5 revolutions per minute.
There are 400 counts per revolution.
There is an index pulse.
There is no index pulse.
The encoder outputs are CMOS compatible.
There are quadrature outputs.
There are sine/cosine outputs.
The encoder requires +12VDC
 
Top