I wouldn't ask if it weren't necessary. Is there something amiss? The device can not be seen in the HID terminal. Frankly, I am running out of ideas. Please, help me out making this thing work.
Thank you in advance.
Code: Select all
char kk;
char readbuff[64];
char writebuff[64];
void main(void) {
ANSELB = 0x0000; // PORTB is digital
TRISB.F11 = 0; // output
TRISB.F10 = 1; // intput
HID_Enable(&readbuff, &writebuff);
while(1) {
USB_Polling_Proc();
kk = HID_Read();
if (kk != 0) {
for (cnt = 0; cnt < 64; cnt++) writebuff[cnt] = readbuff[cnt];
HID_Write(&writebuff, 64);
}//if
}//while
return;
}//main