18F4550 Not Recognised


Closed Thread
Results 1 to 40 of 41

Hybrid View

  1. #1
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257

    Wink USBSERVICE Frequency

    Dear All,

    I've done some experimenting and found that USBSERVICE must be called at least every 2msec or lower. (10msec is way too long!)

    The best way to do this is as Rob suggested, using DT's (Timer0 or1) interrupts.

    The above example Rob posted is fine (every 100usecs) but may cause additional overhead for your program. Note, he's using an OSC speed of 48Mhz (PLL) to calculate TMR0H:TMR0L values.

    Cheers
    Squib

  2. #2
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    94

    Question 2ms USBService

    Quote Originally Posted by Squibcakes View Post
    I've done some experimenting and found that USBSERVICE must be called at least every 2msec or lower. (10msec is way too long!)
    Is that 2ms just for enumerating the device? After I get the device enumerated correctly I've been able to communicate over USB reliably with 10ms services; it's just too long for the enumeration process (in my particular program).

    Note, he's using an OSC speed of 48Mhz (PLL) to calculate TMR0H:TMR0L values.
    Yeah that's right! Should have said that really.

    Cheers

    Rob

  3. #3
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    94

    Default

    Hmmmmmm - Squib I think you may be right about your 2ms or less USB Services.

    Although I was managing to get my device to communicate reliably after enumeration with longer time periods between the USB Services, I did encounter a problem:

    When the PC is turned off, there is still power on the USB which means that my USB device thinks it has just been plugged in. It therefore actions the quicker (100us) USBService for a short time. If the PC is then switched on, the USB device will not be found by my software as it has started issuing the USBService every 10ms. However, if I completely do away with the 100us USBService period and just replace with 2ms as you suggested, the device is found every time.

    Thanks for that Squib, you've saved my head from getting sore, either by lots of scratching and/or head to desk contact!!!!

    Rob

    EDIT: After doing some experimenting I found that 2.1ms works fine, 2.2ms does not, therefore I'm going with Squib's suggestion of 2ms giving a bit of leeway (5%) - Thanks again!
    Last edited by Rob; - 14th November 2007 at 15:02.

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

    Default

    Hi Rob,
    did you also tried without timer interrupts? have a look at Darrel's suggestion AKA POST 148
    http://www.picbasic.co.uk/forum/show...&postcount=148

    This use USB INT instead of a timer interrupt... really cool stuff!
    Steve

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

  5. #5
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    94

    Talking

    Hi Steve,

    damn it - why can't I ever find things like that when I search the forum - that's EXACTLY what I was looking for to see when the device was configured correctly. Thanks VERY much for that link.

    Regards

    Rob

Similar Threads

  1. 18f4550 usb problem.. so im getting crazy..
    By MeSaKu in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th May 2009, 22:03
  2. 18F4550 to 18F2550
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th September 2007, 23:13
  3. USB Programmer for 18F4550 PICs
    By Kamikaze47 in forum USB
    Replies: 8
    Last Post: - 21st August 2007, 16:29
  4. EasyHID 18f4550 - DEVICE NOT RECOGNISED?
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd July 2007, 23:54
  5. Replies: 0
    Last Post: - 5th September 2005, 09:09

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