Program for MOTOR test

In the previous post mention about motor driver IC ,after you familiar about l293d IC possible to understand about program easily.



#include<avr/io.h>        //This is the header for AVR Microcontroller.
#include”delay.h”       //This is the working header file for delay.

void main()
    PORTD=0X00;            // PortD initiallization as all bits low.
    DDRD=0XF0;            // PortD data direction declaration as out put.
    while(1)            //This is for the the infinity loop.
        PORTD=0x50;        // Rotate clock wise
        delayms(1000);    // Delay of 1sec
        PORTD=0xA0;        // Rotate anticlockwise
        delayms(1000);  // Delay of 1sec


motor rotate forward for 1sec then rotate backward for 1 sec…….


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s