Now I have another problem. I am using the hyperterminal to send data. I press a key and the pc sends to pic and the pic sends it back. Now my problem is that when i press the first key it keeps sending that character until i press another key and then it keeps sending the new key until i press another one.
Sorry for necroposting but i found this useful.
To do a mirror usb communication, this is the code. I was using a PIC24, MPLABX 3.64, MCC 3.36 and usbFrameworkLite 1.25.2 for MCC.
This function will send to pc what you get from pc. You can use any serial monitor to test it.
size_rx = getsUSBUSART(gen_put_buffer, 64);
Remember to update the Tx machine state every time you need to transfer data (Using CDCTxService)
post edited by ALMNET - 2017/07/26 14:56:48