Would you like to react to this message? Create an account in a few clicks or log in to continue.

    Jal ile motor kontrol

    Admin
    Admin
    Root Administrator
    Root Administrator


    Mesaj Sayısı : 97
    Rep Puanı : 220
    Kayıt tarihi : 18/02/10
    Yaş : 33
    Nerden : Nereye

    Jal ile motor kontrol Empty Jal ile motor kontrol

    Mesaj tarafından Admin Cuma Mart 05, 2010 1:22 pm

    Jal ile motor kontrol 4555555555555



    Jal yazılımı;


    include 16f84_4
    include jlib

    port_b_direction = all_output
    port_a_direction = all_input

    var byte sure = 5

    forever loop
    if pin_a0 == high then
    pin_b0 = high
    pin_b1 = low
    if pin_a1 == high then
    sure = sure 1
    if sure == 255 then sure = 254 end if
    while pin_a1 == high loop end loop
    end if

    if pin_a2 == high then
    sure = sure - 1
    if sure == 255 then sure = 0 end if
    while pin_a2 == high loop end loop
    end if
    end if

    if pin_a0 == low then
    pin_b0 = low
    pin_b1 = high
    if pin_a1 == high then
    sure = sure 1
    if sure == 255 then sure = 254 end if
    while pin_a1 == high loop end loop
    end if

    if pin_a2 == high then
    sure = sure - 1
    if sure == 255 then sure = 0 end if
    while pin_a2 == high loop end loop
    end if

    end if
    pin_b7 = high
    delay_50us (sure)
    pin_b7 = low
    delay_50us (255 - sure)
    end loop

      Forum Saati Cuma Mayıs 10, 2024 6:00 pm