filmov
tv
PIC16F877a/PIC16F887/PIC18/16F**** L293D/L298N motor driver IC interface using MikroC
Показать описание
Hello guys,
Welcome to Learning Microcontrollers youtube Channel,
Guys I have also compiled course on Udemy as well. Where you will learn under my direct supervision in a more supervised way.
Here is the links to the courses I have on Udemy, By taking any of these courses you will be supporting my channel aswell.
This will help me to make more videos with better hardware in the future. I hope you look forward to it.
Courses Links:
I hope you all guys are great. This is my new video on PIC microcontroller series. In this video I will teach you how to interface an L293D IC using MikroC for PIC.
Here is the code:
void main() {
TRISB = 0x00; // It makes PortB a digital Port as output means it can only send either 0 or 1 from each pin
PORTB = 0x00; // Intital state must be stop of motor. So we keep H-brdige at 0 value mean stop.
while(1) // Coding inside while(1) repeats itself while above dont
{
PORTB.B0 = 1;// Sw 1 will send 1 to H bridge
PORTB.B1 = 0;// Sw 2 will send 0 to H bridge
Delay_ms(1600); // Keep the brdige in same state for 1000 ms. means motor will remain on for 1600 ms
PORTB.B0 = 0;// Sw 1 will send 1 to H bridge
PORTB.B1 = 1;// Sw 2 will send 0 to H bridge
Delay_ms(1600); // Keep the brdige in same state for 1000 ms. means motor will remain on for 1600 ms
}
}
Welcome to Learning Microcontrollers youtube Channel,
Guys I have also compiled course on Udemy as well. Where you will learn under my direct supervision in a more supervised way.
Here is the links to the courses I have on Udemy, By taking any of these courses you will be supporting my channel aswell.
This will help me to make more videos with better hardware in the future. I hope you look forward to it.
Courses Links:
I hope you all guys are great. This is my new video on PIC microcontroller series. In this video I will teach you how to interface an L293D IC using MikroC for PIC.
Here is the code:
void main() {
TRISB = 0x00; // It makes PortB a digital Port as output means it can only send either 0 or 1 from each pin
PORTB = 0x00; // Intital state must be stop of motor. So we keep H-brdige at 0 value mean stop.
while(1) // Coding inside while(1) repeats itself while above dont
{
PORTB.B0 = 1;// Sw 1 will send 1 to H bridge
PORTB.B1 = 0;// Sw 2 will send 0 to H bridge
Delay_ms(1600); // Keep the brdige in same state for 1000 ms. means motor will remain on for 1600 ms
PORTB.B0 = 0;// Sw 1 will send 1 to H bridge
PORTB.B1 = 1;// Sw 2 will send 0 to H bridge
Delay_ms(1600); // Keep the brdige in same state for 1000 ms. means motor will remain on for 1600 ms
}
}
Комментарии