About USBDeviceTasks() in the USB-HID of PIC18F25k50

Status
Not open for further replies.

maniac84

Full Member level 6
Joined
Mar 4, 2012
Messages
337
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Visit site
Activity points
3,661
Hi guys,

Currently my application of the pic is to become a converter of serial to usb. In other words, whatever I received on my serial side, I will transmit it out using USB port. I'm using baudrate of 9600.
I know that we have to call USBDeviceTasks() every 1ms right? I put USBDeviceTasks() routine in the main() loop. And I'm using interrupt ISR to receive from serial.
My problem is, whenever I have large amount of data (around 400 bytes) to received on the ISR of my serial, my USB side will hang. Is it because when I received large amount of data, the program will always be running the ISR routine causing that we need to wait more than 1ms to call USBDeviceTasks() and the USB connection is disconnected?
How do we connect it back?
 

post your some code of your USB routine in main function bro ..
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…