Got some working reference code that I can work off of now for using interrupts.
stepper-test.s is from Dr. Stapleton's reference code, filename stepper_D12plus.asm. This code implements 2-phase bipolar rotation. When wired correctly, the program operates as expected. Nice to have. Now I have to implement it with interrupts and my own code.
My initial shot at lab6a, before compiling anything. Will probably have long branch/short branch errors.
No compiler errors anymore. Now it's time to see how badly this fails.
The input parsing and validating looks like it's working fine. The interrupt itself isn't though. Time to debug.
Got some major progress here. Stupid ASCII -__-. Who the fuck am I kidding. Stupid me.
Ok. Got both FSD and HS working. Only FSS isn't working right now. Curious.
I suspect the problem is simply that I am not drawing enough power for the single coil setup to work. I say this because Dual coil and half step work when the system is ungrounded and floating, but when I ground it (like it's supposed to be), the motor loses steam and eventually stops, until I undground the system and the additional current gets drawn again. Or maybe I've got this all wrong. Whatever.
Had Dr. Stapleton look at code and wirings during lab. Couldn't figure out why CCW FSD wouldn't work on the Dragon12-Plus2 board. We suspect there might be some different wirings for this particular model of the board.
Still not entirely sure if there is ANY difference in the code whether the motor is wired as bipolar or unipolar.
I don't have any idea.
Lab 6c (servo control)
Updating for newer range.
Looks like loads/stores are getting messed up. Not sure what's going wrong though at this point.
Are you fucking kidding me -__- Well, it works now. Well, not exactly. The servo is moving, but it is not stopping completely after a move, it's still jittering. Not sure why.
Stepper motor and Servo functional. Merge branch 'lab6'