Загрузка страницы

PIC16F877a/PIC16F887/PIC18/16F**** L293D/L298N motor driver IC interface using MikroC

Hello Folks,
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
}

}

Видео PIC16F877a/PIC16F887/PIC18/16F**** L293D/L298N motor driver IC interface using MikroC канала Learning Microcontrollers
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
2 мая 2019 г. 10:22:30
00:26:49
Яндекс.Метрика