18f2550 + 24lc512


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Location
    Venezuela - Caracas
    Posts
    48

    Default 18f2550 + 24lc512

    In code in 18F2550 letra not work.......letra = " ", but in 24lc512 have "AAAAAAA"
    usb work 100% if i use
    Contador = 1
    Dados[0] = "A"
    gosub USB_Envia


    In 18F252 work 100%


    18F252
    osc 32 - PLL ON
    ------------------------------------------------------------------------
    For I = 1 To Memoria_Posicao
    I2CREAD Memoria_Data, Memoria_Clock, Controle, I, [Letra]
    PAUSE 10

    IF (Letra <> $FF) THEN hserout [Letra]
    Next I


    ------------------------------------------------------------------------
    18F2550
    osc 48

    For I = 1 To Memoria_Posicao
    I2CREAD Memoria_Data, Memoria_Clock, Controle, I, [Letra]
    PAUSE 10

    IF (Letra <> $FF) THEN
    Contador = 1
    Dados[0] = Letra
    gosub USB_Envia
    ENDIF
    Next I

    ..........................

    USB_Envia:
    USBService
    IF (Contador > 0) THEN USBOut 3, Dados, Contador, USB_Envia
    Contador = 0
    Resume
    -----------------------------------------------------------------
    ..: Don't worry, be happy :..

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    you may need to reduce your pause... and/or playing around the famous POST 148

    http://www.picbasic.co.uk/forum/show...&postcount=148

    HTH
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. 18f2550 USB OSC Problem
    By serkanc in forum USB
    Replies: 10
    Last Post: - 29th October 2008, 20:52
  2. Error 0X0000008E when connecting a 18F2550 USB HID
    By FranciscoMartin in forum USB
    Replies: 8
    Last Post: - 16th October 2008, 17:20
  3. 18F2550 timing
    By sstt1976 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 22nd August 2008, 00:30
  4. 18f2550 'access is denied' USB error?
    By Giulio in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 30th December 2006, 14:29
  5. 18F2550 config fuses, is my setup OK?
    By peu in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 28th July 2006, 03:48

Members who have read this thread : 1

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