18F4550 Not Recognised


Closed Thread
Results 1 to 40 of 41

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159

    Default

    In ceramics, I have .001uF, .01uF, .1uF, 1uF and some 18pF, 20pF and 22pF. The others I have are 10uF tantalum and a ton of electrolytics.

    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
    Funky Gibbon's Avatar
    Funky Gibbon Guest

    Default Device not recognised

    Hi All,
    First thanks to everyone, it seems many heads are better than one and in the end i got it sorted.

    Firstly, looking at the 4550 datasheet it seems that all the capacitor does is go to ground so in my wisdom i though nahh, dont need it, i guess i was wrong and should have listened to people

    Second, i could never figure out capacitor values but i found some on an old redundant soundcard, the value is marked as 331, this capacitor is now in place and the circuit is working fine, i have tried Microchips mouse demo and it worked ok without the need for drivers on the pc, infact it worked better than expected when i plugged it into the bosses iMac at work and laughed at him trying to figure out what was wrong with his mouse for half an hour.
    So anyway 331 works for me on 18F4550 @ 20mhz

    Shaun

  3. #3
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Cap and program will give errors

    Robert,

    The .jpg file you attached can be caused by many issues but from my experience, there are two that come to mind. One, is the capacitor value, which has been widely discussed in this post. The second, is enumeration during the first part of the program. I had one program I wrote a while ago that was very long and two problems can occur from that. Like someone else said, you have to service the USBSERVICE at least every 10 milliseconds (I think). The other part of the problem is having the device enumerate and I had problems due to my code. I put a simple loop at the beginning of my program which looks something like this:

    USBInit

    for T=1 to 15000

    usbservice
    pauseus 100
    next T

    On this specific program, I got the exact same error as you did. My device enumerated correctly about once every 20 tries. When I put this loop in there, it enumerated 100% of the time.

    I hope this helps.

    Chris

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159

    Default

    Thanks to everyone!

    I just received my order from DigiKey this morning. The 220pF caps didn't work, despite what the datasheet says. But the 470pF worked beautifully, man I'm happy I ordered a set of each, just in case. The device is recognized, YAHOO!!!

    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!

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159

    Default

    Oh well, it was fun while it lasted. I added some input fields in HIDMaker FS and now Visual Basic gives "Cannot load control HIDagent; license not found". I have no idea what's going on now, I don't think I've done anything different. I wrote to TraceSystems in hopes that they are familiar with this error.

    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!

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

    Default

    i can't vouch on the FS one... i use the Mecanique one wich work a treat for me.

    For everybody who want to debug serial comm like USB or simple COM port, i recommend the use of a USB or COM port sniffer. It act as a spy. using that, you can also do some reverse engineering of a X previoulsy done project OR simply monitor your own. Really usefull, handy and, in some case, save some headaches... at least to me.

    There's a ton of those utility here and there. I tested a lot of those before keeping only from HHD Software.

    I have USB monitor and HHD Serial Monitor. See those on the link bellow.
    http://www.hhdsoftware.com/index.html

    I used them since few months now for reverse engineering and project debugger... i love them. Really worth the price you pay for... Even if it can be done easy in VB or else... calculate your hour rate to do it like that... and you'll certainely save money... uneless you charge 1$/hour
    Steve

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

  7. #7
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default

    Robert,

    If your .lic file is not in the same folder as you are trying to complie the program in, you will get this error. Try moving the HIDagentXControl1.lic file to the correct spot and this should correct your problem.

    Chris

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

    Question

    Quote Originally Posted by Christopher4187 View Post
    Robert,

    The .jpg file you attached can be caused by many issues but from my experience, there are two that come to mind. One, is the capacitor value, which has been widely discussed in this post. The second, is enumeration during the first part of the program. I had one program I wrote a while ago that was very long and two problems can occur from that. Like someone else said, you have to service the USBSERVICE at least every 10 milliseconds (I think). The other part of the problem is having the device enumerate and I had problems due to my code. I put a simple loop at the beginning of my program which looks something like this:

    USBInit

    for T=1 to 15000

    usbservice
    pauseus 100
    next T

    On this specific program, I got the exact same error as you did. My device enumerated correctly about once every 20 tries. When I put this loop in there, it enumerated 100% of the time.

    I hope this helps.

    Chris
    Very sorry to bring up an old post but I've done a lot of searching, head scratching, hardware alterations, firmware alterations etc etc and I still can't get to the bottom of this problem....

    I have exactly this problem as described above by Chris and solved it in the same way too. I just can't get my head around why it is happening. I simply can't get my device to enumerate correctly without this loop that he's posted above. With this loop it works fine, but I'm wondering if there's a better way to do it? Something like LOOP until the "Enumerated Correctly" flag is set inside the PIC? Obviously there's not a flag in the PIC called this - that would make it far too easy ;-).

    Has anyone else had to perform this kind of loop to enable correct enumeration of the USB?

    Again, apologies for bringing this up

    P.s. the USBService is being actioned by a timer every 10ms and is being started after this loop

    Cheers

    Rob

  9. #9
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default

    The reason for the error is because if you don't service or poll the usbservice very quickly at startup, it will have an issue. I bet if you looked at your program, it takes longer then 10mS to get to the point where usbservice is included. I believe, and someone with more USB experience then me can correct me if I am wrong, that once the device is enumerated, there can be a longer delay but on startup it must be quick. This post was over a year ago and I haven't corrected the root of the problem. With that small snippet in my code, the device works fine. I guess I have the saying, "If it aint' broke, don't fix it!" Sorry I can't help any further.

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

    Default

    Hi Chris,

    thanks for the reply, also thanks for your original post in this thread as it was your post that helped me fix this problem in the first place!! I have been using this fix for months but I was just looking to see if there was a better way of doing it. It seems that no-one else has experienced this problem.

    Quote Originally Posted by Christopher4187 View Post
    The reason for the error is because if you don't service or poll the usbservice very quickly at startup, it will have an issue. I bet if you looked at your program, it takes longer then 10mS to get to the point where usbservice is included.
    I am definitely servicing the USB every 10ms and I start the timer immediately after USBINIT. I think I will adjust my code so that the USBService is actioned by the timer every 100us for a few seconds on startup and then change back to every 10ms rather than doing it in the loop. This will allow my code to carry on what it is doing and set the USB up in the backgroud again without having to wait around for a second and a half - I'll let you know if it works.

    Thanks again

    Rob

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

    Default

    Hi Chris,

    just to confirm that doing the 100us USB Service works from within a timer allowing other operations to continue rather than just looping the USBService. Here is the code from within my service routine (using Darrell Taylor's instant interrupts - damn they're good!):

    Code:
    '*******************************************************************************
    'Timer 0 Interrupt Handler: Service the USB
    '*******************************************************************************
    
    ServiceUSB:
        
        if usbsetupcount < 15000 then   ' If USBSetupCount has not finished then
            usbservice                  ' Service the USB every 100us
            usbsetupcount = usbsetupcount + 1
            TMR0H = $FF             ' Make Timer 0 hold 65387 so that it takes 100us
            TMR0L = $6B             ' to interrupt each time (Prescale of 8)
    @ INT_RETURN
        endif
        
        usbservice                  ' Keep USB connection alive
        TMR0H = $C5                 ' Make Timer 0 hold 50537 so that it takes 10ms
        TMR0L = $69                 ' to interrupt each time (Prescale of 8)
    @ INT_RETURN
    Thanks very much for the fix - it is massively appreciated (although I should have thanked you months ago!). Hopefully this information will help others!

    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