Vusb capacitor for USB comms with 18f2550


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Default

    Thanks for all that. I decided just prior to breadboard I would try something else.

    I had timed a 30 second pause (LED on then off) to make sure the osc wasn't completely out. It was as near as 30 seconds as I could detect. I was also using the EUSART at 9600 successfully for debugging.

    I should have done the crystal / cap serial test first but didn't get Steve's post in time. I had a 16mhz resonator lying there so I put that in instead as it shouldn't need caps right? First I changed the prescaler to /4 to still get 48mhz for USB. Then I timed a 60 second pause and sure enough, all good. So I tried Steves suggestion of serial test. It gives garbage on all bauds and yes, I am using PicMultiCalc (wonderful tool Steve!) so I know the settings are correct.

    I do at least get Device Not Recognised. I wasn't even getting that sometimes with 20mhz setup. Arhhhh. It sucks of a dodgy connection to me but the holder is new and I checked / resoldered them all. The board has too many wires under it so it could still be a stuff up somewhere.

    Only one question out of this I suppose. Are resonators less accurate than crystal/ cap combos. Does 60 second pause test validate clock accuracy to any degree at all? OK, that's 2 questions!

    Off to the breadboard. I will see if I can do it tonight (1.30AM already) as I am desperate to know!

    Oh and one final point. When the code works it works great. I also tried the MOUSETEST.BAS and that works when it works but doesn't when it doesn't. Says it's not a code issue to me for what my opinion is worth!

    Cheers guys

    Rich

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


    Did you find this post helpful? Yes | No

    Default

    To me serial test, Timer AND/OR PWM test is a nice start point to check a crystal accuracy, so configuration fuses setting too. PAUSE is not a safe test to me. OK OK, let's say your PAUSE 1000 take twice or half the time... you obviously see something is bad. But 1/4,1/10,1/100 second off on a 10 second delay... is hard to see. Serial comm on a high baudrate such as 115200 baud, would be a nice reference, even 19200 is still not bad.

    Ceramic resonator are nice, but might shift with temperature, less than the internal OSC that's for sure, but not as accurate as Crystal. Some resonator have built-in cap, some not.

    Good pcb, usb connector/cable debugging
    Last edited by mister_e; - 3rd October 2007 at 18:26.
    Steve

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

  3. #3
    Join Date
    Sep 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Default

    OK you guys,

    I am a very very happy man!! I can teach you something now. I doubt you will ever need to know it as you are probably not as careless as me but just in case you are as tired as me one day and stuff up!!

    I built the circuit on breadboard with ICSP, LEDs, MAX232, USB and all the bits necessary to debug. I copied the wiring for the USB connections from the prototype board. Guess what, it didn't work. I used the luxury of breadboarding to swap cap values and crystals etc but all to no avail.

    I decided I had to check my breadboard wiring. I got the EasyHID schematic out and checked the breadboard and then had to check the proto board to see if it could be true. Here comes the lesson:

    If you get D+ and D- the wrong way round it might work sometimes!!!!

    I definitely don't recommend it as it took me 3 days (incredibly long ones as well!!) to find it. If it weren't intermittent it would have been so much easier. I used to be a TV engineer 25 years ago and this whole thing takes me back a long way. Intermittent faults are a nightmare!

    I just want to thank you guys for holding my hand through this trauma and I just want to add:

    "There's no problem. Only learning opportunities"

    Now where have I heard that before. I'm elated with how much I have learned!

    The other person I would like to quote is Alain, AKA Altronics. "If there is the word Problem in the question, the answer is almost certainly RTFM". He is so right but I need one piece of info to make him right for me..... Does anyone know of any good books on how to understand a Microchip Datasheet? PBP books just don't cut it.

    Cheers a very lot, back to the wonderful world of coding!

    Rich

Similar Threads

  1. i cant get 18f2550 work as HID
    By Ahmadabuomar in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 13th October 2009, 16:39
  2. 18F2550 timing
    By sstt1976 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 22nd August 2008, 00:30
  3. 18f2550 + 24lc512
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th December 2007, 22:02
  4. DS1820 and 18f2550
    By rjones2102 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 2nd October 2007, 18:11
  5. 18F4550 to 18F2550
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th September 2007, 23:13

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