Hello everybody,
I'm trying to drive a stepper motor that I got from a faulty flatbed scanner. I am driving it via a ULN2004. The ULN2004 is being driven from the outputs of a 4154(4 to 16 decoder) I,m using RB1,2,3,4. I had this set up for another project and chose to use the same code. I've managed to get it to step but cannot generate a delay short enough to make it run continuosly. If I use two loops and load both registers with 01h the delay is too long. If I use one loop and load the register with FFh ,the delay is too short and the motor doesn't run at all. Please help with my code. See attached file. Help appreciated
I'm trying to drive a stepper motor that I got from a faulty flatbed scanner. I am driving it via a ULN2004. The ULN2004 is being driven from the outputs of a 4154(4 to 16 decoder) I,m using RB1,2,3,4. I had this set up for another project and chose to use the same code. I've managed to get it to step but cannot generate a delay short enough to make it run continuosly. If I use two loops and load both registers with 01h the delay is too long. If I use one loop and load the register with FFh ,the delay is too short and the motor doesn't run at all. Please help with my code. See attached file. Help appreciated