USBDemo, something to learn USB a little bit


Closed Thread
Results 1 to 40 of 279

Hybrid View

  1. #1
    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 16:45.
    Steve

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

  2. #2
    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

  3. #3
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Thumbs up Outstanding!

    Great job Steve! I have your program running great on a MELABS LABXUSB board, I just took out your asm section for the config fuses (I'm running a 20 MHz crystal,) since my .inc file was already set up for 20 MHz, and changed portb to portd. The LABXUSB board has some leds on portd already. Works great! Thanks for getting us started with USB.

    Jerry.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by b1arrk5 View Post
    Great job Steve! I have your program running great on a MELABS LABXUSB board, I just took out your asm section for the config fuses (I'm running a 20 MHz crystal,) since my .inc file was already set up for 20 MHz, and changed portb to portd. The LABXUSB board has some leds on portd already. Works great! Thanks for getting us started with USB.

    Jerry.
    You're welcome!

    Enjoy!
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default

    HI Mr_e

    Yep using the 18F4550.

    Thats a strange one, because without changing those two lines, It just doesnt work.... which kind of makes me think that easyHID isn't really that "easy" (If you have to make modifications)

    I'll have to play with it some more, but to be honest I'm not into VB programming so HID isn't on of my top list of projects....would be nice to know a bit about it to help others one day.

    Squib

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Squibcakes View Post
    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
    sorry... but as far as i remind, i'd never ever do any change to it Weird, other have tested it, and proved to be working... can't say what is wrong.

    EDIT.. are you using a 4550?
    Last edited by mister_e; - 1st March 2007 at 19:22.
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Squibcakes View Post
    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
    That number is changed by easyHID according to the number in the Buffer (Input) field on the "Configuration Details" screen.

    If you enter 64 for the input (or output), you get
    retlw 0x95
    retlw 0x40

    But, Steve's program is only set up for 8.
    <br>
    DT

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 08: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, 11:38
  3. Replies: 9
    Last Post: - 31st July 2008, 09:56
  4. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 01:55
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 02: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