USBSERVICE and LCDOUT won't work together


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    644

    Default USBSERVICE and LCDOUT won't work together

    Hi,

    I am working on a touchscreen USB project where I need to see the value of some variables, so I am trying to display this data on a parallel LCD display using LCDOUT. When the LCDOUT runs the USB communication dies; otherwise, the program runs flawless. I am using 10 ms polling and a pic18f4550. I use USBSERVICE right before and after the LCDOUT command but still the USB communication dies.

    Yes, I know I can display this data in my pc using VB, but I am not there yet. Does anybody knows how long LCDOUT takes to execute and why the USB connection gets disconnected?

    Thank you,

    Robert

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    It's hard to say what's taking so long.
    Any LCD commands take the time set by LCD_COMMANDUS.
    Each character takes LCD_DATAUS.
    If they are set really high, it could take a long time on a 4-line display.

    But whatever they are set at, this might help with keeping USB serviced...

    USB_ASM_Service.pbp
    http://www.picbasic.co.uk/forum/show...06&postcount=6

    DT

  3. #3
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    644

    Default

    Darrel,

    I entered the following two lines at the beginning of my program and it worked. Thank you, you are always very helpfull.


    ' Set command delay time in us
    DEFINE LCD_COMMANDUS 2000
    ' Set data delay time in us
    DEFINE LCD_DATAUS 50

    Robert

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Great, that's good news.
    Simple fix.

    DT

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