IMT540 MANEJO DE PUERTOS DE COMUNICACIÓN EN MATLAB

download IMT540 MANEJO DE PUERTOS DE COMUNICACIÓN EN MATLAB

of 6

Transcript of IMT540 MANEJO DE PUERTOS DE COMUNICACIÓN EN MATLAB

  • 8/13/2019 IMT540 MANEJO DE PUERTOS DE COMUNICACIN EN MATLAB

    1/6

    MANEJO DE PUERTOS DE

    COMUNICACIN EN MATLABCARLOS ZEPITA

  • 8/13/2019 IMT540 MANEJO DE PUERTOS DE COMUNICACIN EN MATLAB

    2/6

    EN GENERAL SE SIGUEN LOSSIGUIENTES PASOS

    Determinar qu puertos estn disponibles(conectados y con sus controladoresinstalados)

    Crear el objeto que manipular el puerto

    Configurar el puerto

    Leer/escribir informacin Cerrar el puerto

  • 8/13/2019 IMT540 MANEJO DE PUERTOS DE COMUNICACIN EN MATLAB

    3/6

    PUERTO PARALELO

    Crear el objeto para manipular el puerto: paraport = digitalio('parallel', 'LPT1');

    Configura el puerto (pines) de entrada y salida

    line1 = addline(paraport, 0:3, 'out'); Enva un valor al puerto

    putvalue(paraport, [0 0 0 1]);

    Lee un valor del puerto

    k = getvalue(paraport); Cierra el puerto

    del(paraport)

  • 8/13/2019 IMT540 MANEJO DE PUERTOS DE COMUNICACIN EN MATLAB

    4/6

    PUERTO SERIAL

    Crear el objeto para manipular el puerto:

    Configura el puerto (pines) de entrada y salida seport = serial('COM1'); %estudie las opciones de conf.

    Enva un valor al puerto fprintf(seport, hello word)

    Lee un valor del puerto k = fscanf(seport);

    Cierra el puerto fclose(seport);

    del(seport)

  • 8/13/2019 IMT540 MANEJO DE PUERTOS DE COMUNICACIN EN MATLAB

    5/6

    PUERTO USB

    Con la variedad de dispositivos que existepuede recurrir a la siguiente web para mayorinformacin:

    http://www.mathworks.com/products/instrument/supported/usb.html

  • 8/13/2019 IMT540 MANEJO DE PUERTOS DE COMUNICACIN EN MATLAB

    6/6

    ETHERNET

    Con la variedad de dispositivos que existepuede recurrir a la siguiente web para mayorinformacin:

    http://www.mathworks.com/products/instrument/supported/tcp-ip.html