PDA

View Full Version : USBBufferSize setting



Ronald123
- 25th March 2008, 08:04
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.

mister_e
- 25th March 2008, 12:46
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.

Ronald123
- 25th March 2008, 12:52
Hi Steve,

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

mister_e
- 25th March 2008, 12:58
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.

waynepauly
- 18th April 2008, 12:33
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.