18F4550 and keypad


Results 1 to 4 of 4

Threaded View

  1. #3
    Join Date
    Sep 2006
    Location
    Venezuela - Caracas
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    i send 'B" from pc, print "BOTAO" and start keypad
    KEYPAD IN 16f628 IS OK...but in 18F4550 portb and portd not work

    Inicio:
    USBService

    contador = 1 'working
    USBIn 3, Dados, contador, Inicio 'working
    Toggle LED

    iF Dados[0]="B" tHEN 'working
    Contador = 5
    Dados[0] = "B"
    Dados[1] = "O"
    Dados[2] = "T"
    Dados[3] = "Ã"
    Dados[4] = "O"
    goSUB Usb_Saida

    GOTO Ler_Teclado
    endif
    GOTO Inicio

    '-------------------------------------------------------------------------------
    Usb_Saida: 'working
    USBService
    USBOut 3, Dados, contador, Usb_Saida
    rETURN

    '-------------------------------------------------------------------------------
    Ler_Teclado:
    Contador = 5 'working
    Dados[0] = "B"
    Dados[1] = "O"
    Dados[2] = "T"
    Dados[3] = "Ã"
    Dados[4] = "O"
    goSUB Usb_Saida

    @ READKEYPAD _Botao ' not working

    Contador = 3
    Dados[0] = 96+Botao
    Dados[1] = 13
    Dados[2] = 10
    goSUB Usb_Saida

    goto Ler_Teclado

    END
    Last edited by mpardinho; - 7th April 2007 at 21:58.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts