Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
milk1995
Posted - Aug 23 2017 : 04:16:36 AM Greetings~ I am confusing about controlling DC motor by L298N. My program is as following: #include <reg51.h> #define uchar unsigned char #define uint unsigned int sbit ENA=P1^2; sbit IN1=P1^3; sbit IN2=P1^4; sbit ENB=P1^5; sbit IN3=P1^6; sbit IN4=P1^7;
void main() { timeinit(); while(1) { Ques1(); } } This is the datasheet of L298N: http://www.kynix.com/uploadfiles/pdf9675/L298N.pdf . Why can’t this program control positive and negative rotation of motor at the same time. Now my question is the motor controlled by IN1 and IN2 work after pressing RESET,and the motor controlled by IN3 and IN4 will stop rotating after 5 seconds. Why? ? #65311; Your help will be appreciated!
1 L A T E S T R E P L I E S (Newest First)
Aaron Cake
Posted - Aug 24 2017 : 09:03:48 AM What microcontroller is this for?
You can't rotate a motor positive and negative at the same time. That would just lock the shaft.