Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

To screech

Status
Not open for further replies.

ElectroGeek_87

New Member
Sorry I never replied but I have not had the time.

you wrote

"

I've connected leds to my outputs and:
Single coil excitation , colockwise and counter-clockwise works perfect.

Double coil excitation apears not to work properly on my computer(p2 350mHz).
one of the leds,(line out) only energises for a very very short time compared to the others.

how many line outs do you nead for double excitation?

to see what i'm talking about, connect leds to line outs,
and run double excitation, with delays of about 10000(very slow).
you should see one of the lines flash on/off very quickly.
And use super bright leds.

well done. good program!
For what project are you going to use the stepper for?"


Thanks glad you liked it. my purpose for writting this program was to learn how stepper motors work a little better. I would like to build a cnc engraver for my dremel tool, but thats a long way off. I use the same # of linouts for double as for single coil excitation. I probable wrote a bad line in there somewhere. Also my computer clocks 133mhz I'm not sure if that makes the difference.

Electrogeek
 
ElectroGeek_87 said:
I probable wrote a bad line in there somewhere.
I thinks it's to do with the delay routines.

Here's my version of the STEPPER PROGRAM:

DATA 2,4,8,1 : 'SC Cw
DATA 8,4,2,1 : 'SC A-Cw
DATA 3,6,12,9 : 'DC Cw
DATA 9,12,6,3 : 'DC A-Cw
OUT 888, 0

START: CLS
PRINT " 0 = Single Coil Clockwise"
PRINT " 4 = Single Coil Anti-Clockwise"
PRINT " 8 = Double Coil Clockwise"
PRINT " 12 = Double Coil Anti-Clockwise"
PRINT
INPUT " Enter Choice "; X
INPUT " How many Rotations"; Rotations
INPUT " Enter Delay "; Delays

FOR DataLoop = 1 TO X: READ UnwantedData: NEXT DataLoop
Sets = Rotations * 12

READ A, B, C, D
FOR Loops = 1 TO Sets
OUT 888, A
GOSUB DELAY
OUT 888, B
GOSUB DELAY
OUT 888, C
GOSUB DELAY
OUT 888, D
GOSUB DELAY
NEXT Loops

RESTORE
OUT 888, 0
GOTO START
END
'-------------------Sub Routine--
DELAY:
PRINT ".";
FOR w = 1 TO Delays: NEXT w
RETURN
 
what is this? where is the original post?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top