Hey EEVblog, quick question about steppers.
Question: I have a stepper motor with 1.8 degrees per step, so 200 steps for a full revolution. When I hook the step output up to my pulse counter, I count 201 pulses instead of 200 for one full revolution, though through software I am pretty sure I am only generating 200 pulses. I'm wondering where I am brain farting and counting this extra pulse from.
Pulse counter is set up to count pulses on rising edge.
My timer is set up @ 1MHz and counts up from cnt to period, with period being 5000. When cnt reaches period, it toggles the timer output. Each toggle also generates an interrupt which I use to increment current steps taken. If I want to take 200 steps, I count 400 interrupts since I am toggling.
What am I missing here that has my pulse counter read 201 pulses, when I think I am telling my uC to generate 200 pulses? I can also confirm that my stepper motor is doing a full 360 revolution with the current set up.