Saturday, June 25, 2005

USB DIDO DT9817 controls the motor

The details of the DT9817 can be found here. The pins I am using are: Ground, Digital I/O(0-3), Counter 0 Out.

DIDO --- Motor
0 ------- Pin1 (Enable-)
Ground - Pin2 (Ground)
1 ------- Pin3(Half/Full Step)
2 ------- Null
Counter- Pin4(Step Clock)
3 ------- Pin5(CW/CCW)

value = 10; // p3-p0: 1010
olDaPutSingleValue(board.hdass,value,channel,gain);

The camera moves far away from the target.

value = 2; // p3-p0: 1010
olDaPutSingleValue(board.hdass,value,channel,gain);

The camera returns to the target, use value = 1 to stop motor

Change the frequency to control the motor.
DBL freq=DEFAULTRATE;
UINT width=DEFAULTWIDTH;

olDaSetClockFrequency(board.hdass,freq);
olDaSetPulseWidth(board.hdass,width);
olDaSetCascadeMode(board.hdass, OL_CT_SINGLE);
olDaConfig(board.hdass);
olDaStart(board.hdass);

No comments:

Post a Comment