i want to control four wheel for my robot to control speed and direction
i want to control four wheel for my robot to control speed and direction
To control the dc motors the simplest option is to use a couple of so called H-bridges. These allow your microcontroller to control both the speed and the direction of dc motors.
You can simply use pwm to control the speed, looking at the datasheet of the 16f877 it seems that it only has 2 hardware pwm outputs. This means that if you want to control each motor sepperatly you will have to implement 2 software pwm ports, besides using the 2 hardware pwm ports.
To control the dc motors the simplest option is to use a couple of so called H-bridges. These allow your microcontroller to control both the speed and the direction of dc motors.
You can simply use pwm to control the speed, looking at the datasheet of the 16f877 it seems that it only has 2 hardware pwm outputs. This means that if you want to control each motor sepperatly you will have to implement 2 software pwm ports, besides using the 2 hardware pwm ports.