Pic16f917, driver L298 and Motor - how i can make them work? - proteus/isis

Discussion in 'Embedded Systems and Microcontrollers' started by protelica, May 6, 2016.

  1. protelica

    Thread Starter New Member

    May 6, 2016
    4
    1
    Hello guys, i am new in proteus/isis and i like this program very mutch. But, because i am beginner i don't understand a lot of things. I wach some tutorials on youtube and i make a simple circuit using a LCD and pic16f917. (and .c file for microcontroller).
    Now, i wanna make something hard (for me). I wanna use a driver (L298) and a motor (motor-pwmservo / for example).
    I wanna connect the motor to the driver, and the driver to the microcontroller (pic16f917), but i dont know how to do this.
    I attach three fotos with my project.
    Can u help me to make correct connections with the driver (L298) and motor? And can you provide a good explication ?
     
  2. JohnInTX

    Moderator

    Jun 26, 2012
    2,346
    1,029
    Welcome to AAC.

    The L298 datasheet and application notes are available here. Various examples of the power section are shown for different kinds of motors. The control pins just hook to the micro like anything else.

    Give them a read, hook it up and see what happens then post your results if you need any help - or if you have success. We like success!

    Good luck.
     
  3. protelica

    Thread Starter New Member

    May 6, 2016
    4
    1
    i will read the documentation for L298. Tnx for help and fast answer :)
    I will replay if i need more help, but i hope i will not need. have a nice day.
     
    JohnInTX likes this.
  4. protelica

    Thread Starter New Member

    May 6, 2016
    4
    1
    after i read some information about driver L298 and the motor, i make good connections in proteus isis.
    but how can I do the motor to spin?

    i use this code:
    do
    {
    if(PORTC.RC0==1)
    {
    Lcd_Out(1,1,"Start");
    Lcd_Out(2,1,"01");
    PORTD.RD0= 1;
    PORTD.RD1= 1;
    PORTD.RD2= 1;
    PORTD.RD3= 1;
    PORTD.RD4= 1;

    }
    if(PORTC.RC0==0)
    {
    Lcd_Cmd(_Lcd_CLEAR);
    Lcd_Cmd(_Lcd_CURSOR_OFF);
    Lcd_Out(1,1,"");
    }
    }while(1);

    My code just show a message in LCD, when i push the button. but how can i set the elements in U2 (L298 driver)
    i need to set PortOut1 = 1; ?
    i understand how to set parametters for microcontroller, but is same for the driver?
    i am sorry if i make stupid questions, but i study Proteus and mikroc for pic from 4 days. i am just a php, java and c# developer, but i rly love this proteus and i wanna learn it better.
     
  5. protelica

    Thread Starter New Member

    May 6, 2016
    4
    1
    i forgot to upload the file. Motor is M1
     
Loading...