How often do you service USB?


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597

    Default How often do you service USB?

    Ok,

    I've finally figured out how to have basic communication between a PIC 18F4550 and the PC using USB and PIC Basic Pro. As the thread says, how do you go about figuring when you are due to issue a USBSERVICE command?

    Can I use the generated Assembler file and count how many commands were issued since the previous USBSERVICE?

    I was thinking of sprinkling LABELS throughout the sections of code that I want to 'optimize'. That way it would help me identify what assembler commands relate with what basic commands.

    Or are things not that easy?

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

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

    Default

    place the USBSERVICE in a Timer interrupt routine. Interrupt at every XYZ<10-20Msec will handle everything for you. As now it work like a charm for me. Look the instant interrupts of Darrel... couldn't be much simple.
    Steve

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

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597

    Default

    http://www.picbasic.co.uk/forum/showthread.php?t=3251

    Merci mon pote!

    The wife bellows, I'll check it out after dinner.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

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

    Default

    Pas de probleme pepere
    Steve

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

Similar Threads

  1. USB CDC Communications for Dummies!
    By Squibcakes in forum USB
    Replies: 104
    Last Post: - 15th January 2014, 13:43
  2. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  3. One USB keyboard to Two USB Ports
    By picnaut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th June 2009, 00:04
  4. USB to COM converter
    By iugmoh in forum USB
    Replies: 7
    Last Post: - 20th April 2008, 14:19
  5. USB PIC without USB Connection
    By Tissy in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th December 2005, 17:39

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