USBDemo, something to learn USB a little bit


Closed Thread
Results 1 to 40 of 279

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Sure it will!

    Did you have...

    DEFINE OSC 48

    I use 48mhz CPU with USB without any problems.
    <br>
    DT

  2. #2
    Join Date
    Feb 2007
    Posts
    9


    Did you find this post helpful? Yes | No

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


    Did you find this post helpful? Yes | No

    Default

    I can't make it NOT recognize the device when the OSC is 48 with 20mhz crystal.

    Did you increase the size of the VUSB cap like mister_e suggested?

    The way you have it now, the CPU is running at 24mhz. But, PBP thinks it 48mhz because of the DEFINE OSC 48. Any Time related statements will take twice as long.

    If you are going to leave it at 24mhz? You should change to
    DEFINE OSC 24

    But I'd suggest trying 48 again.
    <br>
    DT

  4. #4
    Join Date
    Feb 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Yup I've changed the cap to 220nF
    I've tried many configurations

    20MHz Crystal
    __CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L ;with OSC 48 ; NON-WORKING
    __CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC3_PLL4_1L & _USBDIV_2_1L ;with OSC 24 ; WORKING

    4MHz Crystal
    __CONFIG _CONFIG1L, _PLLDIV_1_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L ; with OSC 48 ; NON-WORKING ;Original post
    __CONFIG _CONFIG1L, _PLLDIV_1_1L & _CPUDIV_OSC3_PLL4_1L & _USBDIV_2_1L ; with OSC 24 ; WORKING

  5. #5
    Join Date
    Feb 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    I've seeking all the day to find the solution, I thus don't find it now I would continue to use it under 24MHz
    But now I am occupied to migrate the code from VB6 towards VB.NET 2005 but I have a problem. I suppose that the post here is not welcome ?

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


    Did you find this post helpful? Yes | No

    Default

    unless you have a faulty PIC, a faulty OSC , or your Vusb cap it too low (or bad), it have to work AS IS.

    Windows XP or Vista?

    Connected on a USB HUB or not?

    For the code conversion i can't help, i still use VB6. Start a new thread, maybe some could give you some tips.
    Last edited by mister_e; - 24th February 2007 at 15:45.
    Steve

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

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


    Did you find this post helpful? Yes | No

    Exclamation EasyHid Output Files

    Hi mr_e,

    I'm learning how to use Easy HID, and have a question about the PBP output files.

    If I copy the files into the same folder as as your demo files (using same names etc) and then run, the push buttons don't have an effect and the 2 var POTS don't work, LEDS and PWM are ok.

    After doing a compare with your original files and the easy HID output the difference is in the DESCUSBDemo.asm file.

    There are two lines that perhaps you have manually modified?? They are in the **** INPUT OUTPUT REPORT ***** sections, specifically:

    Code:
        ; report count (number of fields)
        retlw	0x95
        retlw	0x08
    Why have you have changed the value from EasyHIDs default of 40 to 8?

    Once changing the value from 40 to 8 my EasyHID files work with your VB program.



    Cheers
    Squib

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. How to receive stream of bytes using PIC USART
    By unifoxz in forum mel PIC BASIC Pro
    Replies: 34
    Last Post: - 20th June 2009, 10:38
  3. Replies: 9
    Last Post: - 31st July 2008, 08:56
  4. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 00:55
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts