TheMartian
Junior Member level 3
Dear all, I've made a little experiment with HID library in mikroC for PIC32MX795F512H clocked at 80MHz with 8MHz crystal.
This is my code:
It just spams the computer with HID packets, each 64 bytes. The second while just wait until the packet is sent.
On PC side, I made a simple application which is receiving all USB HID incoming data and counts time. I used time and data size to calculate transfer speed, and the result is around 65KB/s.
My question is, guys, is this the maximum speed of USB communication that this PIC can do or what I am missing?
This is my code:
Code:
void main(void){
AD1PCFG = 0xFFFF; // Configure AN pins as digital I/O
JTAGEN_bit = 0; // Disable JTAG
USBIE_bit = 0;
IPC11bits.USBIP = 7;
EnableInterrupts();
HID_Enable(&readbuff,&writebuff);
while(1){
while(!HID_Write(&writebuff,64))
;
}
}
On PC side, I made a simple application which is receiving all USB HID incoming data and counts time. I used time and data size to calculate transfer speed, and the result is around 65KB/s.
My question is, guys, is this the maximum speed of USB communication that this PIC can do or what I am missing?