sk.shawn
Junior Member level 3
l298 motor driver
Hi all,
I'm trying to control a simple DC motor using a motor driver chip (L298) through programming the PIC16F877 microcontroller.
I'm trying to come out with a simple code which will move the motor by a quarter with respect to its initial position and then stops. I need this motor movement to be implemented on my carpark barrier prototype where the barrier will open (through the motor's quarter movement) upon receiving an input activation through a push button.
The difficulty lies in the part of controlling the motor to just move by a quarter. No matter what I do, the motor still moves more than a quarter. However, I noticed a change in the speed though.
I have attached by code. Hope you guys will take a little of your time to help me with this and advise me on how I should go about achieveing this motor control.
Really thanks for the help and apologies for the long text!
Regards
Shawn
Hi all,
I'm trying to control a simple DC motor using a motor driver chip (L298) through programming the PIC16F877 microcontroller.
I'm trying to come out with a simple code which will move the motor by a quarter with respect to its initial position and then stops. I need this motor movement to be implemented on my carpark barrier prototype where the barrier will open (through the motor's quarter movement) upon receiving an input activation through a push button.
The difficulty lies in the part of controlling the motor to just move by a quarter. No matter what I do, the motor still moves more than a quarter. However, I noticed a change in the speed though.
I have attached by code. Hope you guys will take a little of your time to help me with this and advise me on how I should go about achieveing this motor control.
Really thanks for the help and apologies for the long text!
Regards
Shawn