USBBufferSize setting


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2007
    Posts
    9

    Default USBBufferSize setting

    I've generated some PIC and VB code with EASYHID. I've set the max buffersize (in/out) on 20. However now I want to change this and it is not possible.

    I have changed the settings in the PBP code.
    USBBufferSizeMax con 64 ' maximum buffer size
    USBBufferSizeTX con 64 ' input
    USBBufferSizeRX con 64 ' output
    USBBuffer Var Byte[USBBufferSizeMax]

    I've changed the settings in the VB code
    Public Const BufferInSize = 64
    Public Const BufferOutSize = 64
    Public BufferIn(0 To BufferInSize) As Byte
    Public BufferOut(0 To BufferOutSize) As Byte

    I'm using a bootloader of Microchip, can that be a problem?, however this is not logical isn't it because in a normal boot situation it will take the boot part of your own application and not the boot part of the bootloader of microchip.

    I've traced with "USBTRACE" and every time I see a transferbuffersize of 14h (20dec)

    When I started playing with USB, two years ago I succeeded to regulate the ammount of bytes which was send out from the PIC. I was able to do that with the USBBufferCount however this is also not possible anymore.

    Command
    USBOut 1, USBBuffer, USBBufferCount, DoUSBOut

    Do somebody knows wat I'm doing wrong?

    Regards,
    Ronald.

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

    Default

    Is this possible that you have to generate it within EasyHID only... or alter some of those .ASM files? Not sure if you can change it AS-IS later in your code.
    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
    9

    Default

    Hi Steve,

    thanks for your response. I've generated is with easyhid. I haven't changed anything in the .asm files.

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

    Default

    Just to make sure i'd explain it correctly and you understood what i tried to say.

    Let's say you generate your code template with EasyHID with a buffersize of 10... if later in the process you want to increase it... i'm not sure you can do it ONLY in YOUR code. I guess you also have to re-generate the code template with EasyHID again.
    Steve

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

  5. #5
    Join Date
    Feb 2008
    Posts
    6

    Lightbulb Report Size

    You have also to change the descriptor file report size to match ( both input & output ) as well as your application; go back to easyHID again but I think it only allows 8,16,32 or 64 byte sizes.

Similar Threads

  1. OSCON setting for 18F4520
    By Dennis in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 29th November 2009, 15:18
  2. PICKit2 - warning about configuration words
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 4th August 2009, 14:01
  3. code size VS speed optimization setting?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 28th April 2008, 14:38
  4. Setting a pin twice
    By RUBiksCUbe in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th September 2006, 01:45
  5. Help with setting adcon1 for 16f877
    By jessey in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th August 2005, 11:13

Members who have read this thread : 1

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