CrazyEngineers
  • hello guys it's my first topic in this amazing SITE ..
    i want to ask about learning how to make a programs in matlab and interfacing using PARALLEL PORT .

    i have an example
    Write a program to light a number of LEDS
    corresponding to an input variable in the
    MATLAB.
    Variable = 0 (no LED on)
    Variable = 1 (1 LED on)
    Variable= 2 (2 LED’s on)

    (y=input('X=')
    daqhwinfo('parallel')
    dio=digitalio('parallel','LPT1')
    input=addline(dio,0:7,'out')
    if y==1
    putvalue(dio, [0 0 0 1 1 0 0 1])
    end
    if y==2
    putvalue(dio, [0 0 0 1 1 0 1 1])
    end
    if y==3
    putvalue(dio, [0 0 0 1 1 1 1 1])
    end

    if y==0 putvalue(dio, [0 0 0 0 0 0 0 0])
    end )
    i really understand the program from the first till
    ""input=addline(dio,0:7,'out')""
    but after this line i didn't understand the sequence of 1,0 in putvalue(dio, [0 0 0 1 1 0 01])
    i want to know what is [0 0 0 11 001] i knew that parallel port have 8 data pins but what is the sequence that he used in this program and why ?!
    i need to understand how to write a program because i have a project
    ""Write a program to simulate any case from
    your creation.
    Use in your project the chip (L293D) do drive
    a motor clock wise and anti clock wise
    through a MATLAB code.""

    so i really finding a problems in understanding the language of matlab !! any help please πŸ˜€
    THANKS IN ADVANCE πŸ˜€
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Home Channels Search Login Register