USBDemo, something to learn USB a little bit


Closed Thread
Results 1 to 40 of 279

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by UnaKRon View Post
    Other than the ASM changes, "DEFINE OSC 20" and fuse changes
    Which are rather large changes considering you have to have the right freq for the USB to run right in the first place.

    PBP version is 2.46
    Don't know if it'll fix your problem or not, but there is a 2.46 patch, and a few updates for $25 that gets you up to PBP 2.50A. A few fixes for USB and PIC18F types. Might help, might not.

    Is there a setting in MELABS programmer for the internal pull ups?
    Internal pullups on Port B are described in the datasheet for the particular PIC.

    Also...I dont have a .BAL file...*.bal search turned up nothing.. GR....
    And you won't unless you're using PBP 2.50A.

  2. #2
    Join Date
    Jan 2007
    Location
    Brazil
    Posts
    108


    Did you find this post helpful? Yes | No

    Default

    Hello..

    I'm using 18F2550 and USB is working very well... I've been trying to increase the buffer size from 8 to 16 but it do not work.

    On Pic's code, I've only changed this:
    Code:
    BufferSize      con 16
    ' BufferSize      con 8
    On VB's code, this:
    Code:
    Private Const BufferInSize = 16
    ' Private Const BufferInSize = 8
    Any idea of what is the problem?

    Thanks!!
    Sylvio,

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


    Did you find this post helpful? Yes | No

    Default

    The IN/OUT "Report" length is usually set in one of the easyHID dialogs.
    Or it can be changed manually in the Descriptor file.

    If you re-run easyHID for the same project, it will wipe out any changes you've made. So create a new project, set everything the way you want it in easyHID, then just copy the descriptor file to your existing project.

    hth,
    DT

  4. #4
    Join Date
    Jan 2007
    Location
    Brazil
    Posts
    108


    Did you find this post helpful? Yes | No

    Default

    Done! Perfect Darrel!

    Thanks a lot!
    Sylvio,

  5. #5
    Join Date
    Aug 2008
    Location
    Tucson AZ
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Hello,

    First, Mister e This is an outstanding demo. Was able to get running right out of the box on a PIC18f4550.

    I've been trying to add an additonal 8 LEDs to the demo but keep getting overrun errors. Which I'm sure it's caused on the VB side. I'm almost sure the PIC side is ok as i can turn on the original 8 LED or the ones added to PORTD. Can even turn on 4 on PORTB and 4 on PORTD. I'm just unable to get all 16 working at the same time.

    I think my problem is in this part of the VB side code. I was hoping someone could point me back in the proper direction
    Code:
    Private Sub Check1_Click(index As Integer)
        '
        '   Convert PORTB check box to decimal value before sending it
        '   to USB bus.  Result is store in BufferOut(1)
        '
        Dim LoopCheck, PORTB As Byte
        PORTB = 0
        For LoopCheck = 0 to 15                                               ' 0 To 7
            PORTB = PORTB + (Check1(LoopCheck).Value * (2 ^ LoopCheck))
            Next
        BufferOut(1) = PORTB
        WriteSomeData
    End Sub
    Any assistance would be greatly appricated
    Last edited by Philtkp; - 8th August 2008 at 18:59. Reason: Formatting

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Philtkp View Post
    Private Sub Check1_Click(index As Integer)
    '
    ' Convert PORTB check box to decimal value before sending it
    ' to USB bus. Result is store in BufferOut(1)
    '
    Dim LoopCheck, PORTB As Byte
    PORTB = 0
    For LoopCheck = 0 to 15 ' 0 To 7
    PORTB = PORTB + (Check1(LoopCheck).Value * (2 ^ LoopCheck))
    Next
    BufferOut(1) = PORTB
    WriteSomeData
    End Sub
    PortB is a byte value. A byte runs 0-255...
    2 ^ 15 = 32,768 which is greater than 255!

  7. #7
    Join Date
    Aug 2008
    Location
    Tucson AZ
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    PortB is a byte value. A byte runs 0-255...
    2 ^ 15 = 32,768 which is greater than 255!
    I tried changing the variable, PortB to an Integer and Long with no positive results

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