Page 1 of 1

problem V8 and USB

Posted: Thu Jun 14, 2018 9:42 am
by MOCUELSL
Good morning, Benj.
When compiling the program that I enclose in the Pic16fj1024gb610, it works well if the USB communication cable is connected to the test board, but if I disconnect the USB cable the program stops and it does not continue the rest of the code until I return to Connecting the USB cable does not work. Thank you.

Re: problem V8 and USB

Posted: Thu Jun 14, 2018 11:25 am
by Benj
Hello,

The USB Properties contain a setting called "Enumeration Timeout" that controls is the length of time to wait for the USB initialise to connect to the PC.

No - Waits forever for the initialise to complete and for the device to be setup on the PC complete with device driver.

Yes - Performs a timeout to allow you to try and initialise later if the device may not always be plugged into the PC.

I've attached an example that has extra code to only perform USB communications when the USB has been initialised.
PANTALLA TFT ILI9341 - USB.fcfx
(13.33 KiB) Downloaded 243 times

Re: problem V8 and USB

Posted: Thu Jun 14, 2018 12:32 pm
by MOCUELSL
Hi,
Thank you very much for the speed of your response, now it works perfectly, again I thank you.
Regards